Partial classes and platform specific code
Hello. Trying to create platform specific code and only use/compile the code for correct platform upon release. My current issue is that regardless of platform my linux specific code is trying to run on windows. I seen examples of it using MAUI, however i'm just trying to make a simple console app.
In my csproj:
Base class:
used like this:
an identical implementation is done for linux and all code is in the same namespace
and it's built using this command:
dotnet publish wallpaper.csproj -r win-x64 -c Release
In my csproj:
Base class:
used like this:
an identical implementation is done for linux and all code is in the same namespace
and it's built using this command:
dotnet publish wallpaper.csproj -r win-x64 -c Release