Skip to content

PM UI multi targeting experience is incomplete - support for updating and uninstalling conditional package versions #4681

@mishra14

Description

@mishra14

If you have a package reference in multiple conditional item groups, then PM UI does not update all occurrences of the package.

Repro Steps-

  1. Start with -
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>netstandard1.0;netstandard1.3;net45;uap10.0;portable-win81+wpa81;win8;wpa81;wp8</TargetFrameworks>
  </PropertyGroup>
</Project>
  1. Install NUnit v3.4.0 -
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>netstandard1.0;netstandard1.3;net45;uap10.0;portable-win81+wpa81;win8;wpa81;wp8</TargetFrameworks>
  </PropertyGroup>
  <ItemGroup Condition="'$(TargetFramework)' == 'win8'">
    <PackageReference Include="NUnit">
      <Version>3.4.0</Version>
    </PackageReference>
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)' == 'wp8'">
    <PackageReference Include="NUnit">
      <Version>3.4.0</Version>
    </PackageReference>
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)' == 'uap10.0'">
    <PackageReference Include="NUnit">
      <Version>3.4.0</Version>
    </PackageReference>
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)' == 'wpa81'">
    <PackageReference Include="NUnit">
      <Version>3.4.0</Version>
    </PackageReference>
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)' == 'net45'">
    <PackageReference Include="NUnit">
      <Version>3.4.0</Version>
    </PackageReference>
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)' == 'portable-win81+wpa81'">
    <PackageReference Include="NUnit">
      <Version>3.4.0</Version>
    </PackageReference>
  </ItemGroup>
</Project>
  1. Update NUnit to v3.6.0 through the PM UI -
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>netstandard1.0;netstandard1.3;net45;uap10.0;portable-win81+wpa81;win8;wpa81;wp8</TargetFrameworks>
  </PropertyGroup>
  <ItemGroup Condition="'$(TargetFramework)' == 'win8'">
    <PackageReference Include="NUnit">
      <Version>3.4.0</Version>
    </PackageReference>
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)' == 'wp8'">
    <PackageReference Include="NUnit">
      <Version>3.4.0</Version>
    </PackageReference>
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)' == 'uap10.0'">
    <PackageReference Include="NUnit">
      <Version>3.4.0</Version>
    </PackageReference>
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)' == 'wpa81'">
    <PackageReference Include="NUnit">
      <Version>3.4.0</Version>
    </PackageReference>
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)' == 'net45'">
    <PackageReference Include="NUnit">
      <Version>3.4.0</Version>
    </PackageReference>
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)' == 'portable-win81+wpa81'">
    <PackageReference Include="NUnit">
      <Version>3.4.0</Version>
    </PackageReference>
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="NUnit" Version="3.6.0" />
  </ItemGroup>
</Project>

After the third step, we add an unconditional reference to NUnit v3.6.0 without removing existing conditional package references. This leads to a customer bug - vsfeedback/812089

Related: #5521

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions