Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit fbdc453

Browse files
committed
Remove reference assemblies from NetFx netstandard support package
Multiple tools in .NETFramework projects are attempting to load references for execution which fails for reference assemblies. To work better with these tools, don't use reference assemblies in the support package.
1 parent 135f20d commit fbdc453

11 files changed

+7
-41
lines changed

dir.targets

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
</BinPlaceConfiguration>
5050
<BinPlaceConfiguration Condition="('$(IsNetFxNETStandard)' == 'true' OR '$(IsNetFxNETStandardRef)' == 'true') AND '$(BuildingNETFxVertical)' == 'true'"
5151
Include="netfx-$(_bc_OSGroup);net462-$(_bc_OSGroup);net47-$(_bc_OSGroup)">
52-
<PackageFileRefPath Condition="'$(IsNetFxNETStandardRef)'=='true'">$(NetFxPackageRefPath)</PackageFileRefPath>
5352
<PackageFileRuntimePath Condition="'$(IsNetFxNETStandard)'=='true'">$(NetFxPackageRuntimePath)</PackageFileRuntimePath>
5453
</BinPlaceConfiguration>
5554

pkg/NETStandard.Library.NETFramework/NETStandard.Library.NETFramework.pkgproj

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<LibBinDir>$(NetFxPackageRuntimePath)</LibBinDir>
1313

1414
<IsFrameworkPackage>true</IsFrameworkPackage>
15+
<IncludeReferenceFiles>false</IncludeReferenceFiles>
1516
<IncludeLibFiles>true</IncludeLibFiles>
1617

1718
<!-- ValidatePackage doesn't evaluate our targets/props so it does
@@ -41,24 +42,19 @@
4142

4243
<Target Name="IncludeNETStandardShims">
4344
<ItemGroup>
44-
<_refFileNames Include="@(RefFile->'%(FileName)')" Condition="'%(Extension)' == '.dll'" />
4545
<_libFileNames Include="@(LibFile->'%(FileName)')" Condition="'%(Extension)' == '.dll'" />
4646

4747
<!-- remove any targeting pack assemblies that we build ourselves -->
48-
<_netFxReference Include="@(NetFxReference)" Exclude="@(_refFileNames);@(_libFileNames)" />
48+
<_netFxReference Include="@(NetFxReference)" Exclude="@(_libFileNames)" />
4949

5050
<!-- ignore any assemblies we expect to come from the targeting pack -->
5151
<IgnoredReference Include="@(_netFxReference)" />
5252
<SuppressNETStandardMissingFile Include="@(_netFxReference)" />
5353

5454
<!-- don't include shims for anything from the targeting pack or built explicitly -->
55-
<_excludeShimsRef Include="@(_netFxReference);@(_refFileNames)"/>
5655
<_excludeShimsLib Include="@(_netFxReference);@(_libFileNames)"/>
5756

5857
<!-- fill in with netstandard.dll-based shims -->
59-
<RefFile Include="$(NETStandardPackageRefPath)\*.dll" Exclude="@(_excludeShimsRef->'$(NETStandardPackageRefPath)\%(Identity).dll')">
60-
<TargetFramework>$(TargetFramework)</TargetFramework>
61-
</RefFile>
6258
<LibFile Include="$(NETStandardPackageRefPath)\*.dll" Exclude="@(_excludeShimsLib->'$(NETStandardPackageRefPath)\%(Identity).dll')">
6359
<TargetFramework>$(TargetFramework)</TargetFramework>
6460
</LibFile>
@@ -98,21 +94,12 @@
9894

9995
<Target Name="AddFrameworkClosureFiles" AfterTargets="ExpandClosureFilesByTargetFramework">
10096
<ItemGroup>
101-
<FrameworkClosureFile Include="@(NetFxReference->'$(RefRootPath)netfx/%(Identity).dll')" >
102-
<FileSet>reference-net461</FileSet>
103-
</FrameworkClosureFile>
10497
<FrameworkClosureFile Include="@(NetFxReference->'$(RefRootPath)netfx/%(Identity).dll')" >
10598
<FileSet>runtime-net461</FileSet>
10699
</FrameworkClosureFile>
107-
<FrameworkClosureFile Include="@(NetFxReference->'$(RefRootPath)net462/%(Identity).dll')" >
108-
<FileSet>reference-net462</FileSet>
109-
</FrameworkClosureFile>
110100
<FrameworkClosureFile Include="@(NetFxReference->'$(RefRootPath)net462/%(Identity).dll')" >
111101
<FileSet>runtime-net462</FileSet>
112102
</FrameworkClosureFile>
113-
<FrameworkClosureFile Include="@(NetFxReference->'$(RefRootPath)net47/%(Identity).dll')" >
114-
<FileSet>reference-net47</FileSet>
115-
</FrameworkClosureFile>
116103
<FrameworkClosureFile Include="@(NetFxReference->'$(RefRootPath)net47/%(Identity).dll')" >
117104
<FileSet>runtime-net47</FileSet>
118105
</FrameworkClosureFile>
@@ -163,10 +150,6 @@
163150
</PropertyGroup>
164151

165152
<ItemGroup>
166-
<!-- Include refs -->
167-
<File Include="@(RefFile)">
168-
<TargetPath Condition="'%(RefFile.TargetPath)' == ''">build/%(RefFile.TargetFramework)/ref%(RefFile.SubFolder)</TargetPath>
169-
</File>
170153

171154
<!-- Include lib -->
172155
<File Include="@(LibFile)">

pkg/NETStandard.Library.NETFramework/targets/NETStandard.Library.NETFramework.common.targets

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,9 @@
4444
consider a project with an Reference Include="System", and some NuGet package is providing System.dll.
4545
Simple references can also come from NuGet framework assemblies, hence this statement should occur after
4646
including all computed references. -->
47-
<Reference Remove="%(_NETStandardLibraryNETFrameworkReference.FileName)" />
48-
49-
<Reference Include="@(_NETStandardLibraryNETFrameworkReference)">
50-
<!-- Private = false to make these reference only -->
51-
<Private>false</Private>
52-
<NuGetPackageId>NETStandard.Library.NETFramework</NuGetPackageId>
53-
<NuGetPackageVersion>$(NETStandardLibraryNETFrameworkPackageVersion)</NuGetPackageVersion>
54-
</Reference>
47+
<Reference Remove="%(_NETStandardLibraryNETFrameworkLib.FileName)" />
5548

5649
<ReferenceCopyLocalPaths Include="@(_NETStandardLibraryNETFrameworkLib)">
57-
<Private>false</Private>
5850
<NuGetPackageId>NETStandard.Library.NETFramework</NuGetPackageId>
5951
<NuGetPackageVersion>$(NETStandardLibraryPackageVersion)</NuGetPackageVersion>
6052
</ReferenceCopyLocalPaths>

pkg/NETStandard.Library.NETFramework/targets/net461/NETStandard.Library.NETFramework.targets

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<ItemGroup Condition="'$(ImplicitlyExpandNETStandardFacades)' == 'true'">
3-
<_NETStandardLibraryNETFrameworkReference Include="$(MSBuildThisFileDirectory)\ref\*.dll"
4-
Exclude="@(_NETStandardLibraryNETFrameworkReference->'$(MSBuildThisFileDirectory)\ref\%(FileName).dll')" />
5-
63
<_NETStandardLibraryNETFrameworkLib Include="$(MSBuildThisFileDirectory)\lib\*.dll"
74
Exclude="@(_NETStandardLibraryNETFrameworkLib->'$(MSBuildThisFileDirectory)\ref\%(FileName).dll')" />
85
</ItemGroup>

pkg/NETStandard.Library.NETFramework/targets/net462/NETStandard.Library.NETFramework.targets

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<ItemGroup Condition="'$(ImplicitlyExpandNETStandardFacades)' == 'true'">
3-
<_NETStandardLibraryNETFrameworkReference Include="$(MSBuildThisFileDirectory)\ref\*.dll"
4-
Exclude="@(_NETStandardLibraryNETFrameworkReference->'$(MSBuildThisFileDirectory)\ref\%(FileName).dll')" />
5-
63
<_NETStandardLibraryNETFrameworkLib Include="$(MSBuildThisFileDirectory)\lib\*.dll"
74
Exclude="@(_NETStandardLibraryNETFrameworkLib->'$(MSBuildThisFileDirectory)\ref\%(FileName).dll')" />
85
</ItemGroup>

pkg/NETStandard.Library.NETFramework/targets/net47/NETStandard.Library.NETFramework.targets

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<ItemGroup Condition="'$(ImplicitlyExpandNETStandardFacades)' == 'true'">
3-
<_NETStandardLibraryNETFrameworkReference Include="$(MSBuildThisFileDirectory)\ref\*.dll"
4-
Exclude="@(_NETStandardLibraryNETFrameworkReference->'$(MSBuildThisFileDirectory)\ref\%(FileName).dll')" />
5-
63
<_NETStandardLibraryNETFrameworkLib Include="$(MSBuildThisFileDirectory)\lib\*.dll"
74
Exclude="@(_NETStandardLibraryNETFrameworkLib->'$(MSBuildThisFileDirectory)\ref\%(FileName).dll')" />
85
</ItemGroup>

src/netfx.force.conflict/dir.props

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
<!-- this assembly is not versioned, it only contains type forwards and will never be referenced by another assembly -->
66
<AssemblyVersion>0.0.0.0</AssemblyVersion>
77
<AssemblyKey>Open</AssemblyKey>
8-
<!-- this assembly only appears in ref -->
9-
<IsNetFxNETStandard>false</IsNetFxNETStandard>
10-
<IsNetFxNETStandardRef>true</IsNetFxNETStandardRef>
8+
<IsNetFxNETStandard>true</IsNetFxNETStandard>
119
</PropertyGroup>
1210
</Project>
File renamed without changes.
File renamed without changes.

src/netfx.force.conflict/ref/netfx.force.conflicts.csproj renamed to src/netfx.force.conflict/src/netfx.force.conflicts.csproj

File renamed without changes.

0 commit comments

Comments
 (0)