Skip to content

Instantly share code, notes, and snippets.

@TinkerWorX
Created September 24, 2019 20:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TinkerWorX/6684857245771426b80137fc674188ae to your computer and use it in GitHub Desktop.
Save TinkerWorX/6684857245771426b80137fc674188ae to your computer and use it in GitHub Desktop.
Suggested project
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net45;netcoreapp3.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45'">
<DefineConstants>$(DefineConstants);NETFULL</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.0'">
<DefineConstants>$(DefineConstants);NETCORE</DefineConstants>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<Reference Include="System.Windows.Forms">
<HintPath>C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\3.0.0\System.Windows.Forms.dll</HintPath>
</Reference>
<Reference Include="System.Drawing.Common">
<HintPath>C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\3.0.0\System.Drawing.Common.dll</HintPath>
</Reference>
</ItemGroup>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment