BizTalk Deployment Issue - biztalk

I try to deploy a demo BizTalk project by using deploy menu in Visual Studio 2013.
The visual studio output window shows it has successfully deployed:
2> : Installed the "C:\Users\Administrator\AppData\Local\Temp\2\BT\PID4904\BizTalkAssembly\7afb324ca64bf52f71046b867c49fa50\MyFirstBizTalkSoluntion.dll" assembly into the Global Assembly Cache. (force=True)
2>
2> : Deploy operation succeeded.
I could not found this demo project assembly in c:\windows\assembly, but it located in
C:\Windows\Microsoft.NET\assembly\GAC_MSIL folder

Sorry, is there a problem? What you posted is the expected behavior. Deployed assemblies are GAC'd.
.Net 2.x GAC: C:\Windows\Assembly
.Net 4.x GAC: C:\Windows\Microsoft.NET\assembly\GAC_MSIL folder
BizTalk Projects have been .Net 4.x based since BizTalk Server 2010.

Related

Correct location of MSBuild.exe to build .net 4.5 application using command line

I have asp.net web api application targeting 4.5 framework.
I am trying to create a docker image for my application. In order to build the application, I can use MSBuild.exe available in C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe or C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe locations.
When I build using C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe location, I get error saying "
C:\MyApp-Api\MyApp-Api.csproj(985,3)
: error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft
\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" was not f
ound. Confirm that the path in the declaration is correct, and that th
e file exists on disk."
I am able to build my application using C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe location.
Questions:
What is the difference between the MsBuild.Exe available in these two folders?
Ideally I think using C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe location is the right approach as it comes with default location and I think MSBuild in program files comes due to installation of Visual Studio. and on my Build server I will not have visual studio installed.
In order to build the application on container, I need to specify SDK which will allow me to build the application. Which version of SDK, I need to build .net 4.5 application.
I was browsing web with a similar query today and stumbled upon this random link to a Veracode extension which lists nicely the difference.
Visual Studio 2017
The first two paths below that contain Professional differ based on the edition of Visual Studio you have installed. Replace Professional with Enterprise or Community, when appropriate.
Note: the Visual Studio Preview install also changes the path based on Enterprise, Professional, or Community.
Standard Visual Studio Paths
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\amd64\
Visual Studio Preview Paths
C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\MSBuild\15.0\Bin
MSBuild Tools Paths
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\amd64\
Visual Studio 2015
C:\Program Files (x86)\MSBuild\14.0\Bin\
C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\
Visual Studio 2013
C:\Program Files (x86)\MSBuild\12.0\Bin\
C:\Program Files (x86)\MSBuild\12.0\Bin\amd64\
Visual Studio 2012
C:\Windows\Microsoft.NET\Framework\v4.0.30319\
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
It seems like you have both VS2012 and VS2015 installed.
I dont know much about ASP.NET and docker but will try to answer your questions:
I think the difference is explained above.
The problem you are experiencing there is explained better in here:
The imported project Microsoft.WebApplications.targets was not found Maybe give it a go?
Relying on https://dotnet.microsoft.com/download/visual-studio-sdks and
https://learn.microsoft.com/en-us/dotnet/framework/install/guide-for-developers it seems like there is no SDK for .net 4.5 as it is included in VS2012. But any higher version should build your project to 4.5 anyway.
Reading (3) I would use VS2015 msbuild if VS2012 gives you a headache.
If you dont mind me asking - Why not switching to ASP.NET Core ?

Deploying ASP.Net Project to Ubuntu server using Mono

I have developed an ASP.net 4.5 Project using Visual Studio 2013 and I am assigned to deploy it on our Ubuntu server.
Like what other tutorials said I need to use Mono to make this possible. I think I followed those steps but when I try to open the page, it gives me this error.
I had this exception when deploying my application, but to a Windows Server. The problem was that some dlls references pointed to my local assemblies. (example: System.Web.Http.WebHost was referenced to C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\Assemblies\System.Web.Http.WebHost.dll, so in the server this LoadException ocurred because this dll was missing.)
So the generic answer is: There is some dll missing. Compare the references in your project with the bin folder in the server. If there's some reference that points to local machine, change the property CopyLocal to true, so when you compile and publish the dll will be copied to the output directory.
I don't use Mono, but how this same problem ocurred to me in a Windows Server, may be the same problem with you in a Linux Machine.
If the probem persists, try to create a simple project, with just one page and a few dependencies just to see if the asp.net works fine in this server.

How to add reference to Microsoft.Office.Interop.Word.dll while copying an asp.net app from dev server to test server

I am referencing Microsoft.Office.Interop.Word.dll in my asp.net web application at development server.
No i need to move this app from development server to testing server.
I can't see the dll in the bin folder of the app as it is pointing to GAC.
How should i reference the above specified dll in testing server?
Do we need to do anything with web.config?
Please advice.
Thanks,
Ram
Visual Studio uses different sets of the PIAs on the development computer. These different sets of assemblies are in the following locations:
A folder in the program files directory.
These copies of the assemblies are used when you write code and build projects. Visual Studio installs these assemblies automatically.
The global assembly cache.
These copies of the assemblies are used during some development tasks, such as when you run or debug projects that target the .NET Framework 3.5. Visual Studio does not install and register these assemblies; you must do this yourself.
Link
If not found DLL you have to download from internet....

Visual Studio 2010 missing ASP.NET projects templates?

So brand new installation of .NET Framework 4.0 and Visual Studio 2010 on a brand new computer. Loading up Visual Studio 2010 and selecting New Project only lists the following project typess under "Web":
ASP.NET MVC 3 Web App
AjaxControlExtender
AjaxServerControl
ASP.NET Server Control
All of the other project types are missing and I can't load existing .NET projects (gives me the "project type not supported" error. Any idea what happened or how I can reinstall the missing templates?
I've already tried running devenv.exe /installvstemplates with elevated privileges.
If you didn't install the Visual Web Developer component, the ASP.NET project templates won't be fully installed. Naturally, because the installer then thinks it doesn't need to put them there as ASP.NET is a web development framework.
In that case, just run the installer again and make sure Visual Web Developer is checked. The installer will then add the appropriate project templates.
Default Project Templates in Visual Studio
Available templates may vary according to Visual Studio version, SKU,
installation options, and other customizations. If you are missing a
template that comes with your installation, run devenv.exe with the
/installvstemplates switch. For more information, see How to:
Restore Default Project Templates.

Error: This assembly is built by a runtime newer than the currently loaded runtime

I have downloaded published (code behind files are no there, combined with dll in bin folder) web application from Window Server 2008 where it is hosted, and open it with Visual Studio when I debug that application it shows following error:
"Could not load assembly because this assembly is built by a runtime newer than the currently loaded runtime"
I don't know how can I solve this problem and test application locally.
Please help me.
This errors happens when the DotNet framework you are using is of older version than the one used to build the assembly. You need to check which version of framework is used to build those assemblies and then use the same or higher to debug too.
I was getting this same error when running an installer for a Windows service, even when running the installer on the PC the installer was built on.
It turned out that although the Windows service project had been updated to .NET 4.5, the Setup project that was making the installer was still set to use .NET 2.0.
To check if the Setup project is using an older version of .NET than the project to be installed, in the Visual Studio Solution Explorer:
Expand the Setup project;
Under the Setup project, expand Detected Dependencies;
Under Detected Dependencies select Microsoft .NET Framework and check the Version property. Select the appropriate .NET version from the dropdown list;
Re-build the Setup project to create a new version of the installer.
This error can have a lot of other reasons, too. I had the same problem, and nothing helped until I stumbled across this:
TlbExp.exe error:This assembly is built by a runtime newer
I just ran into this issue when the assembly was built with a target framework of .NET 4, and v4.0.30319 was installed on the server, and other 4.0 apps were running successfully.
The problem arose because the app had originally been built targeting 2.0, and new 4.0 assemblies were pushed, but not the app.config file, which we generally update separately.
This means the supportedRuntime attribute was not updated in the config and caused the error. Adding the following to the app.config fixed our issue:
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
One the the assemblies reference in the project might be built using a newer version of .net, check version of every assembly reference and correct accordingly.
Also check the application pool that this web site is running as. It could be framework 2.0 default on some older windows servers. Change it to framework 4.0.

Resources