I wanted to use Orchard-Cms in visual studio, so I cloned its repository from GitHub to my local folder. I opened the orchard project from the folder and tried to build the solution but it didn't work. Now I am getting more than 2000 errors. I tried solving this by restoring the packages from nuget package manager but there also i got error saying
an error occurred while trying to restore packages:Unable to find version '3.2.3' of the package 'Microsoft.AspNet.Razor'
How can I resolve this issue?
Okay it was an easy fix, apparently the feature to restore packages online was turned off, which i turned back on from the nuget package manager window, now its all working.
Related
Error:
The build restored NuGet packages. Build the project again to include
these packages in the build. For more information, see
http://go.microsoft.com/fwlink/?LinkID=317568
I get this error while building code in Visual Studio 2017.
As a workaround I have to clean the code and build again. Then I don't see this error.
Every time O build this error comes back. I have to clean first and then build. Anyone having similar issue?
Turning the comment from #sɐunıɔןɐqɐp into an answer
Run this command in the Package Manager Console
Update-Package -reinstall
Try to update "Microsoft.Bcl.Build" nuget package. This was the solution for me.
I have a large project that has about a dozen dependencies. I have tried to install them all but ran into an error from VS. I am using Visual Studio 2015
"An error occurred while trying to restore packages: Unable to find version '3.0.3.1' of package'Lucene.Net.Core'."
Now I have a solution which I can use that is by the same name as this package, but VS refuses to let me updates, remove, or change ANYTHING related to these packages and asks that I restore the packages. I am entirely lost here friends, what should I do?
P.S. the two sources I am using for my package sources are:
https://www.nuget.org/api/v2/
https://www.nuget.org/api/v2/curated-feeds/microsoftdotnet/
The same error occurs for Lucene.Net.Contrib, pstsdk.net, and various packages.
One thing to check for is if your project is built on a version of the NET framework that is less than or equal to the target framework the package has.
If your project is a NET 4.5 based project, but the nuget package has a NET 4.5.2... then the package manager will error out.
"An error occurred while trying to restore packages: Unable to find version '3.0.3.1' of package'Lucene.Net.Core'."
When I use the packages sources which you provided, I found that only two versions (4.8.0 & 4.9.0) of package"Lucene.Net.Core" not have the version '3.0.3.1'.
Pay Attention:
I noticed that the author of this package have updated this package at March 11, 2017(3/11/2017), and only release the version 4.8.0 & 4.9.0. So this must be the reason for NuGet restore failed.
Besides, you said:
I have a solution which I can use that is by the same name as this
package, but VS refuses to let me updates, remove, or change ANYTHING
related to these packages
If you want to remove those error packages, you can try to use below command to force uninstall those packages:
Uninstall-Package Lucene.Net.Core -Force
Or you can delete this package from the package folder and delete the package list from the package.config.
Then install the correct version of the packages.
Although I was not able to get any of the posted answers to work, I ended up removing the project entirely and reinstalling VS, my project, and its dependencies. This ended up working.
Another thing to check is that the package manager configuration settings in visual studio list the public nuget feed (and if the feed is enabled too).
I am currently in the process of upgrading from Entity Framework 4.0 to 5.0. In order to do this I am required to open the Visual Studio package manager and execute:
install-package entityframework -pre
The problem is, when I run this command I get the following error message:
The problem is, 'gmts-logger' is not a NuGet package, it is a local project, so I don't understand why NuGet has anything to do with it.
I'm stumped. How do I resolve this?
This error occurs when gmts-logger does not exist on the way provided in Reference path.
Try to do following steps:
Right click your project and choose Unload Project
After it's unloaded right click your solution and pick edit your project
find Reference for gmts-logger and correct path where it physically exists
Reload project and via NuGet Package manager install entityframework
I resolved the issue by navigating to each of my projects and removing all references to 'gmts-logger' from all of the 'packages.config' files.
I have been using xamarin studio, it works fine when I download a sample project from mvvmcross. It compiles and deploys the device perfectly.
But when I open the project in the visual studio, there are a lot of missing packages for some reasons. Is there a way of handling ? I am using Nuget 2.8 in Visual studio 2013
When I open Nuget as follows, there is a button to restore the missing packages. I clicked on it.
Then it is attempting to download the missing packages, and then it realizes there are dependencies as follows:
Then I am attempting to download the dependency manually as follows but it shows the packages has already downloaded but I am still seeing the missing packages in the solution, nothing is affected.
Therefore I am getting hundreds of errors as follows:
When I take a look at the property of missing packages, I see as follows
You should update your NuGet Package Manager extension in Visual Studio and then try restoring the packages again.
The restore error MvvmCross.Binding already has a dependency defined for MvvmCross.Core is caused by an old version of the NuGet package manager extension not recognising the newer target frameworks that the MvvmCross.Binding NuGet package is using in its group dependencies. This bug has been fixed in a newer version of the NuGet Package Manager.
If you search for the 'already has a dependency defined' error message you will find several cases of this, such as this StackOverflow question, for example:
Can not install NuGet package
Right click on the solution in solution explorer and choose 'restore nuget packages'
So i created a new solution. Added all my projects to it. Downloaded all the nuget packages.
I checked it all in. On another pc I pulled the solution down. I hit build and I get a tonne of errors relating to not being able to find the dll of the packages.
So I set automatically download packages if they're missing. Still nothing works. Why is this?
When I Enabled it, it came back with an error saying that it could not modify the projects because they were locked.... This is why I want to re-enable the context menu item that allows me to enable nuget to automatically download missing packages.
I think the problem is I checked in all the packages. They all got download onto the other machine, that's why NuGet was saying that I already had the packages.
I solved this by going into the solution directory (physical path) and deleted the packages folder.
Then I built the project, and true to NuGets word it downloaded all the packages again. It also succeeded in building the application, no errors!
I would advise that if you are going to enable the NuGet package restore that you check out the solution first, once you're done check in the solution!