Skip to content

Instantly share code, notes, and snippets.

@yuv4ik
Last active November 9, 2018 09:14
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save yuv4ik/063a35fe3986e62d69aee2f0ed0607bf to your computer and use it in GitHub Desktop.
Save yuv4ik/063a35fe3986e62d69aee2f0ed0607bf to your computer and use it in GitHub Desktop.
PCL@.NET Standard

Source: https://montemagno.com/how-to-convert-a-pcl-library-to-net-standard-and-keep-git-history/

How to Convert a Portable Class Library to .NET Standard and Keep Git History

  • Unload your PCL project (right click -> unload), and start editing it (right -> click edit)
  • Delete Everything in the csproj and insert this:
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <!--<PackageReference Include="" Version=""/>-->
  </ItemGroup>

</Project>
  • Add back NuGets (simply open packages.config, and add the package references above, or via the NuGet package manager.
  • Delete AssemblyInfo.cs (this is now in the csproj) and packages.config (also in csproj via PackageReference)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment