Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Fix old project system warnings #710

Merged
merged 2 commits into from
Apr 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion netstandard/pkg/NETStandard.Library.pkgproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

<Target Name="StampTargets" BeforeTargets="GenerateNuSpec">
<PropertyGroup>
<_FacadeFiles Condition="'%(File.Facade)' == 'true' AND '%(File.Extension)' == '.dll'" >@(File->'%24(MSBuildThisFileDirectory)\ref\%(FileName)%(Extension)')</_FacadeFiles>
<_FacadeFiles Condition="'%(File.Facade)' == 'true' AND '%(File.Extension)' == '.dll'" >@(File->'%24(MSBuildThisFileDirectory)ref\%(FileName)%(Extension)')</_FacadeFiles>
</PropertyGroup>
<Error Condition="'$(_FacadeFiles)' == ''" Text="Could not determine facade file names to write to targets" />

Expand Down
46 changes: 26 additions & 20 deletions netstandard/pkg/targets/netstandard/NETStandard.Library.targets
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,30 @@
<!-- Only add references if we're actually targeting .NETStandard.
If the project is targeting some other TFM that is compatible with NETStandard we expect
that framework to provide all references for NETStandard, mscorlib, System.* in their own
targeting pack / SDK. -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">
<Reference Include="$(MSBuildThisFileDirectory)\ref\netstandard.dll">
<!-- Private = false to make these reference only -->
<Private>false</Private>
<!-- hide these from Assemblies view in Solution Explorer, they will be shown under packages -->
<Visible>false</Visible>
<NuGetPackageId>NETStandard.Library</NuGetPackageId>
<NuGetPackageVersion>$(NETStandardLibraryPackageVersion)</NuGetPackageVersion>
</Reference>
<Reference Include="#NETSTANDARDFACADES#">
<Facade>true</Facade>
<!-- Private = false to make these reference only -->
<Private>false</Private>
<!-- hide these from Assemblies view in Solution Explorer, they will be shown under packages -->
<Visible>false</Visible>
<NuGetPackageId>NETStandard.Library</NuGetPackageId>
<NuGetPackageVersion>$(NETStandardLibraryPackageVersion)</NuGetPackageVersion>
</Reference>
</ItemGroup>
targeting pack / SDK.
Choose/When is required to avoid an issue where the old desktop project system in VS
will evaluate this item ignoring the condition in order to populate the references. -->
<Choose>
<When Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">
<ItemGroup>
<Reference Include="$(MSBuildThisFileDirectory)ref\netstandard.dll">
<!-- Private = false to make these reference only -->
<Private>false</Private>
<!-- hide these from Assemblies view in Solution Explorer, they will be shown under packages -->
<Visible>false</Visible>
<NuGetPackageId>NETStandard.Library</NuGetPackageId>
<NuGetPackageVersion>$(NETStandardLibraryPackageVersion)</NuGetPackageVersion>
</Reference>
<Reference Include="#NETSTANDARDFACADES#">
<Facade>true</Facade>
<!-- Private = false to make these reference only -->
<Private>false</Private>
<!-- hide these from Assemblies view in Solution Explorer, they will be shown under packages -->
<Visible>false</Visible>
<NuGetPackageId>NETStandard.Library</NuGetPackageId>
<NuGetPackageVersion>$(NETStandardLibraryPackageVersion)</NuGetPackageVersion>
</Reference>
</ItemGroup>
</When>
</Choose>
</Project>