CommunicationNativeAOT for C#
A downloadable project
Hello everyone, thanks for buying with example CommunicationNativeAOT
1. Unzip it <filename>.zip
2. Open Visual Studio 2022 or Visual Studio Code
3. Open terminal from Visual Studio 2022 or Visual Studio Code
4. Go to SharedLibrary
5. Prompt dotnet restore
dotnet build -c Release
dotnet publish -c Release -r <rid> --serlf-contained=true -p:NativeLibrary=Shared
Explanation: rid means win-x64 or linux-x64
6. Go to CommunicationNativeAOT
7. Prompt dotnet restore
dotnet build -c Release
8. Open file manager where is downloaded ComNAOT directory and find to native directory from SharedLibrary and copy SharedLibrary.<extension>
Explanation extension: dll for Windows ( not Net assembly , just use PE format )
so for Linux ( ELF format shared object )
9. Past to output directory of CommunicationNativeAOT
Example: ./bin/Release/net8.0/ * SharedLibrary.<extension>
WARNING: If you work under Linux - It happens "libSharedLibrary.so" You need to remove "lib". Make sure valid filename of shared library under Linux.
10. Prompt dotnet run -c Release
Output:
Hello, Communication for Native AOT!
Test: MessageFromSharedLibrary: Hello, Message from Shared Library.
Test: MessageCallbackToExecutable: Hello, Message from Executable.
If you get error then you need to copy from native directory of SharedLibrary dynamic libary or shared object and paste to output directory of CommunicationNativeAOT.
11. IF you want to deploy to end of native aot:
Prompt: dotnet publish -c Release -r <rid> --serlf-contained=true
And make sure paste SharedLibrary.<extension> to native directory of CommunicationNativeAOT
And you can test with Console or Terminal and execute to native directory of Communication
Prompt:
For Windows: CommunicationNativeAOT
For Linux: ./CommunicationNativeAOT
Enjoy your imaginement and you have to get idea for Game or Aplication development
Happy coding!!!!
Regards, Jens-Peter Eckervogt ( aka DeafMan1983 )
Status | Released |
Category | Other |
Author | DeafMan1983 |
Tags | examaple |
Leave a comment
Log in with itch.io to leave a comment.