-
-
Notifications
You must be signed in to change notification settings - Fork 285
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
Support for AOT #714
Comments
Thanks for your code sample! |
I made some litte improvements in release 5.4.2. Could you please try again? Does it work for you? |
Hey, sorry for waiting. Seems there is still something remaining. In my Directory.Build.props (i guess you can just put in csproj file) I have these rules that enforces all analyzers warnings to be solved in order to build.
I think just replacing Assembly.Location everywhere with System.AppContext.BaseDirectory might just work? |
Will have another look as soon as possible. |
1 similar comment
Will have another look as soon as possible. |
Describe the bug
Using ReportGenerator.Core "top level classes" inside AOT app does not works
To Reproduce
Create new console app and compile with (or use dotnet build/publish cli options)
Call in main:
var exitCode = Palmmedia.ReportGenerator.Core.Program.Main(generatorArgs);
The app will crash since they are calls like Assembly.GetExecutingAsembly() etc.
Those call can be very often replaced with System.AppContext.BaseDirectory to achieve same behaivor.
They are few similar places that do some not AOT friendly stuff but can be easily avoided if methods/ctor would have extra parameter and user could decide if to use default => use what we have now, or provide => skip aot unfriendly stuff.
What i ended up with (in order to skip the AOT unfriendly bits):
The text was updated successfully, but these errors were encountered: