This repository has been archived by the owner on May 17, 2024. It is now read-only.
This repository has been archived by the owner on May 17, 2024. It is now read-only.
Closed
Description
opened on Mar 17, 2020
Hi. If csproj contains $(Platform)
condition references like:
<!-- x86 specific referneces -->
<ItemGroup Condition=" '$(Platform)' == 'x86' ">
<Reference Include="lib">
<HintPath>..\tstlib\lib.dll</HintPath>
</Reference>
<!-- any additional x86 specific references -->
</ItemGroup>
<!-- x64 specific referneces -->
<ItemGroup Condition=" '$(Platform)' == 'x64' ">
<Reference Include="lib64">
<HintPath>..\tstlib\lib64.dll</HintPath>
</Reference>
<!-- any additional x64 specific references -->
</ItemGroup>
then tool will fail with:
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Immutable.ImmutableDictionary`2.get_Item(TKey key)
at MSBuild.Conversion.Project.ProjectRootElementExtensions.RemoveOrUpdateItems(IProjectRootElement projectRootElement, ImmutableDictionary`2 differs, BaselineProject baselineProject, String tfm) in /_/src/MSBuild.Conversion.Project/ProjectRootElementExtensions.cs:line 195
at MSBuild.Conversion.Project.Converter.ConvertProjectFile() in /_/src/MSBuild.Conversion.Project/Converter.cs:line 69
at MSBuild.Conversion.Project.Converter.Convert(String outputPath) in /_/src/MSBuild.Conversion.Project/Converter.cs:line 28
at MSBuild.Conversion.Program.Run(String project, String workspace, String msbuildPath, Boolean diffOnly, Boolean noBackup) in /_/src/try-convert/Program.cs:line 85
But such, condition references work well in .NET Core too. So, I think try-convert need to transfer them as is...
Activity