visual studio project gives error after rebuilding - visual-studio

I am able to open a saved copy of my project in visual studio and it runs fine. After I rebuild the project it gives me the following error :
Could not load file or assembly 'System.Web.Ajax, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The system cannot find the file specified.
this is driving me crazy. please help

Use Fuslogvw.exe to troubleshoot this problem. It shows you where the CLR looked for the assembly.

Related

What does "Version" mean when viewing reference properties in Visual Studio?

I am currently battling "DLL hell" in Visual Studio 2017. For unknown reasons, I suddenly got a problem with System.ValueTuple, where the error I get is the classic problem that have been asked many times before:
Could not load file or assembly 'System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
I cannot really figure it out, as I don't think I should have any reference to 4.0.2.0. VS tells me the following:
What I don't get is how the "Version" of the System.ValueTuple says 4.0.2.0, when I have installed version 4.4.0 according to the path of the DLL and according to NuGet Manager.
So, why is it like this?

could not load file or assembly sharepoint 2010

I am relatively new to sharepoint 2010 and I have the following error when I click on the a page/specific webparts
Could not load file or assembly 'AjaxControlToolkit, Version=3.0.30930.28736, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies
I have checked that the dll is in my bin file with the correct version. Appreciate if anyone can help me with this. Thank you
Try to add your file to GAC (c:\windows\assembly).
If it still would not work, there might be SafeControl statement missing from web.config file.

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.

MSTest on x64 C++/CLI

I got a problem using MSTest on x64: The test project depends on a couple of C++/CLI assemblies, and fails to load for some reason. In Visual Studio, I get (stripped down):
Error loading D:\xxx\Xxx.Test.dll: Unable to load the test container 'D:\xxx\Xxx.Test.dll' or one of its dependencies. Error details: System.BadImageFormatException: Could not load file or assembly 'Common.Geometry.Native, Version=1.1.4574.22395, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Running MSTest manually in a command prompt, I get:
Unable to load the test container 'D:\xxx\Xxx.Test.dll' or one of its dependencies. Error details: System.IO.FileNotFoundException: Could not load file or assembly 'Common.Geometry.Native, Version=1.1.4574.22395, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Details worth mentioning:
The test project itself is compiled using 'Any Cpu'.
I use a x64 specific testrunconfig
Dependency walker shows no missing native dependencies in the C++/CLI assembly (Common.Geometry.Native)
Even more interesting, there is another test project in the same solution using the same C++/CLI assembly (Common.Geometry.Native), and it runs without any problems.
I have also verified that there are no 32bit assemblies/dlls interfering.
Any suggestions is welcome !
I'd initially thought that microsoft didn't add a 64-bit capable test runner for MSTest until 2012... As it turns out, VS2010 is capable of this.
What I'd check then is if your native dll has any other native dependencies.
MSTest has a "mis-feature" where, before running your tests, it creates a temp directory, usually something like PC-NAME WORKSPACE_NAME 1782368124\Out, and it copies your code into that directory. For .NET assemblies, it can figure out the dependencies and is able to copy them, but for native code it does not appear to do this.
I've solved this in the past by adding the directory containing any other native dependencies to the PATH environment variable for my user account (remember if you do this to restart visual studio as it won't notice)

MSTest and TFS Build 2010

I am having some issues trying to get my automated builds to compile projects that reference Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll. For some reason the project fails to compile complaining that
Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk.
I have installed VS2010 Premium on my build server but this does not seem to have resolved the issue. Am I missing something here?
Your version Version=9.0.0.0 is part of VS2008, so it makes sense that it can't be found on your build server even though you 've installed VS2010.Consider changing your project-ref into Version=10.0.0.0 which corresponds to your current VS-version.

Resources