-
-
Save PetSerAl/53c469c4552370a9ca96db908295a805 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Test { | |
class Program { | |
static void Main() { | |
Console.WriteLine("Hello World!"); | |
#if NETFRAMEWORK | |
Console.WriteLine(".NET Framework"); | |
Console.WriteLine((System.Numerics.Vector<byte>)new System.Numerics.Vector<int>(42)); | |
#elif NETCOREAPP | |
Console.WriteLine(".NET Core"); | |
Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(new { a = 1, b = 2 })); | |
#else | |
Console.WriteLine("Unknown"); | |
#endif | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<LangVersion>Latest</LangVersion> | |
<OutputType>Exe</OutputType> | |
<TargetFrameworks> | |
netcoreapp2.1; | |
net472; | |
</TargetFrameworks> | |
</PropertyGroup> | |
<PropertyGroup Condition="$(Platform) == 'AnyCPU'"> | |
<PlatformTarget>AnyCPU</PlatformTarget> | |
</PropertyGroup> | |
<ItemGroup Condition="$(TargetFramework) == 'netcoreapp2.1'"> | |
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" /> | |
</ItemGroup> | |
<ItemGroup Condition="$(TargetFramework) == 'net472'"> | |
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" /> | |
</ItemGroup> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment