GenAPI generates invalid '$' token in method name
See original GitHub issueRunning GenAPI on Microsoft.Build,16.10.0 (via SBRP) generates the following method
namespace Microsoft.Build.Graph
{
public partial class GraphBuildOptions : System.IEquatable<GraphBuildOptions>
{
...
public virtual GraphBuildOptions <Clone>$() { throw null; }
...
This causes compiler errors:
/repos/source-build-reference-packages/artifacts/source-build/self/src/src/referencePackages/src/microsoft.build/16.10.0/lib/net5.0/Microsoft.Build.cs(2558,49): error CS1519: Invalid token ‘$’ in class, record, struct, or interface member declaration [/repos/source-build-reference-packages/artifacts/source-build/self/src/src/referencePackages/src/microsoft.build/16.10.0/Microsoft.Build.16.10.0.csproj::TargetFramework=net5.0] [/root/.nuget/packages/microsoft.dotnet.arcade.sdk/8.0.0-beta.23168.1/tools/Build.proj] /repos/source-build-reference-packages/artifacts/source-build/self/src/src/referencePackages/src/microsoft.build/16.10.0/lib/net5.0/Microsoft.Build.cs(2558,49): error CS1056: Unexpected character ‘$’ [/repos/source-build-reference-packages/artifacts/source-build/self/src/src/referencePackages/src/microsoft.build/16.10.0/Microsoft.Build.16.10.0.csproj::TargetFramework=net5.0] [/root/.nuget/packages/microsoft.dotnet.arcade.sdk/8.0.0-beta.23168.1/tools/Build.proj]
Issue Analytics
- State:
- Created 5 months ago
- Comments:8 (7 by maintainers)
Top GitHub Comments
I assume it’s a part of this #31633
Yes / No. Historically code flow from roslyn / razor to sdk has been frought with problems that stem from rationalizing the .NET SDK vs. VS schedule. It’s lead to lots of missed fixes, scrambles, etc … For last two months we’ve been working with the sdk team to find a sane / predictable way to manage the code flow.
For 17.6 we tried a setup where we concentrated flow from our
release
branches instead ofmain
. That worked fine but resulted in periods of delay. Essentially we were pushing to sdk once per VS preview. For 17.7 we’re trying a different approach where we keep the flow where our active branch is.So yes this was intentional at the time but going forward wont’ be.
This reproduces in dotnet/source-build-reference-packages which is using the following version of GenAPI
This version of the SDK contains Rosyln 542fea0c2a93aacb3e8c52c2ce43e975d29832f3. I am not seeing the fix when looking at the Roslyn source. It looks like the PR was merged into main while the SDK is retrieving updates from release/dev17.6