5

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?

Contango
  • 76,540
  • 58
  • 260
  • 305
  • "I've tried editing the .csproj file, with no success", you must show what you tried, and what was the result of what you tired. Include in your question the before and after of the section of the .csproj file you edited and explain how it was not behaving the way you wanted after the change. – Scott Chamberlain Aug 18 '15 at 14:26
  • @Scott Chamberlain I've clarified the question. I suspect that the only way to do this is to edit the .csproj file. – Contango Aug 18 '15 at 14:26

1 Answers1

10

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" />

Update

See Convert a PCL to a regular Class Library.

Community
  • 1
  • 1
Contango
  • 76,540
  • 58
  • 260
  • 305