dotnet / dotnet/wcf

Visual Studio SvcUtil integration uses xmlparse to read properties where they should be evaluated

Open
#4,658 2 comments 2 reactions 1 assignee Claimed by @imcarolwang View on GitHub
investigation needed tooling triaged
Dominant language
C#
Stars
1.8k
Forks
576
Avg merge
6d 9h
Merged PRs (30d)
2

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*
```


net452



```

*./Client/Client.csproj*
```


$(DefaultTFM)

```

**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.

**Screenshots**
![image](https://user-images.githubusercontent.com/6466560/124125836-5319d800-da7a-11eb-8b02-df1c716df7dd.png)

**Additional context**
A friendly aussie wizard dropped by and found the root cause: https://twitter.com/davkean/status/1410532553530875904

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.