2017-03-18 11 views
1

CSProjファイル(Net Coreプロジェクト)のターゲットフレームワークリストにuap10.0を追加して、このライブラリをUWPプロジェクトから参照できるようにしました。CSProjファイルからUWPターゲットを追加できません

次のように: -

<Project Sdk="Microsoft.NET.Sdk"> 

    <PropertyGroup> 
    <TargetFrameworks>netcoreapp1.1;net462;uap10.0;xamarin.ios10;MonoAndroid70</TargetFrameworks> 
    </PropertyGroup> 

</Project> 

しかし、私は次のようなエラーメッセージが表示されます構築するとき: - 私は失敗した何

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.TargetFrameworkInference.targets(84,5): error : Cannot infer TargetFrameworkIdentifier and/or TargetFrameworkVersion from TargetFramework='uap10.0'. They must be specified explicitly. 
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1111,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v10.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. 

を行うには?

ありがとうございました。

+0

をたぶん、あなたは.NETの標準プロジェクトを作成します。 –

+0

賢明な音ですが、私はどのように必要な参照を追加しますか。これはproject.jsonシステムとは異なります。 –

答えて

2

あなたのcsprojに次のように追加することで、uap10.0をサポートする最初のバージョンである.NET Standard 1.4をターゲットにすることができます:

<PropertyGroup> 
    <TargetFrameworks>netstandard1.4;net462;netcoreapp1.0</TargetFrameworks> 
</PropertyGroup> 
+0

それはうまくいきました。正面にnetstandard1.4を置くほうが最後よりもうまくいくようです。 –

+0

これで問題が解決した場合は、回答を受け入れたものとみなしてください。ありがとう。 –

関連する問題