Skip to content
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

Clarify NU1105 #1923

Merged
merged 2 commits into from
Feb 28, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion docs/reference/errors-and-warnings/NU1105.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,17 @@ f1_keywords:
The project file exists but no restore information was provided for it.

### Solution
In Visual Studio, the error could mean that the project is unloaded, in which case reload the project. From the command line this could mean that the file is corrupt or that it doesn't contain the custom "after imports" target needed for restore to read the project. Check that the project file is valid and contains an "after imports" target.

#### Command line

From the command line this could mean that the file is corrupt or that the `NuGet.targets` are not imported.
To import the `NuGet.targets`, usually it's recommended to import the `Microsoft.Common.targets`.

#### Visual Studio

In Visual Studio the error could mean that targets are not import similar to the command line scenario.

The error could also mean that the project is unloaded.

* If you are using Visual Studio 2019 or later, NuGet has the ability to re-use artifacts from the previous restore for unloaded projects. In order for this scenario to work, you need to ensure that all projects currently in the solution have been restored from the command line prior to loading them in Visual Studio.
* Alternatively, just reload the project.
karann-msft marked this conversation as resolved.
Show resolved Hide resolved