All system links are missing. Visual Studio 2013 NuGet Async

I have a solution / team project created in visual studio 2013 and for some time the NuGet Microsoft.Bcl Async work package has been installed, installed for the NET Framework 4.0. Today, when you open a project, all references to .NET library libraries cannot be found by default, they only have a warning symbol next to them. I have 49 warnings when creating a project saying: “The link component“ System.X ”could not be found. Or 'The link component“ Microsoft.X ”could not be found. However, the links to other projects in the solution remain unchanged.

If this makes any difference, I used the built-in version control system to store backup copies of my code and access it from another computer with the same configuration.

Looking at other stackoverflow questions with similar problems, people seem to point to NuGet as potentially causing the problem, but without any solution that seems to work for me. I tried the obvious solution of removing and re-adding links using both the file browser and the Framework tab, but none of them have worked so far.

Currently, I cannot compile the project, because I get this warning, which is undoubtedly caused by missing links in the first place.

Error 31 The task "EnsureBindingRedirects" cannot be loaded from the assembly C: \ Users ... \ Visual Studio 2013 \ Projects \ AlgorithmToolsTFVC \ AlgorithmToolsSuite \ AlgorithmTools \ packages \ Microsoft.Bcl.Build.1.0.14 \ tools \ Microsoft.Bcl. Build.Tasks.dll. Could not load file or assembly: /// C: \ Users ... \ Visual Studio 2013 \ Projects \ AlgorithmToolsTFVC \ AlgorithmToolsSuite \ AlgorithmTools \ packages \ Microsoft.Bcl.Build.1.0.14 \ tools \ Microsoft.Bcl. Build.Tasks.dll 'or one of its dependencies. The system cannot find the specified file. Make sure the declaration is correct, that the assembly and all its dependencies are available, and that the task contains an open class that implements Microsoft.Build.Framework.ITask. AlgorithmTools

+6
c # visual-studio nuget
source share
5 answers

I was able to solve this problem by first performing an update for all NuGet packages in the solution, and then deleting and re-adding links to libraries included or overridden by the package.

+1
source share

Possible solution: If you see yellow triangles over most of your system links, edit your .csproj file (just in case), scroll down to the end of the file, and delete these lines ...

 <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <PropertyGroup> <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> </PropertyGroup> <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" /> </Target> 

Like so many others, I use a centralized .packages folder outside of source control. This is done using the following lines in your NuGet.Config file:

 <?xml version="1.0" encoding="utf-8"?> <configuration> <config> <add key="repositoryPath" value="..\..\..\.packages" /> </config> <solution> <add key="disableSourceControlIntegration" value="true" /> </solution> </configuration> 

One of the steps in this is to verify that your project file no longer uses the old NuGet.targets file (the only file in the folder with the .nuget solution should be NuGet.Config ).

When NuGet believes that it should check the NuGet.targets file and it does not exist, it will also check the checks for basic links (for example, System.Core , WindowsBase and PresentationCore ).


Update: See this topic / answer on how to completely get rid of .nuget folders in your solution! It can be set at the user profile level in AppData.

+24
source share

Just the same problem. The reason for me was that all the files inside the Nuget package suddenly become 0 bytes. I mean a DLL, a nupkg file, etc.

I reinstalled the package and it worked for me.

0
source share

I had the same problem with my project on Team Foundation server. I had an error saying that the "EnsureBindingRedirects" task could not be loaded from the assembly C: \ Users ... \ Visual Studio ... "and many warnings saying" Microsoft.X related component "

The solution was very simple. All I had to do was copy the entire project folder to another location, and it worked.

0
source share

There was a similar problem. After spending 2.5 hours trying to find a solution, I fixed it simply by opening the project on VS 2013, allowing me to restore and reinstall the NuGet package. Fixed right away, and now it works on VS 2015 just fine.

0
source share

All Articles