DNT icon indicating copy to clipboard operation
DNT copied to clipboard

Keep PrivateAssets on switch-to-projects and back

Open jeremyVignelles opened this issue 4 years ago • 3 comments

I have a package that is referenced like this:

<PackageReference Include="MyPackage" Version="1.0.0-beta01" PrivateAssets="None" />

When I switch-to-projects and switch-to-packages, the PrivateAssets part is dropped.

Would it be possible to save such properties?

jeremyVignelles avatar Jun 19 '20 16:06 jeremyVignelles

Makes sense to keep it in this config file so that the restore (switch-to-packages) reverts the csproj as it was before.

RicoSuter avatar Sep 29 '20 13:09 RicoSuter

Any news about this issue ? I currently also have basicly a similar Problem with

<PackageReference Include="MyPackage" Version="1.0.0" IncludeAssets="compile" />

IMHO every additional XML Attribute should be preserved and restored after switch back to packages

Thank you :-)

LORDofDOOM avatar Dec 20 '21 07:12 LORDofDOOM

Hi

I've faced the same issue with <ExcludeAssets>...</ExcludeAssets> sub-node of PackageReference node. Once I do switch-to-projects and then go back with switch-to-packages the ExcludeAssets node disappears. As a result I have to add it back manually, that might be time consuming.

alexander-lysenko-88 avatar Jan 05 '22 15:01 alexander-lysenko-88