Skip to content

Commit

Permalink
Fix netfx assets referencing netstandard ones (#58499)
Browse files Browse the repository at this point in the history
From 56894f0.
A few projects didn't reference the .NETFramework assets in dependencies
and instead the .NETStandard ones.

Also a few assets specific a "-windows" RID even though they don't need
them. A .NETFramework "-windows" RID is only required when:
1. A netstandard2.0-windows tfm is present in the same project or
2. If a dependency is windows RID specific.
  • Loading branch information
ViktorHofer authored Sep 2, 2021
1 parent 6ff3287 commit 9bdd292
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Microsoft.Diagnostics.Tracing.EventSource</PackageDescription>
<PackageId>$(MSBuildProjectName)</PackageId>
<AssemblyName>Microsoft.Diagnostics.Tracing.EventSource</AssemblyName>
<DefineConstants>$(DefineConstants);NO_EVENTCOMMANDEXECUTED_SUPPORT;ES_BUILD_STANDALONE;FEATURE_MANAGED_ETW;TARGET_WINDOWS</DefineConstants>
<TargetFrameworks>net461-windows</TargetFrameworks>
<TargetFrameworks>net461</TargetFrameworks>
<Nullable>enable</Nullable>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<DefineConstants>$(DefineConstants);USE_MDT_EVENTSOURCE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFrameworks>net461-windows</TargetFrameworks>
<TargetFrameworks>net461</TargetFrameworks>
</PropertyGroup>
<PropertyGroup>
<SDTTestDir>..\..\System.Diagnostics.Tracing\tests</SDTTestDir>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<TargetFrameworks>$(NetCoreAppCurrent);net461</TargetFrameworks>
<TargetFrameworks>$(NetCoreAppCurrent);net48-windows</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonPath)System\Runtime\CompilerServices\IsExternalInit.cs" Link="Common\System\Runtime\CompilerServices\IsExternalInit.cs" />
Expand Down Expand Up @@ -52,7 +52,7 @@
<Compile Include="UtilsTests.cs" />
<Compile Include="VBMathTests.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<ProjectReference Include="$(LibrariesProjectRoot)System.Text.Encoding.CodePages\src\System.Text.Encoding.CodePages.csproj" />
<Reference Include="Microsoft.VisualBasic" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;net461-windows</TargetFrameworks>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;net461</TargetFrameworks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent);net461-windows</TargetFrameworks>
<TargetFrameworks>$(NetCoreAppCurrent);net461</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Compile Include="BasicScenarioTests.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputType>Exe</OutputType>
<TargetFrameworks>$(NetCoreAppCurrent);net461</TargetFrameworks>
<TargetFrameworks>$(NetCoreAppCurrent);net461-windows</TargetFrameworks>
<Nullable>annotations</Nullable>
</PropertyGroup>
<ItemGroup>
Expand Down Expand Up @@ -40,4 +40,7 @@
<ItemGroup>
<ProjectReference Include="..\..\src\System.ServiceProcess.ServiceController.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<Reference Include="System.ServiceProcess" />
</ItemGroup>
</Project>

0 comments on commit 9bdd292

Please sign in to comment.