VS2017 nuget keeps searching for packages in wrong location
up vote
1
down vote
favorite
So I migrated from nuget packages.config to PackageReference and found out there were some compatibility issues. I reverted the project to its working state (before the PackageReference) and now my project is not compiling.
I get the following error:
Severity Code Description Project File Line Suppression State
Error The package EntityFramework with version 6.2.0 could not be found in C:Usersuser.nugetpackages. Run a NuGet package restore to download the package. DbManager
This happened to multiple packages. It seems that Nuget is searching for packages in the user.netpackage directory for some reason. Originally, there was a folder within the project that contained all the packages.
I forced the global path to be at the folder within the project by editing the NuGet.Config file.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="repositoryPath" value="C:ProjectsAppApp Sourcepackages" />
<add key="globalPackagesFolder" value="C:ProjectsAppApp Sourcepackages" />
</config>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<bindingRedirects>
<add key="skip" value="False" />
</bindingRedirects>
</configuration>
I don't know why Nuget keeps looking for packages at that location. It should be looking at the packages folder within the project.
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.2.0" targetFramework="net46" />
<package id="EntityFramework6.Npgsql" version="3.1.1" targetFramework="net46" />
<package id="Npgsql" version="3.2.7" targetFramework="net46" />
<package id="System.Threading.Tasks.Extensions" version="4.3.0" targetFramework="net46" />
<package id="Z.EntityFramework.Plus.EF6" version="1.7.17" targetFramework="net46" />
</packages>
All of these packages in packages.config are not being found. This problem started happening when I tried PackageReference.
Is there any way to reset Nuget's settings? I would appreciate any guidance in solving this problem.
visual-studio nuget-package nuget-package-restore packagereference
add a comment |
up vote
1
down vote
favorite
So I migrated from nuget packages.config to PackageReference and found out there were some compatibility issues. I reverted the project to its working state (before the PackageReference) and now my project is not compiling.
I get the following error:
Severity Code Description Project File Line Suppression State
Error The package EntityFramework with version 6.2.0 could not be found in C:Usersuser.nugetpackages. Run a NuGet package restore to download the package. DbManager
This happened to multiple packages. It seems that Nuget is searching for packages in the user.netpackage directory for some reason. Originally, there was a folder within the project that contained all the packages.
I forced the global path to be at the folder within the project by editing the NuGet.Config file.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="repositoryPath" value="C:ProjectsAppApp Sourcepackages" />
<add key="globalPackagesFolder" value="C:ProjectsAppApp Sourcepackages" />
</config>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<bindingRedirects>
<add key="skip" value="False" />
</bindingRedirects>
</configuration>
I don't know why Nuget keeps looking for packages at that location. It should be looking at the packages folder within the project.
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.2.0" targetFramework="net46" />
<package id="EntityFramework6.Npgsql" version="3.1.1" targetFramework="net46" />
<package id="Npgsql" version="3.2.7" targetFramework="net46" />
<package id="System.Threading.Tasks.Extensions" version="4.3.0" targetFramework="net46" />
<package id="Z.EntityFramework.Plus.EF6" version="1.7.17" targetFramework="net46" />
</packages>
All of these packages in packages.config are not being found. This problem started happening when I tried PackageReference.
Is there any way to reset Nuget's settings? I would appreciate any guidance in solving this problem.
visual-studio nuget-package nuget-package-restore packagereference
I had a similar issue and resolved it by clearing the NuGet caches (VS => Tools => Options =>NuGet Package Manager => Clear Caches)
– Lennart
Nov 15 at 11:15
Tried that. Did not change anything. It keeps looking for packages at the default nuget global path (under users)... I'm considering doing a clean install but I'm not sure which is the problem: my local project, Nuget, or Visual Studios
– Steven
Nov 16 at 0:08
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
So I migrated from nuget packages.config to PackageReference and found out there were some compatibility issues. I reverted the project to its working state (before the PackageReference) and now my project is not compiling.
I get the following error:
Severity Code Description Project File Line Suppression State
Error The package EntityFramework with version 6.2.0 could not be found in C:Usersuser.nugetpackages. Run a NuGet package restore to download the package. DbManager
This happened to multiple packages. It seems that Nuget is searching for packages in the user.netpackage directory for some reason. Originally, there was a folder within the project that contained all the packages.
I forced the global path to be at the folder within the project by editing the NuGet.Config file.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="repositoryPath" value="C:ProjectsAppApp Sourcepackages" />
<add key="globalPackagesFolder" value="C:ProjectsAppApp Sourcepackages" />
</config>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<bindingRedirects>
<add key="skip" value="False" />
</bindingRedirects>
</configuration>
I don't know why Nuget keeps looking for packages at that location. It should be looking at the packages folder within the project.
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.2.0" targetFramework="net46" />
<package id="EntityFramework6.Npgsql" version="3.1.1" targetFramework="net46" />
<package id="Npgsql" version="3.2.7" targetFramework="net46" />
<package id="System.Threading.Tasks.Extensions" version="4.3.0" targetFramework="net46" />
<package id="Z.EntityFramework.Plus.EF6" version="1.7.17" targetFramework="net46" />
</packages>
All of these packages in packages.config are not being found. This problem started happening when I tried PackageReference.
Is there any way to reset Nuget's settings? I would appreciate any guidance in solving this problem.
visual-studio nuget-package nuget-package-restore packagereference
So I migrated from nuget packages.config to PackageReference and found out there were some compatibility issues. I reverted the project to its working state (before the PackageReference) and now my project is not compiling.
I get the following error:
Severity Code Description Project File Line Suppression State
Error The package EntityFramework with version 6.2.0 could not be found in C:Usersuser.nugetpackages. Run a NuGet package restore to download the package. DbManager
This happened to multiple packages. It seems that Nuget is searching for packages in the user.netpackage directory for some reason. Originally, there was a folder within the project that contained all the packages.
I forced the global path to be at the folder within the project by editing the NuGet.Config file.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="repositoryPath" value="C:ProjectsAppApp Sourcepackages" />
<add key="globalPackagesFolder" value="C:ProjectsAppApp Sourcepackages" />
</config>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<bindingRedirects>
<add key="skip" value="False" />
</bindingRedirects>
</configuration>
I don't know why Nuget keeps looking for packages at that location. It should be looking at the packages folder within the project.
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.2.0" targetFramework="net46" />
<package id="EntityFramework6.Npgsql" version="3.1.1" targetFramework="net46" />
<package id="Npgsql" version="3.2.7" targetFramework="net46" />
<package id="System.Threading.Tasks.Extensions" version="4.3.0" targetFramework="net46" />
<package id="Z.EntityFramework.Plus.EF6" version="1.7.17" targetFramework="net46" />
</packages>
All of these packages in packages.config are not being found. This problem started happening when I tried PackageReference.
Is there any way to reset Nuget's settings? I would appreciate any guidance in solving this problem.
visual-studio nuget-package nuget-package-restore packagereference
visual-studio nuget-package nuget-package-restore packagereference
asked Nov 15 at 0:45
Steven
233
233
I had a similar issue and resolved it by clearing the NuGet caches (VS => Tools => Options =>NuGet Package Manager => Clear Caches)
– Lennart
Nov 15 at 11:15
Tried that. Did not change anything. It keeps looking for packages at the default nuget global path (under users)... I'm considering doing a clean install but I'm not sure which is the problem: my local project, Nuget, or Visual Studios
– Steven
Nov 16 at 0:08
add a comment |
I had a similar issue and resolved it by clearing the NuGet caches (VS => Tools => Options =>NuGet Package Manager => Clear Caches)
– Lennart
Nov 15 at 11:15
Tried that. Did not change anything. It keeps looking for packages at the default nuget global path (under users)... I'm considering doing a clean install but I'm not sure which is the problem: my local project, Nuget, or Visual Studios
– Steven
Nov 16 at 0:08
I had a similar issue and resolved it by clearing the NuGet caches (VS => Tools => Options =>NuGet Package Manager => Clear Caches)
– Lennart
Nov 15 at 11:15
I had a similar issue and resolved it by clearing the NuGet caches (VS => Tools => Options =>NuGet Package Manager => Clear Caches)
– Lennart
Nov 15 at 11:15
Tried that. Did not change anything. It keeps looking for packages at the default nuget global path (under users)... I'm considering doing a clean install but I'm not sure which is the problem: my local project, Nuget, or Visual Studios
– Steven
Nov 16 at 0:08
Tried that. Did not change anything. It keeps looking for packages at the default nuget global path (under users)... I'm considering doing a clean install but I'm not sure which is the problem: my local project, Nuget, or Visual Studios
– Steven
Nov 16 at 0:08
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53310899%2fvs2017-nuget-keeps-searching-for-packages-in-wrong-location%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I had a similar issue and resolved it by clearing the NuGet caches (VS => Tools => Options =>NuGet Package Manager => Clear Caches)
– Lennart
Nov 15 at 11:15
Tried that. Did not change anything. It keeps looking for packages at the default nuget global path (under users)... I'm considering doing a clean install but I'm not sure which is the problem: my local project, Nuget, or Visual Studios
– Steven
Nov 16 at 0:08