-
-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CS4012 Parameters or locals of type 'DefaultInterpolatedStringHandler' cannot be declared in async methods or async lambda expressions. #278
Comments
on dnSpy 6.4.0 im able to edit method (C#), probably you have unresolved assemblies |
|
original code dnSpy decompiled code
When modifying the method and compiling, dnSpy reports an error |
What's even more strange is that I tried to delete the code related to the |
Decompilation of interpolated string handler into original expression is not supported yet, because of old decompiler engine. And after editing it becomes normal because dnSpy probably compiled it into older P.S. in my app dnSpy compiled it into |
+1 to this issue, found it too, but it is not deal breaker. My current workaround is to open ILSpy along side and copy cleaner decompiled code from there when recompiling method. |
This will be fixed properly when the decompiler engine is updated to the latest ILSpy version. Currently, the workaround suggested by @wappenull is one of the better ways to get the C# editor working well with modern code. |
dnSpyEx version
6.4.1
Describe the Bug
After decompiling the code with $"{xxxx}" string concatenation in the original code, it is not possible to edit the code and recompile it through dnSpy.
The name 'defaultInterpolatedStringHandler' does not exist in the current context
How To Reproduce
$"{xxxx}"
Expected Behavior
.
Actual Behavior
.
Additional Context
No response
The text was updated successfully, but these errors were encountered: