-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WARNING: Error reading msbuild project information, ensure that your input solution or project file is valid. NETCore and UAP projects will be skipped, only packages.config files will be restored. #9411
Comments
@nkolev92 - feel free to edit my first post above for any corrections necessary. |
Do you think doing this will resolve my issue? If so, I did try running this command, but from cmd or visual studio command prompt both, the nuget command is not recognized. How do I run this? |
Answering my own question: "Install the nuget.exe CLI by downloading it from nuget.org, saving that .exe file to a suitable folder, and adding that folder to your PATH environment variable." https://docs.microsoft.com/en-us/nuget/consume-packages/install-use-packages-nuget-cli It only worked for me after specifying the packages folder using:
|
To help others... |
I share the solution to my case, maybe it'll help someone. |
I have the similar problem as @ignotus87, but I use github actions instead. Approximately 1 of the 10 workflow runs fails because of the identical warning produced by |
If none of your projects have packages.config, if you're only using Since approx VS 16.4 from memory, if you have at least 1 packages.config, use Anyone building their solution with |
@zivkan Thanks for your reply! I replaced |
In NuGet 4.7 and later, we started loading msbuild project files in a faster way. This faster way had the side effect of not being forgiving when loading msbuild project files that have includes to .props/.targets files that don't exist when being evaluated.
when running "nuget.exe restore foo.sln"
you may see: WARNING: Error reading msbuild project information, ensure that your input solution or project file is valid. NETCore and UAP projects will be skipped, only packages.config files will be restored.
The best way to fix this is to hunt down the problems in your projects.
my technique in command prompt if you are in the solution directory:
read through the output to see which project have restore errors and fix those projects.
a workaround to this, which you shouldn't use long term (!!!!):
set RestoreUseSkipNonexistentTargets to false in a project or via envvar:
see https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets#restore-target
The text was updated successfully, but these errors were encountered: