-
Notifications
You must be signed in to change notification settings - Fork 253
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
dotnet restore does not restore P2P references with ReferenceOutputAssembly=false #4700
Comments
@emgarten i believe this was done intentionally? |
It looks like restore should include this in the recursive restore even though it isn't an actual dependency. The workaround for this is to create a solution containing all projects and restore that. |
What do you mean by that? It's certainly an actual dependency; the referencing project just doesn't use it as a compiler reference. |
I am not able to repro this anymore, it looks like it was fixed with NuGet/NuGet.Client@f140092 |
@emgarten Glad to hear it is fixed, but that link is dead. |
@mellinoe updated, thanks! |
NOTE: I originally filed this issue here: https:/dotnet/cli/issues/5760.
Steps to reproduce
dotnet restore A.csproj
,dotnet msbuild A.csproj
Expected behavior
Both A and B are restored, and both build successfully (because of the P2P reference).
Actual behavior
Only A is restored. When
msbuild
is called on A.csproj, it attempts to build B.csproj first, because of the ProjectReference. This fails because B.csproj has not been restored yet. If B is manually restored, then A can be built. IfReferenceOutputAssembly
is set totrue
(default value), then B.csproj is automatically restored when A.csproj is restored.Environment data
dotnet --info
output:The text was updated successfully, but these errors were encountered: