Skip to content

Instantly share code, notes, and snippets.

@Zonciu
Last active November 14, 2019 08:45
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Zonciu/53135fd928e4fd4ced970b6e00740652 to your computer and use it in GitHub Desktop.
Save Zonciu/53135fd928e4fd4ced970b6e00740652 to your computer and use it in GitHub Desktop.
WinForm designer in net core 3, no need to create another .net framework project and link files
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFrameworks>net472;netcoreapp3.0</TargetFrameworks>
<UseWindowsForms>true</UseWindowsForms>
<LangVersion>7.3</LangVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
<!-- add From files to here to enable designer -->
<Compile Update="Forms\Form1.cs">
<SubType>Form</SubType>
</Compile>
</ItemGroup>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment