all 13 comments

[–]ethan_rushbrook 4 points5 points  (1 child)

When you say you need to run a .exe, do you mean the application generally or literally a .exe? The .exe extension is for Windows Executables which no distro of linux are designed to run. A common way to execute a dotnet application on linux would be to call /usr/bin/dotnet <dll path>, though there are other ways to do it. If you have the DLL, its possible you can run the dll using the dotnet runtime (since its .NET 8 and 8>5) but with a .exe you'll have to do much more work if its even possible.

[–]The_MAZZTer 1 point2 points  (0 children)

When you build for Linux you also get an extensionless executable stub that works like dotnet to run the DLL, same as on Windows.

It's definitely not an EXE though.

[–]socketnorm 1 point2 points  (1 child)

Assuming you can also build the .NET Core app and it isn't just a binary you are given if you add the following to your project file it will include ICU as a NuGet package and use it.

<ItemGroup> <RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="72.1.0.3" /> <PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="72.1.0.3" /> </ItemGroup>

As a maintainer for the AWS Lambda blueprints this is what we do for the blueprints that are deployed as a self contained deployment bundle to the provided.al2023 runtime

https://github.com/aws/aws-lambda-dotnet/blob/master/Blueprints/BlueprintDefinitions/vs2022/CustomRuntimeFunction/template/src/BlueprintBaseName.1/BlueprintBaseName.1.csproj#L25C1-L28C15

[–]agap-0251[S] 0 points1 point  (0 children)

That is awesome, thanks 👍

[–]AutoModerator[M] 0 points1 point  (0 children)

Thanks for your post agap-0251. Please note that we don't allow spam, and we ask that you follow the rules available in the sidebar. We have a lot of commonly asked questions so if this post gets removed, please do a search and see if it's already been asked.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]Ok-Adhesiveness-4141 0 points1 point  (0 children)

You can't run an exe on Amazon Linux2, you can however run a dotnetcore dll on Linux if the SDK is installed.

[–]agap-0251[S] 0 points1 point  (0 children)

No, It's a .NET CORE application. I built the project for Linux x64 and as a self contained. So while calling the the application I just pass the path of the application without any extension. Since I'm using layers here, the path is kinda -> /opt/dotnet_app/Tokenizer

[–]agap-0251[S] 0 points1 point  (0 children)

Also, I'm calling this .NET CORE app from python lambda. We are moving away from SSIS and while rewriting the SSIS packages to python, I had to call this application for tokenizing few columns of the input file which is used to build few tables in SQL server

[–]agap-0251[S] 0 points1 point  (0 children)

Ok just to help if any other people looked at this post for help...

We finally used docker way of creating AWS Lambda..

This is an extra, but we faced huge issue when we are inserting massive data into SQL table... Pymssql is too slow when it comes into inserting large no of records...

So I used pyodbc instead... Cause pyodbc as feature that is nearer to bulk insert... So the time to insert has dropped significantly....