-
Notifications
You must be signed in to change notification settings - Fork 118
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
Unsupported language/version ? #214
Comments
Hey @manson , thatnk you for the report and sorry for the delay. Would it be possible to share the code of the affected classs? |
We had the same error when adding an attribute to a class that contained an async method that had not been implemented yet and for which the compiler was giving a warning. The method in question was: |
Interesting find, it should be quite easy to check for. I'll try to have a
look shortly
…On Mon, 20 Jan 2025, 05:36 praaline, ***@***.***> wrote:
We had the same error when adding an attribute to a class that contained
an async method that had not been implemented yet and for which the
compiler was giving a warning. The method in question was:
public async Task NotYetImprlemented(int parameter) { throw
NotImplementedException(); }
which is the default body when asking visual studio to "implement" an
interface. After I replaced the "throw..." statement (which is not
asynchronous) with the statement "await Task.CompletedTask;", the compiler
warnings went away and AspectInjector worked.
—
Reply to this email directly, view it on GitHub
<#214 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA7HZUFOS6BF3CSTPHTDUAL2LPH7ZAVCNFSM6AAAAABVO3MKSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMBQHEZTINRTHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Environment:
I have an ASP.NET big application with multiple sub projects (libraries). I have implemented a separate library Tracing with all aspects and attributes implementation. Next I have added reference to this project from main app and started testing, It worked well until I have finished the needed logic and applied attributes to all the classes I need to intercept behavior with AspectInjector. And after spending the whole day doing this, I got next error on building my app.
The same for 2.8.2
Don't know even what to think.
UPD.
I don't know what happened (I spent a day finding error reason) but everything has fixed after I have added the new subproject (class library) into the solution for testing, applied attributes to it, built. It built ok, but after I checked the main project and it built as well! Now everything works well - I cleanup solution, rebuild and it works... Don't know what to think. Hope later it wont face the same issue...
UPD
No, it do not work. It just reference to aspect library in this project dropped and hence was not doing any injection and so build without errors....
UPD
Figured out where this happened, but not why. This is an ordinary class where putting attributes on it raising that error. I have about 30 classes with this aspect attributes and similar classes and only on this class it breaks. Cannot get how it differ from others. Temporarilly removed attributes from this class, let it be unwachable for a while. If you have any ideas whould be greatfull...
The text was updated successfully, but these errors were encountered: