Add Deployable Assemblies option missing from Visual Studio 2010 - visual-studio-2010

I've uploaded an MVC3 website and I'm getting this error:
Could not load file or assembly 'System.Web.Helpers, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its
dependencies. The system cannot find the file specified.
Having seen this before I know that it's an issue where the libraries I need aren't there. I have to bin deploy.
However I can't find the "Add Deployable Assemblies" option when I right click the project.
And according to this answer:
Starting with MVC 3 Tools Update we are now using Nuget package
references, which means that your project is automatically
bin-deployable. Since the tooling gesture is no longer necessary it
was removed from VS 11.
So why hasn't my application been "automatically bin-deployed" if this is the case?
Any suggestions?

Install Visual Studio 2010 Service Pack1 and you will get the option.
http://iwantmymvc.com/2011-03-23-bin-deploy-aspnet-mvc-3-visual-studio

Related

BizTalk project template in Visual Studio 2019 give UpdateVersionTask error

I have a working VS2019, I added the Extensions "BizTalk ESB Toolkit Initerary Designer" and "BizTalk Server" via "Manage Extensions" in VS2019
I have restarted VS and also my computer
I do not have BizTalk server 2020 installed on my computer
I do run VS2020 as admin
I can now add a BizTalk projects via "Add a new project" because there is a template named "BizTalk Server Application Project"
When I do this, I get a new BT project
But when I try to add new items, all I get is the "BizTalkServerInventory" option, no other items like schemas or orchestrations
In the New
Also, when I try to build I get the following error:
Error MSB4018 The "UpdateVersionTask" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. Det går inte att hitta filen.
File name: 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
at Microsoft.BizTalk.ALM.JsonSchema.UpdateVersionTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()
When I try to add Newtonsoft.Json I get
"Operation failed, The project ProjectName is unsuported"
And after this the "Manage NuGet Packages" i grey...
You need to have BizTalk (usually Developer edition) installed on the machine where you have Visual Studio, otherwise the DLLs that are needed for BizTalk solutions will not be there. And as per you question you also need to install the BizTalk extensions from the Visual Studio Market.
You can get away without configuring BizTalk in a Development environment, but usually it is more practical to also have it configured, so you can deploy locally using Visual Studio and quickly test changes. Otherwise you would have to have some sort build Server (that usually again requires BizTalk installed) or DevOps pipeline to compile and deploy to a BizTalk Server.

Can't load EntityFramework.dll 5.0.0.0 inside Visual Studio 2013 extension

I'm writing a Visual Studio extension which depends on EntityFramework 5.0.0.0. I included EntityFramework in my project. When I install my extension, my extension's DLL appears in VS extensions folder, and EntityFramework.dll appears with it as well.
However, when I run my Extension in Visual Studio 2013 (update 5), it can't load EntityFramework: System.IO.FileNotFoundException: Could not load file or assembly 'EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
Looking in Process Monitor, I saw that when I run my extension, VS2013 tries to load EntityFramework from a different path, which has it in a different version - 4.2. I'd expect VS2013 to continue to search for EntityFramework, and find it in my extension's folder, like it does for other dlls included in my extension, but it doesn't.
In VS2015, VS does manage to load EntityFramework 5.0.0.0, but it does so also from yet another different path.
Why doesn't VS2013 continue to search for EntityFramework in my extension's folder?
You need to specify a ProvideCodeBase attribute to specify that your extra assemblies should be loaded. "Sometimes" you get lucky and it finds something else, but that's never guaranteed to work. You can see a few examples of that being used here.

How to compile an ArcGIS Desktop add-in in Visual Studio 2013

I have several projects made in Visual Studio 2010, those projects are ArcGIS Desktop Add-in's. I have been change of computer, and my new one only have Visual Studio 2013 due to some company politics I'm not allowed to install VS2010.
I tried to open this projects in VS2013, and they open with no problem, but when i try to compile it, it get me the following issue:
ESRI.ArcGIS.AddIns.SDK, Version=10.2.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86. Could not load file or assembly 'Microsoft.VisualStudio.Shell.9.0, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
my research so far has get me to install the VS SDK, but I'm not quite sure about which one(2008...2013)
Any one has any possible solution for this?
First, I check that Microsoft.VisualStudio.Shell.9.0 was in the GAC, It was not there... :( then I proceed as Juho Vainio in Geonet suggest : Visual Studio Command Prompt --> Run as Administrator --> gacutil /i Microsoft.VisualStudio.Shell.9.0.dll, but it failed because I was not giving the full pat of the dll, so I search for it in the Visual Studio 2008 SDK, and Voila!!! it appear in the GAC
but the project still does not compile, so, I chec in the real GAC:
C:\Windows\Microsoft.NET\assembly
and found that the file does not exist neither in the GAC_32, nor GAC_64 folder, moreover, it exists in the folder GAC_MSIL, so....i took the folder C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.VisualStudio.Shell.9.0 and copied it to the folders GAC_32 and GAC_64.
Now the project compiles.

Visual Studio Redeploy feature for BizTalk solution does not work

My BizTalk solution has 10 BizTalk projects that are referenced between each other.
In each project's properties I have set redeploy feature to 'true' (it's by default).
But when I try to redeploy the whole solution from VS 2012, I get following errors for some projects in solution:
Error 201 Failed to add resource(s). Change requests failed for some
resources. BizTalkAssemblyResourceManager failed to complete end type
change request. Cannot update assembly "Project1, Version=1.0.0.0,
Culture=neutral" because it is used by assemblies which are not in the
set of assemblies to update. To update the assembly, remove the
following assemblies: Project2, Version=1.0.0.0, Culture=neutral
Project3, Version=1.0.0.0, Culture=neutral Project4, Version=1.0.0.0,
Culture=neutral Project5, Version=1.0.0.0, Culture=neutral Project6,
Version=1.0.0.0, Culture=neutral
As I read from this article:
http://blog.codit.eu/post/2013/07/30/Redeployment-notes-of-a-BizTalk-solution-from-Visual-studio.aspx
In the process of deploying a BizTalk assembly, you first needed to
manually stop, unenlist, and unbind artifacts contained in the
assembly in BizTalk Server and then remove the assembly from the
BizTalk Management (configuration) database before deployment. Visual
Studio will handle all those steps for you with this option Redeploy.
What could be the reason of my problem and possible solution?
Please check if you use subfolders in your solution.
I suggest to create new (additional) solution just for deployment purpose where you should avoid to use any solution subfolders
Andrei
You can try deleting the temp binding files at: C:\Users\%username%\AppData\Roaming\Microsoft\BizTalk Server\Deployment\BindingFiles
Then try again.
Check that one of the assemblies hasn't gone into the Default Application rather than the application you are deploying too. If you find one in the wrong place you can right click it and select Move to Application. (The other option is to remove it, but then quite often you have to remove all the dependent ones as well).
Check each project that the Application is set.
Then re-deploy.
This happens quite often, especially if you just got a project down from source control, as the Application is saved in the user file rather than the project file.
Edit: Also check your solution setting to make sure all projects have deploy ticked.
Check in the configuration manager for solution if any project is not marked for deployment. Right click on solution then select Configuration Manager and make sure all projects are selected for deploy,
Apparently there is some problem with BizTalk 2016 party export/import that prohibits re-import of bindings during deploy from Visual Studio.
My workaround is to export bindings manually before deploy, and manually import bindings after "successful" deploy (cited from the deploy log in visual studio ;).
Other reference:
https://social.msdn.microsoft.com/Forums/en-US/c49758c0-0465-4c13-97a3-300c05d00d3a/biztalk-2016-redeploy-and-orchestration-bindings?forum=biztalkgeneral&prof=required

Fails to Compile C# project due to primary reference

I'm trying to compile the project with targeted framework as ".NETFramework 4.0". But I get the following warning:
The primary reference "XXX" could not be resolved because it has an
indirect dependency on the framework assembly
"System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" which could not be resolved in the
currently targeted framework. ".NETFramework,Version=v4.0". To resolve
this problem, either remove the reference "Fdi" or retarget your
application to a framework version which contains
"System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089".
I found an earlier (but similar) problem: Visual Studio 2010: Reference Assemblies Targeting Higher Framework Version
Johannes Rudolph found this answer on MSDN's forums ( http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/dfadfb34-5328-4c53-8274-931c6ae00836 ):
However, there're 2 workarounds.
Option 1:
Step1: Unload the referencing project targeting .NET 2.0
Step2: Right click the unloaded project and select edit from context menu
Step3: Add <SpecificVersion>true</SpecificVersion> to the reference.
Below is a sample from my repro solution:
<ProjectReference Include="..\HighFX\HighFX.csproj">
<Project>{8DD71CAF-BEF7-40ED-9DD0-25033CD8009D}</Project>
<Name>HighFX</Name>
<SpecificVersion>true</SpecificVersion>
</ProjectReference>
Step4: Reload the project.
Now your should be able to build within the Visual Studio 2010, there could still be a warning as below, but the build can be successful.
Warning 1 The project 'XXX' cannot be referenced. The referenced project is targeted to a higher framework version (3.5)
Option2:
Use the command line tool csc.exe to build each of your source file, which won't prevent the building.

Resources