Could not load file or assembly "project name" or one of its dependencies - visual-studio-2010

I'm making a Windows Application project using Visual Studio Ultimate 2010.
Recently, when I open my project, this message is shown:
Error while trying to run project: Could not load file or assembly "project name" or one of its dependencies. The module was expected to contain an assembly manifest.
I've removed Visual Studio 2010 from my computer and reinstalled it again; I've even reinstalled my operating system, but this error message is still showing.
I didn't do anything to my project. I need the solution, I've been Googling but I still can't find a fix.

Related

The “GetDeploymentPathFromVsixManifest” task failed unexpectedly

What to do to solve "The “GetDeploymentPathFromVsixManifest” task failed unexpectedly" when trying to debug a VS extension project??
Same question was already asked multiple times with different source reasons, all for VS2017 usually for upgrading VS extensions from VS2015, and it should have been solved with VS 2019. Yet, it just popped up.
The "GetDeploymentPathFromVsixManifest" task failed unexpectedly.
System.TypeLoadException: Method 'get_JoinableTaskFactory' in type 'Microsoft.VisualStudio.Sdk.BuildTasks.ExtensionEngineHost' from assembly 'Microsoft.VisualStudio.Sdk.BuildTasks.16.0, Version=16.9.2017.12405, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' does not have an implementation.
at Microsoft.VisualStudio.Sdk.BuildTasks.ExtensionManagerUtilities.GetExtensionEngine(ISettingsManager manager, Boolean deletePendingUninstalls)
at Microsoft.VisualStudio.Sdk.BuildTasks.GetDeploymentPathFromVsixManifest.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
I have tried all the solution for the same error found on SO, so far to no avail. I am using VS 2019 Community 16.9.2, updated all packages, downgraded some to try, nothing really changes this error.
This is my first attempt on VSIX and I just downloaded an existing project from github and compiled it.
The github project is working (probably) since the extension is available on the marketplace.
Any other suggestions? Searches on this error in combination with the JoinableTaskFactory dont return exactly many results.
For me the solution was to do at least one of the following steps:
Delete the obj-folder in the project
Execute Reset the Visual Studio 2019 Experimental Instance. You can find this tool when you search it in the windows search bar.
Clean and Rebuild the project
Sometimes it helped if I did only one step and sometimes it only worked after doing all the steps.
I couldn't find out if there is a specific pattern behind, but doing all of the above steps always fixed the error for me.
Another issue where I got the same error was if there was the wrong external program selected under Project Properties -> Debug -> Start external Program. For VS2019 I need to select C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe
If I switched between Visual Studio Versions, then sometimes a different Visual Studio version was selected.
Uncheck: "Deploy VSIX content to experimental instance for debugging"
in solution properties->VSIX
Also Update installed NuGet packages.

Error occurred while restoring NuGet packages: "Invalid restore input. No target frameworks specified."

How to resolve Visual Studio (MSBuild) error message:
Error occurred while restoring NuGet packages: "Invalid restore input. No target frameworks specified."
WARNING : It seems that you can't work with JetBrains Rider IDE without visual studio!
This issue can happen with Rider IDE if you haven't also installed Microsoft's Visual Studio, along with relevant add-ons libraries dealing with your project (for example Xamarin).
Installing Rider + .NET Framework + MSbuild may not be enough to resolve the issue.
Perhaps it's obvious but not for everybody, in particular developers new to .NET coding.
I had this error recently in a project which builds a NuGet package targeting multiple frameworks.
In brief, I had this in my .csproj file (presumably a git merge error):
<TargetFrameworks>netstandard2.1;net462;net48;net48</TargetFrameworks>
Note the duplicate entry for net48. The odd thing was that it still built on my machine (presumably due to something being cached on disk somewhere). Once I removed the duplicate entry everything started working again.
The problem was caused by wrong project type specified in .sln file. In the solution file the project had type {D954291E-2A0B-460D-934E-DC6B0785DB48} (Shared Project / Windows Store App Universal).
...
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "SomeProject", "SomeProject", "{...}"
...
But actually the project is C# (SDK project). The problem was solved by changing the GUID/UUID in the solution file to the correct one, which is {9A19103F-16F7-4668-BE54-9A1E7A4F7556}.
...
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SomeProject", "SomeProject", "{...}"
...

Visual Studio 2015 - Error 1123:

I have encountered a bizarre situation in which.....
a Win32 project (originally compiled/run using Visual Studio 2010) has been successfully carried over/updated and successfully compiled under Visual Studio 2015 on the same computer (mentioned just in case that is somehow relevant).
I now need to continue development of the project on a different computer. So I copy the ENTIRE contents of the project folder to an identically named folder on the new computer, with VS 2015 installed. The only difference being that the project folder is now on the D: drive rather than C: as in the original computer.
When I try to compile the program I get:-
fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
I experienced this error in the past with Visual Studio 2010 and fixed the problem as advised in previous articles such as:
Failure during conversion to COFF: file invalid or corrupt
In this case however the puzzle is that, as mentioned above, the project has already successfully compiled on the computer it was copied from AND the new computer appears to have a correct and up to date VS2015 installation (e.g. the issue cannot be due to incorrect version of the CVTRES.EXE file - as was case when the same error was encountered in the past with Visual Studio 2010)
As far as I can tell the configuration settings for both VS2015 installations, on both computers are the same. The only difference as far as I can tell being that on the new computer the project now resides in a different drive/path - although the project folder is indentically named.
Can this really be the source of the problem?
The problem has now been, apparently, solved. I tried the /verbose option but that did not reveal any information or insight of any use.
The computer on which the project had been transferred to had Visual Studio 2010 WITHOUT service pack 1 installed. As an entirely separate exercise I proceeded to install service pack 1 (from a previously saved/archived ISO file). It failed to install. I then uninstalled VS 2010 from the computer.
I then tried again to compile my project using VS2015 - and again it failed, giving the error 1123.
I then performed a FULL re-installation of VS2010. I followed this with an another attempt to install the service pack 1 - which then succeeded.
After all this I then attempted to compile my project in VS2015 - and it succeeded! The connection with the VS2010 may be completely coincidental? But I mention this here for the record in case anyone else encounters a similar circumstance.
The puzzle is how, if at all, can the state of the VS2010 installation influence the ability to compile the project in VS2015. The concern, more importantly, is that my continued ability to work on/compile the project using VS2015 will be dependent on the computer keeping VS2010 w/SP1 installed?!

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.

Cannot compile .NET CF project containing Design time attributes without Visual Studio?

I'm working on a .NET Compact Framework 3.5 app. I have an automated build machine that does not have Visual Studio installed, and all has been fine.
I'm trying to a a new solution containing control projects that have DesignTimeAttributes.xmta files. MsBuild on the build machine is failing with cannot find file, C:\Program Files\Microsoft Visual Studio 9.0\SDK\v3.5\Bin\genasm.exe.
I've tried manually adding this directory and it's contents from my dev box to the build machine, but now I'm getting
c:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.CompactFramework.Common.targets(67,9): error : genasm.exe(1) : error There was an error reading arguments. Could not load file or assembly 'Microsoft.CompactFramework.Build.Tasks, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Done executing task "BuildAsmmeta" -- FAILED.
Before I struggle further with this, I thought I'd ask if anyone else out there has gotten a CompactFramework project with design time attributes building on a machine without Visual Studio?
Filburt: I've already installed the Windows SDK, the .NET SDK, and the CF SDK. I realize now that "all has been fine" in the original question doesn't make that clear.
None of the SDK's installed anything into the Microsoft Visual Studio 9.0 directory.
I've given up and installed VS at this point, but thanks for the answer.
You think need to install the Windows .NET Framework SDK on your build machine to obtain the tools that come with Visual Studio.
update
Since you stated you installed all SDKs you could check %ProgramFiles%\Microsoft SDKs\Windows\v6.1\Bin\SetEnv.cmd for any quirks in the PATH settings. I discovered some inconsistencies there for an x64 environment.

Resources