Conversation
0dee0fc to
e344062
Compare
|
FYI @tmeschter this is the change needed to get VS to actually install the package with CPM enabled. Technically you can build this branch and deploy it to your local experimental instance if you want to also play around with changes on your end. If you're interested in trying that and have problems, let me know. |
nkolev92
left a comment
There was a problem hiding this comment.
I think we're missing one scenario.
|
It might be a good idea to add cross tool no-op tests for these scenarios. NuGet.Client/test/EndToEnd/tests/NetCoreProjectTest.ps1 Lines 165 to 187 in 0da9fda |
I think I need to open a new item to add some end-to-end tests for CPM. The scenario to test here would be to install a new package and check if a restore immediately after no-ops. But there isn't any existing end-to-end tests that configure CPM as far as I can tell. Are you okay with me adding some stuff like this later? I did test the scenario manually and the restore no-ops. |
nkolev92
left a comment
There was a problem hiding this comment.
The immediate change looks fine.
We might need to update the package spec of the parents if they are in the same context to prevent random failures at update time.
|
I filed NuGet/Home#11912 for a future effort to see if we can include other affected projects in the install/update package so that after changes are committed, restore is a no-op. @nkolev92 This is ready for final review |
|
I've also filed an issue to work on end-to-end tests for CPM: NuGet/Home#11913 |
|
@NuGet/nuget-client please review if you want, otherwise I'll merge this afternoon. |
Bug
Fixes: NuGet/Home#11828
Regression? Last working version:
Description
This code is used to modify the in-memory representation of the package spec and is modified to do a preview restore before committing changes via project system. The code needs to set the
VersionCentrallyManagedproperty if central package management is enabled otherwise the restore fails since it thinks the user set the version in a project.PR Checklist
PR has a meaningful title
PR has a linked issue.
Described changes
Tests
Documentation