Missing targeting pack for “.NETFramework,Version=v4.0,Profile=Profile47”

前端 未结 2 1940
别那么骄傲
别那么骄傲 2021-01-13 23:46

I\'ve been having some problems when trying to compile the portable version of FSharp.Core from the f# source code.

To help with this, I created some project files t

相关标签:
2条回答
  • 2021-01-14 00:26

    I had this issue recently. It turned out that I was importing the wrong targets file at the bottom of the project.

    To get it to work, I replaced it with this:

    <Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.Portable.FSharp.Targets" />

    0 讨论(0)
  • 2021-01-14 00:50

    ZachBray pointed me at the problem. (after I got a project that wouldn't work)

    I compared it with a new Portable Class Library and the problems is solved.

    For most C# PCL's it the following line will work:

    <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
    

    (so at the end in the project file, replace the 'Import' element for this one or a newer one)

    0 讨论(0)
提交回复
热议问题