I have a project with some code. I want to determine is RyuJIT is used and if so then write RyuJIT otherwise LegacyJIT.
I write:
#if RuyJIT
Console.WriteLine("RyuJIT");
#else
Console.WriteLine("LegacyJIT");
#endif
then I'm trying to define a constant. So i open my .csproj in notepad and write following:
<PropertyGroup>
<DefineConstants Condition=" $(TargetFrameworkVersion.Replace('v', '')) >= 4.6 ">RyuJIT</DefineConstants>
</PropertyGroup>
But it doesn't work: constant is not defined thus second line is always compiled for any target framework. What am I doing wrong? How can I share this constant between builds?
Solved with
Choosenode. Additionaly, now I'm able to reference.Net 4.6-onlydlls.I replaced
RyuJITwithSIMDbecause it's more suitable