Instantly share code, notes, and snippets.

@yuv4ik /README.md
Last active Nov 9, 2018

Embed
What would you like to do?
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