Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove targets* platform condition from project references #46377

Merged
merged 3 commits into from
Jan 4, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@
Link="Common\System\Diagnostics\NetFrameworkUtils.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Win32.Registry\src\Microsoft.Win32.Registry.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading.AccessControl\src\System.Threading.AccessControl.csproj" />
<Reference Include="Microsoft.Win32.Primitives" />
<Reference Include="System.Collections" />
<Reference Include="System.Collections.Specialized" />
Expand All @@ -126,7 +124,11 @@
<ItemGroup Condition="!$(TargetFramework.StartsWith('net4'))">
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Principal.Windows\src\System.Security.Principal.Windows.csproj" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('netcoreapp2.0')) or $(TargetFramework.StartsWith('$(NetCoreAppCurrent)'))">
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Win32.Registry\src\Microsoft.Win32.Registry.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading.AccessControl\src\System.Threading.AccessControl.csproj" />
</ItemGroup>

<!-- Ensure we run ResolveProjectReferences to add the message DLL to the package.
We do this here rather than in the pkgproj to ensure the package paths are in sync -->
<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@
<LogicalName>placeholder.ico</LogicalName>
</EmbeddedResource>
</ItemGroup>
<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<ItemGroup Condition="$(TargetFramework.StartsWith('netcoreapp3.0')) or $(TargetFramework.StartsWith('$(NetCoreAppCurrent)'))">
Anipik marked this conversation as resolved.
Show resolved Hide resolved
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Win32.SystemEvents\src\Microsoft.Win32.SystemEvents.csproj" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<ItemGroup>
<Reference Include="System.Runtime" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<ItemGroup Condition="$(TargetFramework.StartsWith('$(NetCoreAppCurrent)'))">
Anipik marked this conversation as resolved.
Show resolved Hide resolved
<ProjectReference Include="$(LibrariesProjectRoot)System.IO.FileSystem.AccessControl\src\System.IO.FileSystem.AccessControl.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.AccessControl\src\System.Security.AccessControl.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Principal.Windows\src\System.Security.Principal.Windows.csproj" />
Expand Down
6 changes: 4 additions & 2 deletions src/libraries/System.IO.Pipes/src/System.IO.Pipes.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,11 @@
<Reference Include="System.Threading.Overlapped" />
</ItemGroup>
<!-- Include src projects during restore as TargetsWindows isn't set. -->
<ItemGroup Condition="'$(TargetsWindows)' == 'true' or '$(MSBuildRestoreSessionId)' != ''">
<ItemGroup Condition="$(TargetFramework.StartsWith('$(NetCoreAppCurrent)')) or '$(MSBuildRestoreSessionId)' != ''">
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.AccessControl\src\System.Security.AccessControl.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Principal.Windows\src\System.Security.Principal.Windows.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Principal.Windows\src\System.Security.Principal.Windows.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsWindows)' == 'true' or '$(MSBuildRestoreSessionId)' != ''">
<Reference Include="System.Collections.NonGeneric" />
<Reference Include="System.Security.Claims" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/System.IO.Ports/src/System.IO.Ports.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard'))">
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
<ProjectReference Condition="'$(TargetsWindows)' == 'true'" Include="$(LibrariesProjectRoot)Microsoft.Win32.Registry\src\Microsoft.Win32.Registry.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Win32.Registry\src\Microsoft.Win32.Registry.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.CompilerServices.Unsafe\src\System.Runtime.CompilerServices.Unsafe.ilproj" />
</ItemGroup>
</Project>
6 changes: 4 additions & 2 deletions src/libraries/System.Net.Http/src/System.Net.Http.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<WindowsRID>win</WindowsRID>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down Expand Up @@ -646,7 +646,6 @@
<Reference Include="System.IO.Compression.Brotli" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsUnix)' == 'true'">
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.OpenSsl\src\System.Security.Cryptography.OpenSsl.csproj" />
<Reference Include="System.Console" Condition="'$(Configuration)' == 'Debug'" />
<Reference Include="System.Diagnostics.StackTrace" />
<Reference Include="System.IO.FileSystem" />
Expand Down Expand Up @@ -674,4 +673,7 @@
<ItemGroup>
<None Include="Resources\SR.resx" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.OpenSsl\src\System.Security.Cryptography.OpenSsl.csproj" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenSSL is a Unix only project, can this cause any issues on non-Unix?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a platform independent configuration in openssl

</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Principal.Windows\src\System.Security.Principal.Windows.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.OpenSsl\src\System.Security.Cryptography.OpenSsl.csproj" />
<Reference Include="Microsoft.Win32.Primitives" />
<Reference Include="System.Collections" />
<Reference Include="System.Collections.Concurrent" />
Expand All @@ -382,7 +383,6 @@
<Reference Include="System.Threading.ThreadPool" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsUnix)' == 'true'">
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.OpenSsl\src\System.Security.Cryptography.OpenSsl.csproj" />
<Reference Include="System.Console" Condition="'$(Configuration)' == 'Debug'" />
<Reference Include="System.Diagnostics.StackTrace" />
<Reference Include="System.Security.Cryptography.Algorithms" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -677,12 +677,14 @@
<Reference Include="System.Text.Encoding.Extensions" />
<Reference Include="System.Threading" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<ItemGroup Condition="$(TargetFramework.StartsWith('$(NetCoreAppCurrent)'))">
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.Cng\src\System.Security.Cryptography.Cng.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.OpenSsl\src\System.Security.Cryptography.OpenSsl.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Reference Include="System.Security.Cryptography.Csp" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsUnix)' == 'true' and '$(TargetsOSX)' != 'true' and '$(TargetsiOS)' != 'true' and '$(TargetstvOS)' != 'true'">
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.OpenSsl\src\System.Security.Cryptography.OpenSsl.csproj" />
<Reference Include="System.Diagnostics.StackTrace" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsUnix)' == 'true'">
Expand Down