Microsoft.NET.ApiCompat causes newly added project to fail restore
Open
Area-ApiCompat
untriaged
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
When a new project is added to a repository that sets `EnablePackageValidation=true` `dotnet restore` fails:
```
MyProject.csproj : error NU1102:
Unable to find package MyProject with version (= 13.0.2)
```
This is because `Microsoft.NET.ApiCompat.targets` try to download the baseline version of the package, which doesn't exist since it's a new project.
It should be possible to restore project. Any warnings/errors about newly added APIs should be clear and only reported during build. Besides, the project might not even have any public APIs.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.