-
Notifications
You must be signed in to change notification settings - Fork 570
Description
Describe the bug
When using property references to control the target framework of a project, svcutils reads the msbuild syntax instead of the actual value crashing the update servicereference option in Visual Studio 2019 16.10.2
.
svcutil
should use either use MSBuild evaluation libraries or receive the values from Visual Studio as parameters. XML parsed values are super suboptimal alltogether - with the advent of Directory.Build.props
etc. lots of projects depend on evaluation to really a get the actual picture of references, properties and such.
To Reproduce
./Directory.Build.props
<Project>
<PropertyGroup>
<DefaultTFM>net452</DefaultTFM>
</PropertyGroup>
<ItemGroup>
<Reference Include="./SampleLib.dll" />
</ItemGroup>
</Project>
./Client/Client.csproj
<Project Sdk="Microsoft.Net.Sdk">
<PropertyGroup>
<TargetFramework>$(DefaultTFM)</TargetFramework>
</PropertyGroup>
</Project>
Expected behavior
svcutil
picks up net452 as the designed targetframework for code generation.
stretch-goal: svcutil
picks up SampleLib.dll as a designated reference to reuse types from.
Additional context
A friendly aussie wizard dropped by and found the root cause: https://twitter.com/davkean/status/1410532553530875904