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 #559

Open
alberk8 opened this issue May 6, 2024 · 2 comments
Open

NativeAOT #559

alberk8 opened this issue May 6, 2024 · 2 comments

Comments

@alberk8
Copy link

alberk8 commented May 6, 2024

Is your feature request related to a problem? Please describe.
Is there any plan to support NativeAot with Library Trimming?

@milkshakeuk
Copy link
Member

It may already be compatible have you tried?

If not then it's just a case of looking for anything in nhapi which may not be compatible.

https://devblogs.microsoft.com/dotnet/creating-aot-compatible-libraries/

@alberk8
Copy link
Author

alberk8 commented Aug 11, 2024

I did a small "hello world" hl7 and it did compile but not able to run. There are native compiler warnings.

internal class Program
{
    static void Main(string[] args)
    {

        PipeParser parser = new PipeParser();
        var sMessage = "MSH|^~\\&|c30|AB597250753K|||20231011161049+0800||ORU^R01|202310111610491595|P|2.6";
        var hl7 = parser.Parse(sMessage);

    }
}
2>Generating native code
2>"C:\Users\alberk\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\8.0.7\tools\\ilc" @"obj\Release\net8.0\win-x64\native\ConsoleNativeHL7.ilc.rsp"
2>C:\Users\alberk\.nuget\packages\nhapi.base\3.2.0\lib\netstandard2.0\NHapi.Base.dll(0,0): Warning IL2104: Assembly 'NHapi.Base' produced trim warnings. For more information see https://aka.ms/dotnet-illink/libraries
2>C:\Users\alberk\.nuget\packages\nhapi.base\3.2.0\lib\netstandard2.0\NHapi.Base.dll(0,0): Warning IL3053: Assembly 'NHapi.Base' produced AOT analysis warnings.
2>C:\Users\alberk\.nuget\packages\system.configuration.configurationmanager\5.0.0\lib\netstandard2.0\System.Configuration.ConfigurationManager.dll(0,0): Warning IL2104: Assembly 'System.Configuration.ConfigurationManager' produced trim warnings. For more information see https://aka.ms/dotnet-illink/libraries
2>ILC(0,0): Warning IL3002: System.Configuration.ClientConfigPaths.ClientConfigPaths(String,Boolean): Using member 'System.Reflection.Module.Name.get' which has 'RequiresAssemblyFilesAttribute' can break functionality when embedded in a single-file app. Returns <Unknown> for modules with no file path.
2>ILC(0,0): Warning IL3002: System.Configuration.ClientConfigPaths.GetTypeAndHashSuffix(String): Using member 'System.Reflection.Module.Name.get' which has 'RequiresAssemblyFilesAttribute' can break functionality when embedded in a single-file app. Returns <Unknown> for modules with no file path.
2>"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\Hostx64\x64\link.exe" @"obj\Release\net8.0\win-x64\native\link.rsp"
2>ConsoleNativeHL7 -> D:\Staging\Test\ConsoleNativeHL7\ConsoleNativeHL7\bin\Release\net8.0\X64\publish\
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 3:40 PM and took 36.299 seconds ==========
========== Publish: 1 succeeded, 0 failed, 0 skipped ==========

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants