sasik
sasik
CC#
Created by sasik on 2/13/2023 in #help
✅ Creating a cross-platform csproj supporting any .NET and any platform -linux,osx,amd64,arm64
Closing the issue although if anyone, ever, even in 10 years, will come across a better solution, please, let me know
8 replies
CC#
Created by sasik on 2/13/2023 in #help
✅ Creating a cross-platform csproj supporting any .NET and any platform -linux,osx,amd64,arm64
and btw. I've found out a really simple solution:
<PropertyGroup>
<FrameworkDescription>$([System.Runtime.InteropServices.RuntimeInformation]::FrameworkDescription.ToLower())</FrameworkDescription>
<TargetFramework Condition="$(FrameworkDescription.Contains('net 7'))">net7</TargetFramework>
<TargetFramework Condition="$(FrameworkDescription.Contains('net 6'))">net6</TargetFramework>
<TargetFramework Condition="$(FrameworkDescription.Contains('net 5'))">net5</TargetFramework>
<TargetFramework Condition="$(FrameworkDescription.Contains('mono'))">net461</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<FrameworkDescription>$([System.Runtime.InteropServices.RuntimeInformation]::FrameworkDescription.ToLower())</FrameworkDescription>
<TargetFramework Condition="$(FrameworkDescription.Contains('net 7'))">net7</TargetFramework>
<TargetFramework Condition="$(FrameworkDescription.Contains('net 6'))">net6</TargetFramework>
<TargetFramework Condition="$(FrameworkDescription.Contains('net 5'))">net5</TargetFramework>
<TargetFramework Condition="$(FrameworkDescription.Contains('mono'))">net461</TargetFramework>
</PropertyGroup>
8 replies
CC#
Created by sasik on 2/13/2023 in #help
✅ Creating a cross-platform csproj supporting any .NET and any platform -linux,osx,amd64,arm64
short answer is yes, I want to be able to develop it wherever for production use, I do build a self-contained app, currently using net5 (I do want to update it but I also want to do it gradually and carefully due to possible performance drops which I already encountered multiple times in the past)
8 replies