Skip to content
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

NativeAOT support: get to zero warnings #1947

Open
roji opened this issue Mar 7, 2023 · 3 comments
Open

NativeAOT support: get to zero warnings #1947

roji opened this issue Mar 7, 2023 · 3 comments
Labels
🙌 Up-for-Grabs Issues that are ready to be picked up for anyone interested. Please self-assign and remove the label

Comments

@roji
Copy link
Member

roji commented Mar 7, 2023

Right now, when publishing a NativeAOT app using SqlClient, many warnings are emitted. To properly support NativeAOT, SqlClient will need to get to a place where no warnings are emitted, so the user can be 100% confident that the application will function correctly.

Note that this is related, but not the same as #1942, which is about reducing the binary size. However, the same technique can be used for both: if an entry point (e.g. slim data source builder) is introduced, which by default doesn't include functionality that is large and/or unsafe for NativeAOT, then programs not explicitly bringing in that functionality won't get warnings etc.

@kant2002
Copy link
Contributor

kant2002 commented Mar 7, 2023

I add project settings to be enable trimming analysis here #1943 , That allow bookkeeping warnings which should be fixed.

@lcheunglci lcheunglci added the 🆕 Triage Needed For new issues, not triaged yet. label Mar 8, 2023
@lcheunglci lcheunglci added 🙌 Up-for-Grabs Issues that are ready to be picked up for anyone interested. Please self-assign and remove the label and removed 🆕 Triage Needed For new issues, not triaged yet. labels Mar 14, 2023
@lozn00
Copy link

lozn00 commented May 20, 2023

This error did not appear before, is it a compatibility issue with different 7.0 versions of aot? I plan to downgrade, but uninstalling directly is difficult to downgrade @jkotas

@lozn00
Copy link

lozn00 commented May 20, 2023

I tried uninstalling the application using aspnetcore-runtime-7.0.5-win-x64 dotnet-sdk-7.0.302-win-x64 (1) or after the window->installed application was uninstalled,
I still see 7.0.5 when using dotnet --info, this 7.0.5 is buggy, bug A type initializer threw an exception home computer uses 7.0.4 to test sql The client library is normal.

So, I directly used dotnet --info to get the 7.0.5 folder, and directly brute-deleted it, but got other headaches
fatal error LNK1123: 转换到 COFF 期间失败

I also upgraded to net 8.0 but also got some bugs that frustrated me very much
System.MissingMethodException

Before I reinstalled the computer, my source code worked, I reinstalled the computer, the version of the computer was .net 7.0.5 Therefore, I think that I was able to work properly because I used an old version of .NET 7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙌 Up-for-Grabs Issues that are ready to be picked up for anyone interested. Please self-assign and remove the label
Projects
None yet
Development

No branches or pull requests

4 participants