Nuget restoring errors - visual-studio

I am trying to Build list of Projects, which was developed on MVC3 using visual studio 2012 with .net framework 4.
When I try to Build solution using VS2017, I am getting nuget Package error on restoring it.
I went all the possible solutions-
Tried to uninstall and reinstall it.
Changed framework and cleaned the solution.
But, still I cannot get rid of the error. Can anyone help me ?
This is the error which I am encountered with
When I try to reinstall or update or restore it.I am getting following error

It is pretty simple actually and a common oversight.
If you check,you will find out the visual studio 2017 does not support mvc3.
Update accordingly

Related

How do I fix missing NuGet references?

I'm using Visual Studio Professional 2017, version 15.6.6. A co-worker gave me a solution which he says I should be able to open and rebuild without any problems. There seems to be something wrong with either the NuGet packages and/or Framework. Co-worker will only say it must be something wrong with my computer, so I'm hoping someone here can help.
I tried right clicking on the solution and picking "Restore NuGet Packages". The references still have the yellow triangle by them. I tried to rebuild anyway and got the message "The reference assembilies for framework ".NETFramework, Version=v6.0" were not found. I looked at the project properties and saw the target framework was blank. I tried choosing .NET Framework 4.6, but that gave me multiple errors of the type "Package [name of NuGet package] is not compatible with net46(.NETFramework, Version=v4.6)." The co-worker had mentioned trying .NET Core before, so I tried downloading .NET Core 3.1 from this site: https://dotnet.microsoft.com/en-us/download/visual-studio-sdks?cid=getdotnetsdk. I installed it (including restarting my computer), but don't see .NET Core in the Target framework. Can anyone help guide me getting this solution running?
Here's an image showing the missing references (yellow triangle) on the right and the reference error message when I tried to rebuild.
Here's an image after I set the framework to 4.6 and showing the target framework choices I have available:
We can see that:
.NET 6 is supported by Visual Studio 2022 and Visual Studio 2022 for Mac (and later versions).
You can update to VS2022 and try again.

Error MSB4057 in Microsoft.Common.targets

I have Visual Studio 2010 SP1.
I wrongly edit and save the file
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets
and now I can't compile anymore.
The error I got is
1>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(767,39):
error MSB4057: The target "_Xsd" does not exist in the project.
I reinstalled Visual Studio 2010, I copied the file from another computer but nothing works and I still have the same error. What can I do?
I search the solution on Internet and i found:
Copy the right target file from another machine to replace the target file.
Uninstall and re-install .Net Framework 4.0 and check if it works.
I tried to restore or install new version of the .NET framework, but other problems occured during installation maybe dued also by hardware problems (i got blue screen sometimes).
I know it isn't a good solution, but at the moment I solved the issue by formatting and reinstalling everything.

Can not reference System.data Error when creating project

I am using Visual Studio 2015 Enterprise to generate Coded UI Tests. Things have been working well until this morning. When I attempt to create a new Solution/Project, I am given the following error:
I am then able finish loading the project. However, I see another issue in solution explorer:
Note that there is no path given for the selected reference. If I try to remove it/add it back as a reference manually, I still do not see a path or version. I have tried the following:
Selected different .Net framework versions when creating the solution/project
Tried different project types: Window Forms, Class Library
Repaired visual studio
Repaired .Net Framework 4.6.1
So far I have been unable to make the error go away. Any other suggestions?
I was not able to resolve this issue. I ended up performing a reinstall of the OS/Visual Studio to get things working again.

How to fix VS2015 Package 'VisualBasicPackage' failed to load?

I have projects in a solution going from Visual Studio 2010 to Visual Studio 2015 with Update 1. I just installed VS2015 with update 1 on a Windows 7 Continuous Integration build server and I'm getting the following errors. I've been digging around on the Internet for a couple days now with no leads on how to fix this. I've read similar posts on here that relate to other "packages" not being loaded but the recommended fixes haven't worked for this. I've uninstalled and reinstalled vs2015 a few times and still get the same errors. Any thoughts or ideas on how to fix?
Package 'VisualBasicPackage' failed to load.
C:\Workspaces\AHLTA\Current\Product\Production\Shared\Security\Security.vbproj : error : The application for the project is not installed.
Package 'VisualBasicPackage' failed to load.
C:\Workspaces\AHLTA\Current\Product\Production\Shared\Shared\Shared.vbproj : error : Project 'Shared' could not be opened because the Visual Basic 2015 compiler could not be created. Please re-install Visual Studio.
Package 'CSharpPackage' failed to load.
C:\Workspaces\AHLTA\Current\Product\production\DataLayer\Dmdc\Immunizations.Messaging\Immunizations.Messaging.csproj : error : Project 'Immunizations.Messaging' could not be opened because the Visual C# 2015 compiler could not be created. Please re-install Visual Studio.
UPDATE #1: I think I may have resolved this myself just now.
I found this post and tried the suggestion, now the build seems to be compiling correctly with no errors.
vs2012 error: package 'visual c++ package' failed to load
The information on the following link seems to have solved the problem I'm having. http://happyivyli.blogspot.com/2013/07/visual-c-package-failed-to-load.html

NuGet Issues - Updating a package breaks build

I am going to lose my mind. NuGet has decided that any attempt to update a package destroys my Solution. I am running Visual Studio 2013 Ultimate w/ Update 3. I have been working on this solution/application for over a year and had no troubles. This weekend NuGet started breaking my solution build every time I update a package, regardless of what package I update. Say, for example, I update AutoMapper. It tells me that it updates successfully but when I build it fails to find the assembly/reference. I then start having problems with all of the other NuGet Package references. I sometimes get errors that there are syntax errors with MsBuild, target framework version errors, etc. I have tried reinstalling Visual Studio 2013, uninstalling resharper, reinstalling resharper, clearing NuGet cache, Visual Studio 2013 component cache. I am out of ideas short of rebuilding my machine.
Any thoughts?
UPDATE: 09/02/2014
I tried this process on a brand new machine and I got a lot further. I still, however, do have the following problem with my build. This problem seems to happen on every machine.
Error 4 Invalid static method invocation syntax: "[MSBuild]::MakeRelative($(MSBuildProjectDirectory), C:...\Source\packages\AutoMapper.3.2.1\lib\net40\AutoMapper.Net4.dll)". Method '[MSBuild]::MakeRelative' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(a, b)). ChoiceMentor.Presentation.Services
In this particular case, the answer was that a comma had been put into one of the file path folder names. This caused MSBuild to throw a huge fit. Renaming the folder fixed the issue. Thanks for the tips though everyone!

Resources