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.
Related
Solution has compiled successfully, but after I added an existing class file to the project, this error appeared:
The specified task executable "csc.exe" could not be run. Could not
load file or assembly 'System.Security.Principal.Windows,
Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or
one of its dependencies. The system cannot find the file
specified. MvcApplicationRegister
I installed System.Security.Principal.Windows package By NuGet, but error still appears.
None of the previous answers worked for me.
The problem was that I didn't have the .NET Compiler Platform SDK installed.
To solve, open Visual Studio Installer, choose "Modify", and under the "Invididual Component" tab, check the .NET Compiler Platform SDK, and confirm your changes by clicking "Modify".
After I installed it and reopened Visual Studio, the problem is gone.
I had the same issue after I upgraded Microsoft.Net.Compiler from 2.8.2 to 2.9.0.
After I downgraded to 2.8.2 projects compiled without any errors.
Had this same issue and resolved it.
In a 3 project solution MVC controller (Web,Business,Data)
Caused by the Microsoft.Net.Compiler 2.9.0 being installed on the Web project but not the other projects.
To resolve:
Right click the solution.
Manage NuGet Packages.
Installed > Search for the compiler
Ensure it is the same version and it is installed on all projects in your solution
Once installed my solution built successfully
If you are using Microsoft.CodeDom.Providers.DotNetCompilerPlatform you can upgrade to 2.x and then remove Microsoft.Net.Compilers as it's no longer needed. That solved it for me, however I couldn't even build the solution in the first place. It was still complaining about System.Security.Principal.Windows though, I could also solve it by referencing System.Security as an assembly. It's not recommended though.
Close down all instances of Visual Studio. Then reopen the solution and rebuild.
I uninstalled both Microsoft.CodeDom.Providers.DotNetCompilerPlatform and Microsoft.Net.Compilers and everything now works.
In my case I could go from Microsoft.Net.Compilers 2.4.0 to Microsoft.Net.Compilers 2.10.0. No need to use Microsoft.Net.Compilers 2.8.2.
I do not like removing packages without first understanding what I'm removing. I faced the same problem with my solution.
I discovered that 1 of the many projects was using the Microsoft.Net.Compilers NuGet package - let's call it Project ABC. A Unit Test project was referencing that Project ABC, but not the Microsoft.Net.Compilers NuGet package.
I simply referenced the Microsoft.Net.Compilers NuGet package from my Unit Test project, and the problem has now gone away.
Updating Microsoft.CodeDom.Providers.DotNetCompilerPlatform and deleting Microsoft.Net.Compilers worked for me.
I had the same issue here using 'System.Security.Principal.Windows' version 4.7.0. For some reason when I installed the nuget package it was referecing the dll from the folder: C:\Users\{your-user}\.nuget\packages\system.security.principal.windows\4.7.0\ref\netstandard2.0\System.Security.Principal.Windows.dll then I changed to reference the dll from the folder C:\Users\{your-user}\.nuget\packages\system.security.principal.windows\4.7.0\lib\netstandard2.0\System.Security.Principal.Windows.dll and everything worked just fine! So I copied the dll from the lib folder to my project and made a direct reference.
I'm getting the following error:
This project references NuGet packages(s) that are missing on this computer. Use Nuget Package Restore to download them... This missing file is ..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets
When I run "Install-Package Microsoft.Bcl.Build -Version 1.0.21" in my Package Manager Console nothing happens.
I've tried to unload the project but, when I right click on the project name I don't see an option for "Unload".
This is the only error I'm seeing when I build the project.
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 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.
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'