if I update nuget.exe to v4.3.0, then I use this nuget.exe to restore the package for the WiX Toolset project(not reference other project), I would get the error "error MSB4057: The target "_IsProjectRestoreSupported" does not exist in the project." Is that expected? I can restore it successfully on the NuGet v4.1.0.
NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe):
NuGet.exe
NuGet version (x.x.x.xxx):
v4.3.0
VS version (if appropriate):
VS2017 15.3.5
OS version (i.e. win10 v1607 (14393.321)):
Win 10
Worked before? If so, with which NuGet version:
Yes, v4.1.0
2.Use nuget.exe 4.3.0 restore package for this project, the command line is:
nuget.exe restore "C:\Users\Admin\Documents\Visual Studio 2017\Projects\SetupProject1\SetupProject1.sln" -ConfigFile "C:\Users\Admin\AppData\Roaming\NuGet\NuGet.Config" -NoCache -NonInteractive -Verbosity detailed
C:\Users\Admin\Documents\Visual Studio 2017\Projects\SetupProject1\SetupProject1\SetupProject1.wixproj : error MSB4057: The target "_IsProjectRestoreSupported" does not exist in the project.
C:\Users\Admin\Documents\Visual Studio 2017\Projects\SetupProject1\SetupProject1\SetupProject1.wixproj : warning NU1503: Skipping restore for project 'C:\Users\Admin\Documents\Visual Studio 2017\Projects\SetupProject1\SetupProject1\SetupProject1.wixproj'. The project file may be invalid or missing targets required for restore. [C:\Users\Admin\AppData\Local\Temp\NuGetScratch\qbcbt5xq.jzs.nugetinputs.targets]
C:\Users\Admin\AppData\Local\Temp\NuGetScratch\gtzkott2.4zo.nugetrestore.targets(131,5): warning : Unable to find a project to restore! [C:\Users\Admin\AppData\Local\Temp\NuGetScratch\qbcbt5xq.jzs.nugetinputs.targets]
Please include verbose logs (NuGet.exe 
@liushuanggang this message is expected, but it should not block your restore. Are you seeing a failure? What is the exit code of nuget.exe?
-verbosity detailed will always show these messages, but on normal verbosity it should be hidden unless this is a failure.
In the future once msbuild provides a way to skip projects that are missing a target this message will go away: https://github.com/Microsoft/msbuild/issues/2471
@emgarten, yes, you are right. It does not block my restore. Thanks for your reply. I will close this thread. :)
@liushuanggang thanks for checking, I'm hoping to improve this experience in the future. :smile:
I have exactly the same problem! After falling back to v4.1 it is working!
Most helpful comment
@liushuanggang thanks for checking, I'm hoping to improve this experience in the future. :smile: