question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

If NuGet Targets are pressent, then the project can't be converted

See original GitHub issue

Hi, 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:open
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Lohnegrimcommented, Nov 8, 2019

@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

0reactions
sundeepyamacommented, Dec 1, 2020

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')" />

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found