nuget package manager console - Could not find file - visual-studio

I have an issue in Visual Studio 2013 in that the package manager console will no longer initialize and shows the error
"Could not find file 'C:\Program Files (x86)\Microsoft Visual Studio
12.0\Common7\IDE\WSMan.format.ps1xml'."
I have tried renaming the Extensions folder and manually installing NuGet. I have run a repair of VS 2013 all to no avail.
Any ideas how I can fix this?

Please uninstall the NuGet Packages Manager for Visual Studio from Tools menu -> Extensions and Updates -> Installed -> NuGet Packages Manager for Visual Studio in Visual Studio menu and reinstall it in that menu again.
And others who also have this issue in another thread provide other workaround, please refer to:
Package Manager Console not working Visual Studio 2013

Related

Error updating Visual Studio 2017 15.6.2

I was trying to update VS 2017 to 15.6.2 version. As usual VS asked me to update the Installer. But the Installer updating failed and now, when I try to launch the VS updating again, I get this error message:
Error loading vs_installershell.exe: No signature was present in the subject.
Anyone has ever seen this before? Any help will be appreciated.
Microsoft recommends the following procedure in this case:
Close the Visual Studio Installer.
Delete the Visual Studio Installer directory. Typically, the directory is C:\Program Files (x86)\Microsoft Visual Studio\Installer.
Run the Visual Studio Installer bootstrapper. You may find the bootstrapper in your Downloads folder with a file name that follows a vs_[Visual Studio edition]__*.exe pattern. If you don't find that application, you can download the bootstrapper by going to the Visual Studio downloads page and clicking Download for your edition of Visual Studio. Run the executable to reset your installation metadata.
Try to install or update Visual Studio again. If the Installer continues to fail, go to the next step.
There is also a bit of warning:
Performing the following actions reinstalls the Visual Studio Installer files and resets the installation metadata.
But in the end, it reinstalls the VS Updater.
Source: https://learn.microsoft.com/en-us/visualstudio/install/troubleshooting-installation-issues

Visual studio create project - could not load assembly Microsoft.Build.Framework

I update my Visual studio yesterday. Now I have Visual Studio Enterprise 2017, Version 15.6.0 and I dont have create all projects. When I try create WPF project, it displayed this message:
When I try create other project, it displayed this message:
I tried repair and reinstall Visual Studio.
Do you have any advice? Thanks
Here is solution.
open Developer Command Prompt for VS2017 (I opened it as admin)
gacutil /u Microsoft.Build.Framework

unable to locate visual studio installer

When I trying to open visual studio installer in visual studio 2017 an error message is displayed: can't locate visual studio installer. It might be because I deleted it by mistake. I tried to look for the download of visual studio installer and did not find it. I must delete complitly visual studio 2017 from my drive as fast as it possible.
Go to control panel>>Control Panel\Programs\Programs and Features>>right click on visual studio>>select change.
your installer window will appear on the screen.
Try below link
https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community&rel=15#
Download installer from above link and then run installer.
It will automatically display your installed vs 2017 components
From there you can install/uninstall vs 2017
Run the installer again. You don't have to uninstall first. I had the same problem when updating to v15.2 today.

Visual Studio 2015 Initializing Part Nuget.PackageManagement.VisualStudio.VSolutionManager must be called on UI Thread

While attempting to build or open a project in Visual Studio 2015 14.0.25431.01 Update 3 which I recently updated, I keep getting errors around nuget package management. Whenever I build the project the first time after opening VS, I get the error message below. I also get it when I try to open the nuget package manager dialog. Anyone else experience this?
An exception was thrown while initializing part
"Nuget.PackageManagement.VisualStudio.VSolutionManager".
GetFullVsVersionString must be called on the UI thread.
I had the exact same issue as you and I was able to get NuGet to work again for me by doing the following simple steps.
Completely close all versions and windows of Visual Studio
Reopen a blank Visual Studio window
Navigate to Tools -> NuGet Package Manager -> Package Manager Settings
Press "OK"
Open the project you were having issues with
Try opening "Manage NuGet Packages..." or running your project
Your issue should now be fixed!
I had originally tried uninstalling NuGet and reinstalling it through the "Extensions and Updates" under "Tools" to no avail. The solution I listed above fixed it instantly.
It appears reinstalling Nuget Package Manager for Visual Studio in the Extensions & Tools dialog may have fixed it.
-First
Delete all cache on C:\Users\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache
-Second
Reinstall Nuget package manager by Tools->Extensions and Updates. After that restart your visual studio
-Third
Go to Tools->Nuget Package Manager->Package Manager Settings of blank project (for create new cache), and after that, try on your project
I was getting this with a Visual Studio Extension from Telerik. Once I uninstalled it went away.
In VisualStudio 2015 -> Tools -> Extensions and updates -> Online: Search for the string: "Fix NuGet GetFullVsVersionString must be called on the UI thread"
and install the given fix.
Alternatively you can download the fix at :
GetFullVsVersionString fix
Now in February 2018, the latest NuGet Package Manager version 3.4.4.1321 does not have the fix included, so the patch must be applied.
As Steve Greene's answer describes, I also had the Telerik extension installed, so that might have caused the problem.
This problem can happen if you have Xamarin for Visual Studio installed. There is a NuGet bug reported about this.
If you have Xamarin component in one of your projects and then try to use NuGet then NuGet can be called on the wrong thread.
There is a separate Xamarin extension that can be installed to fix this problem with Xamarin for Visual Studio.
Run the Visual Studio as 'Run as administrator' mode.
If it does not work then, if you have other version of Visual Studio like 2013
then uninstall all and install again.
This is what worked for me (VisualStudio 2015):
Uninstalling NuGetPackageManager in Tools->Extensions and Updates.
Closing all open VisualStudio.
Deleting the cache on C:\Users\user\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache
Restart PC
Install NuGetPackageManager in Tools->Extensions and Updates in a blank application or on the startup VisualStudio screen.
Close every VisualStudio again.
Finally it should work.
I had to follow this process or it did not work.

How to configure Visual Studio project to install dependencies from Nuget

Is there a way to tell Visual Studio that it needs to install some packages (like NetMQ) via Nuget automatically just before the first run of the project?
Visual Studio should do that by default if you're using Visual Studio 2015 and if your package is in your packages.config.
Highlighted options are available in Visual studio 2013 and 2012 as well.

Resources