提交 c2cd9b6e 编写于 作者: A Andy Gocke

Suppress warnings about missing DNXCore reference assemblies

MSBuild currently produces a warning for any target framework that
doesn't have a directory containing its reference assemblies, but
DNXCore50 purposfully has no reference assemblies and currently has no
empty directory to indicate so. Issue #5213 details figuring out what
the proper solution is here, but in the meantime this silences the
warning by pretending that the TargetFrameworkDirectory for DNXCore50 is
.NETPortable, 5.0.
上级 9b7fe079
......@@ -59,15 +59,26 @@
<RemoveAssemblyFoldersIfNoTargetFramework>false</RemoveAssemblyFoldersIfNoTargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == 'DNXCore'">
<_TargetFrameworkDirectories>$([System.String]::Join(";", $([Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToReferenceAssemblies(".NETPortable", "v5.0", ""))))</_TargetFrameworkDirectories>
<_FullFrameworkReferenceAssemblyPaths>$(_TargetFrameworkDirectories)</_FullFrameworkReferenceAssemblyPaths>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == 'DNXCore'">
<BaseNuGetRuntimeIdentifier Condition="'$(OS)' == 'Windows_NT'">win</BaseNuGetRuntimeIdentifier>
<BaseNuGetRuntimeIdentifier Condition="'$(OS)' == 'Unix'">linux</BaseNuGetRuntimeIdentifier>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.VisualBasic.targets" Condition="'$(ProjectLanguage)' == 'VB' And '$(TargetFrameworkIdentifier)' == '.NETPortable'"/>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" Condition="'$(ProjectLanguage)' == 'CSharp' And '$(TargetFrameworkIdentifier)' == '.NETPortable'"/>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" Condition="'$(ProjectLanguage)' == 'VB' And '$(TargetFrameworkIdentifier)' != '.NETPortable'" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition="'$(ProjectLanguage)' == 'CSharp' And '$(TargetFrameworkIdentifier)' != '.NETPortable'" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.VisualBasic.targets"
Condition="'$(ProjectLanguage)' == 'VB' And '$(TargetFrameworkIdentifier)' == '.NETPortable'"/>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets"
Condition="'$(ProjectLanguage)' == 'CSharp' And '$(TargetFrameworkIdentifier)' == '.NETPortable'"/>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets"
Condition="'$(ProjectLanguage)' == 'VB' And '$(TargetFrameworkIdentifier)' != '.NETPortable'" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets"
Condition="'$(ProjectLanguage)' == 'CSharp' And '$(TargetFrameworkIdentifier)' != '.NETPortable'" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" Condition="'$(ProjectLanguage)' == 'C++'" />
<!-- On Mono on *nix the NuGet targets aren't imported by default, so we do that here -->
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册