If NuGet Targets are pressent, then the project can't be converted
See original GitHub issueHi,
I noticed, that when a import to NuGet.targets is present, (as was added by EF6.3 install), then the project conversion fails with error ‘This project has custom imports in a manner that’s not supported.’
The effected line is:
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
Seems like packages with a path in ‘’ are ignored, maybe the path '\.nuget' should also be ignored?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Opening project in Visual Studio fails due to nuget.targets ...
Install Nuget. Right click on the solution and select "Enable NuGet Package Restore". In Visual Studio 2013 and later, select "Restore NuGet ...
Read more >Troubleshooting NuGet Package Restore in Visual Studio
This error occurs when you attempt to build a project that contains references to one or more NuGet packages, but those packages are...
Read more >NuGet Error NU1004
When restore is run in locked mode, it ensures that the project dependencies have not changed since the last restore.
Read more >Converting projects to use Automatic NuGet restore, using IFix
The first section (above the first red text line) is the nuget targets section. Notice No.1, it says it has found no paths...
Read more >NuGet Restore build issues - project.assets.json doesn't ...
I forgot to try a clean worktree when doing the change. It seems there is a significant difference with the /p:RestorePackagesConfig settings.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jmarolf as I just read in https://docs.microsoft.com/en-us/nuget/consume-packages/package-restore#migrate-to-automatic-package-restore-visual-studio the nuget.targets was added by using the deprecated MSBuild-integrated package restore, so it may be better for me to remove it. Anyway it’s an old feature from VS/NuGet, and in my case it was by chance that it was added with EF 6.3
I have to remove the below line to fix the error in a test project.
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />