本文介绍了缺少".NETFramework,Version = v4.0,Profile = Profile47"的定位包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试编译便携式计算机时遇到了一些问题f#源代码中的FSharp.Core版本.

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

为此,我创建了一些项目文件以能够在Visual Studio中打开它,而不必使用以下命令:

To help with this, I created some project files to be able to open it inside Visual Studio instead of having to use the following command:

msbuild fsharp-library-build.proj /p:TargetFramework=portable-net4+sl4+wp71+win8

当我从此处打开FSharp.Core.Portable.sln时,出现了这个非常奇怪的错误:

When I open FSharp.Core.Portable.sln from here, I get this very weird error:

没有针对VS2012的此类定位包,它应该是开箱即用的.

There is no such targeting pack for VS2012, it's supposed to come out of the box.

推荐答案

ZachBray向我指出了这个问题. (在我获得了无法使用的项目之后)

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.

对于大多数C#PCL,以下行将起作用:

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

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

(因此,在项目文件的末尾,将"Import"元素替换为该元素或更新的元素)

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

这篇关于缺少".NETFramework,Version = v4.0,Profile = Profile47"的定位包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 00:28