GenFacades fails to generate not supported assembly for reference source that contains throw null expression body
See original GitHub issue- This issue is blocking
- This issue is causing unreasonable pain
GenFacades not supported assembly fails for reference source files that use the => throw null;
syntax instead of a full method body.
C:\git\runtime5\artifacts\obj\System.Net.Quic\net6.0-Browser-Debug\System.Net.Quic.notsupported.cs(17,9): error CS8057: Block bodies and expression bodies cannot both be provided. [C:\git\runtime5\src\libraries\System.Net.Quic\src\System.Net.Quic.csproj]
public QuicListener(IPEndPoint listenEndPoint, System.Net.Security.SslServerAuthenticationOptions sslServerAuthenticationOptions) { throw new System.PlatformNotSupportedException(System.SR.SystemNetQuic_PlatformNotSupported); }
=> throw null;
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (17 by maintainers)
Top Results From Across the Web
Source generator fails to load referenced assembly #49075
I'm trying to use Scriban to generate code more easily from a source generator. However, it fails to load the assembly: CSC :...
Read more >How to fix "Referenced assembly does not have a strong ...
The above steps work fine unless your third-party assembly (A.dll) references another library (B.dll) which also has to be signed.
Read more >Solved: Expression.Error: We cannot convert the value null...
I'm working in an ERP reporting project and I have relatively complex PBI and PQ set with dozens of tables and processing steps....
Read more >Working with nullable reference types - EF Core
This page introduces EF Core's support for nullable reference types, and describes best practices for working with them.
Read more >Null Reference Exceptions
NullReferenceException happens when your script code tries to use a variable which isn't set (referencing) and object. The error message that appears tells...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@safern is currently investigating. We have discussed with folks from Roslyn in the past and no tool existed but the closest one was the functionality that backed go-to definition. We indeed want Roslyn APIs to back as much of the GenAPI stack as possible so we get new language features automatically. We also desire to publicly ship the tool and there is likely a better place for it to live than arcade or runtime.
We can use https://apisof.net/catalog/Microsoft.CodeAnalysis.CSharp.Syntax.MethodDeclarationSyntax.ExpressionBody to differentiate between the 2 cases and fix the error.