Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion eng/targets/ResolveReferences.targets
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,11 @@
In addition, enforce use of Reference items for projects reference providers.
-->
<Target Name="_CheckForReferenceBoundaries" BeforeTargets="CollectPackageReferences;ResolveReferences">
<!-- Dependency graph checks may include unexpected packages. Ignore this because it's not an error. -->
<Error
Condition="@(_InvalidReferenceToNonSharedFxAssembly->Count()) != 0 AND '$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'"
Condition=" '$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' AND
'$(MSBuildRestoreSessionId)' != '' AND
@(_InvalidReferenceToNonSharedFxAssembly->Count()) != 0 "
Text="Cannot reference &quot;%(Identity)&quot;. This dependency is not in the shared framework. See docs/SharedFramework.md for instructions on how to modify what is in the shared framework." />

<Error
Expand Down
2 changes: 0 additions & 2 deletions src/Components/Ignitor/src/Ignitor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
<Reference Include="Microsoft.AspNetCore.SignalR.Client" />
<Reference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" />
<Reference Include="Microsoft.Extensions.Logging.Console" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.AspNetCore.SignalR.Common" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->

<!-- This project references the shared framework transitively. Prevent restore errors by setting this flag. -->
<GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
Expand All @@ -21,7 +20,6 @@
<Reference Include="Microsoft.EntityFrameworkCore.Relational" />
<Reference Include="Microsoft.EntityFrameworkCore.SQLite" />
<Reference Include="Microsoft.Extensions.Hosting" />

</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
<Reference Include="System.Security.Cryptography.Xml" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(MSBuildRestoreSessionId)' == ''">
<Reference Include="System.Security.Principal.Windows" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetFxTargetFramework)'">
<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetFxTargetFramework)' OR '$(MSBuildRestoreSessionId)' == ''">
<Reference Include="System.Runtime.InteropServices.RuntimeInformation" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
<ItemGroup>
<Reference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" />
<Reference Include="Microsoft.EntityFrameworkCore.InMemory" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.AspNetCore.DataProtection" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
<Reference Include="Microsoft.Extensions.Configuration.Json" />
<Reference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" />
<Reference Include="Microsoft.Extensions.DependencyInjection" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.AspNetCore.DataProtection" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
<Reference Include="Microsoft.EntityFrameworkCore.SqlServer" />
<Reference Include="Microsoft.Extensions.DependencyInjection" />
<Reference Include="Microsoft.Extensions.Logging.Console" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
</ItemGroup>

</Project>
2 changes: 0 additions & 2 deletions src/DataProtection/samples/Redis/Redis.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
<Reference Include="Microsoft.Extensions.DependencyInjection" />
<Reference Include="Microsoft.Extensions.Logging" />
<Reference Include="Microsoft.Extensions.Logging.Console" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.AspNetCore.DataProtection" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
<Reference Include="Microsoft.Extensions.Logging.Configuration" />
<Reference Include="Microsoft.Extensions.Logging.Console" />
<Reference Include="Microsoft.Extensions.Logging.Debug" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
<Reference Include="Microsoft.AspNetCore.Hosting" />
<Reference Include="Microsoft.AspNetCore.Http" />
<Reference Include="Microsoft.EntityFrameworkCore.Sqlite" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
<Reference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" />
<Reference Include="Microsoft.Extensions.Configuration.FileExtensions" />
<Reference Include="Microsoft.Extensions.Configuration.Json" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
<Reference Include="Microsoft.Extensions.Options" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == '$(DefaultNetFxTargetFramework)'">
<ItemGroup
Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == '$(DefaultNetFxTargetFramework)' OR '$(MSBuildRestoreSessionId)' == ''">
<Reference Include="System.ComponentModel.Annotations" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
<Reference Include="Microsoft.Extensions.Hosting" />
<Reference Include="Microsoft.Extensions.Logging.Console" />
<Reference Include="Microsoft.Extensions.Logging.Debug" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,5 @@
<Reference Include="Microsoft.Extensions.Configuration.UserSecrets" />
<Reference Include="Microsoft.Extensions.Logging.Console" />
<Reference Include="Microsoft.Extensions.Logging.Debug" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
<Reference Include="Microsoft.Extensions.Logging.Configuration" />
<Reference Include="Microsoft.Extensions.Logging.Console" />
<Reference Include="Microsoft.Extensions.Logging.Debug" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
</ItemGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<Reference Include="System.ValueTuple" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetFxTargetFramework)'">
<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetFxTargetFramework)' OR '$(MSBuildRestoreSessionId)' == ''">
<Reference Include="System.Net.Http" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
<Reference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" />
<Reference Include="Microsoft.AspNetCore.TestHost" />
<Reference Include="Microsoft.EntityFrameworkCore.Sqlite" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
<Reference Include="Microsoft.Extensions.Logging.Abstractions" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
<Reference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" />
<Reference Include="Microsoft.AspNetCore.Http" />
<Reference Include="Microsoft.EntityFrameworkCore.InMemory" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
</ItemGroup>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
<Reference Include="Microsoft.AspNetCore.Server.IISIntegration" />
<Reference Include="Microsoft.AspNetCore.Server.Kestrel" />
<Reference Include="Microsoft.EntityFrameworkCore.Sqlite" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
<Reference Include="Microsoft.EntityFrameworkCore.InMemory" />
<Reference Include="Microsoft.Extensions.DependencyInjection" />
<Reference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
<Reference Include="Microsoft.Extensions.Diagnostics.HealthChecks" />
<Reference Include="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
<Reference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" />
<Reference Include="Microsoft.Extensions.Logging.Console" />
<Reference Include="Newtonsoft.Json" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
<Reference Include="Microsoft.Extensions.Diagnostics.HealthChecks" />
<Reference Include="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,5 @@
<Reference Include="Microsoft.Extensions.Configuration.UserSecrets" />
<Reference Include="Microsoft.Extensions.Logging.Console" />
<Reference Include="Microsoft.Extensions.Logging.Debug" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@
<Compile Include="$(SharedSourceRoot)CodeAnalysis\*.cs" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == '$(DefaultNetFxTargetFramework)'">
<!-- Special case building from source because Microsoft.Bcl.AsyncInterfaces isn't available for source builds. -->
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR
'$(TargetFramework)' == '$(DefaultNetFxTargetFramework)' OR
('$(MSBuildRestoreSessionId)' == '' AND '$(DotNetBuildFromSource)' != 'true') ">
<Reference Include="Microsoft.Bcl.AsyncInterfaces" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<Reference Include="Microsoft.Extensions.Options" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetFxTargetFramework)'">
<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetFxTargetFramework)' OR '$(MSBuildRestoreSessionId)' == ''">
<Reference Include="System.Net.Http" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
<Reference Include="Microsoft.Extensions.Logging.Debug" />
<Reference Include="Newtonsoft.Json" />
<Reference Include="System.Reactive.Linq" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.AspNetCore.SignalR.Common" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
<Reference Include="Microsoft.AspNetCore.Connections.Abstractions" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == '$(DefaultNetFxTargetFramework)'">
<ItemGroup
Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == '$(DefaultNetFxTargetFramework)' OR '$(MSBuildRestoreSessionId)' == ''">
<Reference Include="System.Text.Json" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@
<Reference Include="Microsoft.Extensions.Options" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == '$(DefaultNetFxTargetFramework)'">
<ItemGroup
Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == '$(DefaultNetFxTargetFramework)' OR '$(MSBuildRestoreSessionId)' == ''">
<Reference Include="System.Text.Json" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetFxTargetFramework)'">
<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetFxTargetFramework)' OR '$(MSBuildRestoreSessionId)' == ''">
<Reference Include="System.Net.Sockets" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
<Reference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" />
<Reference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" />
<Reference Include="Microsoft.AspNetCore.Testing" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.AspNetCore.SignalR.Common" />

<Compile Include="$(SharedSourceRoot)ValueStopwatch\*.cs" />
<Compile Include="$(SharedSourceRoot)SignalR\*.cs" />
Expand Down
2 changes: 0 additions & 2 deletions src/SignalR/samples/ClientSample/ClientSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
<Reference Include="Microsoft.AspNetCore.SignalR.Client" />
<Reference Include="Microsoft.Extensions.Logging.Console" />
<Reference Include="Microsoft.Extensions.Logging" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.AspNetCore.SignalR.Common" />
</ItemGroup>

</Project>
2 changes: 0 additions & 2 deletions src/SignalR/samples/JwtClientSample/JwtClientSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

<ItemGroup>
<Reference Include="Microsoft.AspNetCore.SignalR.Client" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.AspNetCore.SignalR.Common" />
</ItemGroup>

</Project>
2 changes: 0 additions & 2 deletions src/SignalR/samples/SignalRSamples/SignalRSamples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
<Reference Include="Microsoft.Extensions.Configuration.CommandLine" />
<Reference Include="Microsoft.Extensions.Logging.Console" />
<Reference Include="System.Reactive.Linq" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.AspNetCore.SignalR.Common" />
</ItemGroup>

<Target Name="CopyTSClient" BeforeTargets="AfterBuild">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
<Reference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" />
<Reference Include="xunit.assert" />
<Reference Include="xunit.extensibility.core" />
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
<Reference Include="Microsoft.AspNetCore.SignalR.Common" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Testing/src/Microsoft.AspNetCore.Testing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<Reference Include="xunit.extensibility.execution" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetFxTargetFramework)'">
<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetFxTargetFramework)' OR '$(MSBuildRestoreSessionId)' == ''">
<Reference Include="System.Net.Http" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Testing/test/Microsoft.AspNetCore.Testing.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<Reference Include="System.Runtime.InteropServices.RuntimeInformation" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<ItemGroup Condition="'$(TargetFramework)' == 'net472' OR '$(MSBuildRestoreSessionId)' == ''">
<Reference Include="System.Net.Http" />
</ItemGroup>
</Project>
3 changes: 2 additions & 1 deletion src/WebEncoders/src/Microsoft.Extensions.WebEncoders.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
<Reference Include="Microsoft.Extensions.Options" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == '$(DefaultNetFxTargetFramework)'">
<ItemGroup
Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == '$(DefaultNetFxTargetFramework)' OR '$(MSBuildRestoreSessionId)' == ''">
<Reference Include="System.Text.Encodings.Web" />
</ItemGroup>

Expand Down