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

本小妞迷上赌 提交于 2019-12-01 06:44:06

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

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)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!