scottyhardy / docker-wine

Docker image that includes Wine and Winetricks for running Windows applications on Linux and macOS
MIT License
883 stars 152 forks source link

[questio] how to install dotnet #105

Open raffaelespazzoli opened 3 years ago

raffaelespazzoli commented 3 years ago

Is your feature request related to a problem? Please describe. I'm trying to create a .NET image to be used as based image for running .NET applications. I'm not a windows expert, my sloppy approach looks like this:

FROM scottyhardy/docker-wine:latest
RUN WINEPREFIX=${WINE32} WINEARCH=win32 winetricks -q --force dotnet48 corefonts 

The build process seems to complete correclty, but when I go an try to execute something, I get the following:

root@40bce768743d:/samples/csharp/getting-started/console-teleprompter# wine dotnet run
0009:err:module:__wine_process_init L"C:\\windows\\system32\\dotnet.exe" not found

Am I doing something wrong? Can you give me some pointer on how to make this work?

scottyhardy commented 2 years ago

Hi @raffaelespazzoli,

I've never used .NET before, so the best I can do is to refer you to this gist I found: https://gist.github.com/jensmeder/34396a00ca96597f972983c06b06165b

In particular, this line shows the path to csc.exe and is used to compile a .cs file:

wine /root/.net/drive_c/windows/Microsoft.NET/Framework64/v4.0.30319/csc.exe HelloWorld.cs

This then looks to output an .exe file that is executed later. I hope this helps you out a little