Skip to content

Commit

Permalink
Only use the targeting pack nuget packages on non-windows
Browse files Browse the repository at this point in the history
Ideally we would use the .NET framework targeting pack references
everywhere but right now we are hitting error:

: error MSB3245: Could not resolve this reference. Could not locate the assembly "System.Runtime". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

github issue dotnet/installer#2455
  • Loading branch information
weshaggard committed Aug 14, 2019
1 parent 83ca2b7 commit 28d9c9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eng/Directory.Build.Data.targets
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Error Condition="'@(RequiredTargetFrameworks)' == ''" Text="List of required target frameworks is empty something must have messed up property RequiredTargetFrameworks[$(RequiredTargetFrameworks)]." />
<Error Condition="'@(MissingTargetFrameworks)' != ''" Text="Missing required target frameworks '@(MissingTargetFrameworks)'. Please ensure you add those frameworks." />
</Target>

<!-- Set PackageProjectUrl to the package README for Client Libraries -->
<Target Name="SetPackageProjectUrl" BeforeTargets="ValidateTargetFrameworks" Condition="'$(IsClientLibrary)' == 'true' and '$(IsTestProject)' != 'true' and
'$(IsSamplesProject)' != 'true' and '$(IsTestSupportProject)' != 'true' and '$(CommitSHA)' != ''">
Expand All @@ -26,7 +26,7 @@
<!-- This allows us to build .NET Framework targets on non-windows
TODO: Move the NETFramework reference assemblies to a feed other then the roslyn feed.
-->
<ItemGroup Condition="'$(IsTargetingNetFx)' == 'true'">
<ItemGroup Condition="'$(IsTargetingNetFx)' == 'true' and '$(OS)' != 'Windows_NT'">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="all" IsImplicitlyDefined="true" />
</ItemGroup>

Expand Down

0 comments on commit 28d9c9f

Please sign in to comment.