I've an application in which I'd use both .net std 2.0 and .net4.6.1. I've declared it in my .csproj file which seems to work.
<PropertyGroup>
<TargetFrameworks> net461;netstandard2.0 </TargetFrameworks>
</PropertyGroup>
I've used pre-processor directives in order to get the code to behave the way I wanted.
#if NET461
//.net 4.6.1 code
#else
//.net std 2.0 code
#endif
When I run my application, I always get into the .net std 2.0 case. How do I specify that a specific part in my code should target a given framework?
I've followed these instructions: https://learn.microsoft.com/en-us/dotnet/standard/frameworks