I have a Portable Class Library (PCL) that needs conversion to a normal class library (targeted only at .NET 4.5).
I've tried editing the .csproj
file, with no success. I'm wondering how to do this?
NET Standard is platform-agnostic, it can run anywhere, on Windows, Mac, Linux and so on. PCLs can also run cross-platform, but they have a more limited reach. PCLs can only target a limited set of platforms.
The Portable Class Library project enables you to write and build managed assemblies that work on more than one . NET Framework platform. You can create classes that contain code you wish to share across many projects, such as shared business logic, and then reference those classes from different types of projects.
Right-click on the solution in Solution Explorer and select Add > New Project. On the Add a new project page, enter library in the search box. Choose C# or Visual Basic from the Language list, and then choose All platforms from the Platform list. Choose the Class Library template, and then choose Next.
Got it! I reversed the instructions here:
http://geekswithblogs.net/imilovanovic/archive/2012/08/31/vs2012---how-to-manually-convert-.net-class-library-to.aspx
Delete this from the .csproj
file:
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
And change this ...
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
... to this:
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
See Convert a PCL to a regular Class Library.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With