-
Notifications
You must be signed in to change notification settings - Fork 258
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
Different restore behavior in IDE / command line for PrivateAssets #6367
Comments
Add a non-reference to FSharp.Core in all projects to work around the IDE restore bug for PrivateAssets NuGet/Home#6367
Add a non-reference to FSharp.Core in all projects to work around the IDE restore bug for PrivateAssets NuGet/Home#6367
This is still a problem in 15.6 |
The use of PrivateAssets in an attribute causes a restore difference in the VS IDE and the command line. The IDE restore will ignore the PrivateAssets element and flow it to dependent projects. Moving to an element avoids this problem. NuGet/Home#6367 dotnet/project-system#3493
Is there any ETA for this issue? This makes it very difficult for developers to contribute to my project. In order to edit my solution they must:
Step 2 must be repeated every time that a change is made to the project file. Whenever a developer forgets to do this they encounter all manner of build errors in the IDE. |
Restoring in VS worked fine for me, it didn't have I don't think it will matter but I tried with latest VS 15.7.1 |
@jainaashish the initial restore will often work. Once you edit slightly and rebuild then the restore which occurs as a part of build will fail. The repro is a bit intermittent but it does show up. I can provide logs if that helps. |
@jainaashish I tested out on 15.7 and I'm immediately stuck by a different bug (or at least restore behavior change). Now I get the following:
This is a new behavior with 15.7. It will repro on command line and IDE. Same code works just fine in 15.6. Joyful. Need to track this down before I can get back to reproducing the original bug. Even if it doesn't reproduce though I don't really feel that is sufficient. There was no action taken here, and no visible understanding of what was wrong. How can we be confident this won't happen again? |
@jainaashish the description in the linked AppVeyor bug has another repro of this issue. Copied here for simplicity:
When using NuGet 4.3.0 you will hit this bug. I'm not sure on which other builds this bug will occur (does not occur in 4.6.2). But the behavior is easy to see. |
@jaredpar I'm lil confused as where this bug exactly repro's? so let me summarize what I understood and correct me if I'm wrong:
So, I'll look into this VS specific issue and see, if I can repro it locally and investigate. |
@jaredpar I saw the issue with But I'm still not able to repro it even once in VS with 15.7 release so can you please share the detailed logs when you see this issue and clear repro steps to repro inside VS? |
I see the same. I think this is the repro to focus on. It happens every time and it is the original repro that I was seeing.
I'm unable to reproduce it in the IDE due to #6936. That blocks IDE work on the setup where the bug occurs. |
I don't think this is the repro to focus on, since this doesn't repro with latest |
This bug investigation keeps getting delayed. The repro I've provided now both:
Not sure why this would be delayed at this point. There is a clear behavior change from 4.3.0 to 4.6.0 that has no explanation. If the decision is to delay now I'm unsure when there would ever be a good time to look at this bug. If the bug is fixed that's great. But given the behavior change wasn't identified it seems probable it could regress again. |
This has come up yet again with VS 15.8 Preview 4. Once again I'm completely unable to develop my project because of this restore. EDIT Bug also rerpoduces on Preview 5 |
Can we please remove the "NeedsRepro" tag from this issue? There have been several clear repros given that the team has acknowledged in the past. Continuing to keep this label makes the issue look misleading unless you read the thread. |
Note: with 15.8 Preview 4 the bug will reproduce from the command line. I have not checked the IDE. Simple repro:
There will be lots of errors around types that exist in FSharp.Core and Vim.Core. |
Disable the implicit reference to FSharp.Core the F# targets add to projects. This lets the PackageReference in VimCore specify the version and control items like private assets fully. Related: NuGet/Home#6367
VS16.5.5 still has this problem for us, breaking build. |
Dup of #9864. tldr; when duplicates includes of PackageReference items exist, commandline picks first, VS picks second. I understand the other issue is newer, but it contains more engagement. I have confirmed that my suspicion is correct by putting a |
NuGet Version Used: VS 15.5.2 && VS 15.3.5
I'm seeing a restore behavior difference for a package reference marked as
<PrivateAssets>all</PrivateAssets>
between the IDE and command line. The intent here is to keep the reference and all its assets from flowing into the projects that reference it.In the command line scenario, driven by msbuild.exe, the scenario behaves as expected. The
PackageReference
is completely absent from the project.assets.json file of the referencing project. In the IDE scenario though thePrivateAssets
is not respected, thePackageReference
ends up in the referencing project and the build fails.Here is the structure of the
PackageReference
I'm using:Detailed repro instructions below. Note that in order to run the repro below you will need to have the F# workload installed into Visual Studio.
msbuild /v:m /m /t:Restore VsVim.sln
. At this point you can examine the project.assets.json file fromBinaries\obj\VimWpf\project.assets.json
and notice that the FSharp.Core reference is missing (as is expected).msbuild /v:m /m VsVim.sln
and notice the build succeedsNow to see the bug repro do the following
git clean -dxf .
FSharp.Option
Binaries\obj\VimWpf\project.assets.json
and notice that the FSharp.Core reference is present. This is not expected.The text was updated successfully, but these errors were encountered: