Resharper changing Nuget package DLLs when Visual Studio starts - visual-studio-2012

I'm having an issue with my solution, where opening Visual Studio will cause some of my Nuget package DLLs to be overridden.
I've found this only happens when Resharper is installed. Uninstalling it, or suspending it makes the problem go away.
I'm finding that it's only happening for Nuget packages in my local repository, and the overridden DLLs look incomplete (possibly an older version, but still signed as the latest version). Building the solution then fails. I need to revert the DLLs in source control, then build for it to work.
I've tried finding references to old versions of the Nuget package in my solution, but there aren't any.
Does anyone know how to stop Resharper changing my DLLs when Visual Studio loads?
And, any suggestions about what might be the bigger issue with my Nuget packages?

Issue, seems, that you changed your local copy of DLL from package content in packages folder.
It's bad practice. If you need to modify DLL inside some package - you better to create your own package with necessary DLLs.

Related

NuGet asks to restore unneeded package, unable to find package reference

In Visual Studio 2012 with the NuGet Package Manager, NuGet prompts to restore version 9.0.1 of the package Json.NET. When I click the Restore button, the restore fails. This occurs even after removing Json.NET from every project in my solution.
The below screenshot shows that Json.NET is no longer installed locally, and that the requested package restore fails.
I would like to figure out why NuGet still thinks it needs this package, even though it's no longer referenced in any projects. I have even searched the contents of the .csproj files for the projects for references to the Newtonsoft.Json assembly, but there are none.
Update and answer:
Jeff Block's post below was the answer. There is a packages.config file for the solution. I thought I had deleted it through Visual Studio, but it had only been removed from the Solution Explorer. Deleting the file on the file system stopped NuGet from looking for that package.
Is the package being included from $(SolutionDir).nuget\packages.config or a 'solution level' configuration file?
Sorry for answering with a question, I apparently cannot make a comment on your question until I have earned reputation.

I cannot see all versions of a NuGet Pacakge

I am doing some investigation of NuGet to determine if I can use it to distribute various software components. All of these components are C++ based so I'm using CoApp PowerShell Tools to create the NuGet package files. I have placed these .nupkg files on a network folder for distribution. However, when accessing the packages via Visual Studio 2012, I can only see the latest version. Is there a way to view all of the versions of a particular package?
Here is the network folder:
Here is what I see in Visual Studio 2012:
You're supposed to only see the latest version. If you want to install a specific version, you'll have to use the Package Manager Console.
Install-Package SYS_STANDARDS -Version 1.3.1.0
If that isn't acceptable for your requirements, then Nuget isn't the best way to distribute your code.
Newer versions of Visual Studio have a drop down menu that can be opened to view and select different versions of a package

Where has nuget support in Resharper 9 gone?

I recently updated Resharper to version 9.0. Now I noticed that adding references by Resharper context menu does no longer update the packages.config file, thus breaking the match between referenced DLLs and installed packages.
For older versions of Resharper, this functionality was provided by a plugin, but the plugin does not seem to support Resharper 9.0. Also, I am unable to find something similar through the Resharper Extension Manager.
What is the correct way to add Nuget packages to packages.config when adding references with Resharper 9.0?
NuGet support was shipped as a bundled plug-in in ReSharper 8. Currently this plugin is still not adopted to ReSharper 9, so you have to wait till it will become compatible, sorry.
But it will become compatible relatively soon, hopefully.
Update: According to the creator of the plugin, this functionality will be shipped with Resharper 9.1, see this issue for the announcement.
That means with Resharper 9.0 we have to keep the packages.config in sync with the references manually.

Are you missing a using directive or an assembly reference error when all other dependent projects compile

Please watch this screencast as a video would say a thousand pictures:
https://dl.dropbox.com/u/84476328/ShareX/2013-10/2013-10-26_06-49-48.mp4
I recently installed Visual Studio 2013 and attempted to compile a perfectly working Visual Studio 2012 solution.
Start-up project is ShareX and I can compile all other dependent projects as shown in the screencast. When it gets to compiling the main project, it fails.
I have no idea how this could happen.
All projects are on .NET Framework 3.5.
Entire solution was fully compilable in Visual Studio 2012.
I have removed references and re-added them to no avail.
Appreciate any pointers in the right direction.
It turned out to be a problem with Nuget. The following source code changes in all the csproj files fixed it. I am linking it for future reference just in case another person stumbles across the same problem:
https://code.google.com/p/sharex/source/detail?r=742
I just experienced this problem as well (Win7, VS2012, C#, WinForms). My solution includes a personal "framework" DLL project that I reference directly, the main EXE project and a UnitTests project. I admit I moved the directory structure around a bit and hand edited the relative paths of the solution in Notepad++. A few builds/hours later I was getting hundreds of errors stemming from the framework DLL project being mysteriously missing.
Here's what fixed the situation for me:
Remove the offending project(s) from the solution.
Save the solution.
Add project(s) back to solution.
Update the project-project dependencies
Update references to the solution's project(s).
Save
Clean
Verify build order
Verify configuration manager
Rebuild solution

Manage NuGet Packages For Solution - where is it?

I have just installed VS2012 and have noticed that in the Tools >> Library Package Manager option that Manage NuGet Packages For Solution is missing.
Package Manager Console and Package Manager Settings are available but the option I mentioned is not there.
I attempted to download Nuget and then restart VS2012 but nothing has changed.
Also, when I installed Vistual Studio I included all the libraries available, so I am not sure how I have missed it?
Could anyone tell me how to get the Manage NuGet Packages option onto VS2012?
I don't know if you can without opening a solution. Once you do go to the Solution Explorer, right click on solution and there is the option as Manage NuGet Packages for Solution. Opening the solution also makes appear extra options in the Tools -> Library Package Manager: Manage NuGet Packages for Solution and Package Visualizer.
Edit
As #atconway said in the comment, you can't do it while debugging.
You must have it in debug mode, stop the if you are debugging and you will see 'Manage NuGet Package for solution' in the list.
On the Tools menu, click the Extensions and updates.
You might be in the debugging mode(application might be running).
Go to
Debug-> Stop Debugging
Now you will be able to see "Manage NuGet Packages For Solution" under
Tools> NuGet Package Manager> Manage NuGet Packages For Solution
Tools > Extension Manager > Online Gallery;
You will see "Manage NuGet Packages For Solution" and press download.
After finishing download, Save your project first, and restart your Visual Studio, that's all.

Resources