Skip to content

Commit f897de5

Browse files
Fix non-shared framework packages referencing transport package (#43784)
1 parent f957ce8 commit f897de5

File tree

6 files changed

+10
-3
lines changed

6 files changed

+10
-3
lines changed

eng/Workarounds.targets

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
</Target>
5050

5151
<!-- Work around https://github.com/dotnet/aspnetcore/issues/34048 -->
52-
<Target Name="_RemoveDuplicateLoggingSourceGenerator" AfterTargets="ResolvePackageAssets" Condition="'$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'">
52+
<Target Name="_RemoveDuplicateLoggingSourceGenerator" AfterTargets="ResolvePackageAssets" Condition="'$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' AND
53+
('$(IsAspNetCoreApp)' == 'true' OR '$(UseAspNetCoreSharedRuntime)' == 'true')">
5354
<ItemGroup>
5455
<ResolvedAnalyzers Remove="@(ResolvedAnalyzers)" Condition="'%(ResolvedAnalyzers.NuGetPackageId)' == 'Microsoft.Extensions.Logging.Abstractions'" />
5556
<ResolvedAnalyzers Remove="@(ResolvedAnalyzers)" Condition="'%(ResolvedAnalyzers.NuGetPackageId)' == 'System.Text.Json'" />

eng/targets/ResolveReferences.targets

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,9 @@
253253
-->
254254
<ItemGroup Condition=" '$(MSBuildProjectName)' != 'Microsoft.AspNetCore.App.Runtime' AND
255255
'$(MSBuildProjectName)' != 'RepoTasks' AND
256-
($(_CompileTfmUsingReferenceAssemblies) OR '$(MSBuildProjectName)' == 'Microsoft.AspNetCore.App.Ref') ">
256+
('$(MSBuildProjectName)' == 'Microsoft.AspNetCore.App.Ref' OR
257+
(('$(IsAspNetCoreApp)' == 'true' OR '$(UseAspNetCoreSharedRuntime)' == 'true') AND
258+
$(_CompileTfmUsingReferenceAssemblies))) ">
257259
<PackageReference Include="Microsoft.Internal.Runtime.AspNetCore.Transport"
258260
Version="$(MicrosoftInternalRuntimeAspNetCoreTransportVersion)"
259261
IsImplicitlyDefined="true"

src/Identity/ApiAuthorization.IdentityServer/src/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
@@ -29,6 +29,7 @@
2929
<Reference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
3030
<Reference Include="Microsoft.AspNetCore.Mvc" />
3131
<Reference Include="Microsoft.Extensions.Http" />
32+
<Reference Include="Microsoft.Extensions.Configuration.Binder" />
3233
</ItemGroup>
3334

3435
</Project>

src/Security/Authentication/Negotiate/src/Microsoft.AspNetCore.Authentication.Negotiate.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<Reference Include="Microsoft.AspNetCore.Connections.Abstractions" />
1414
<Reference Include="Microsoft.AspNetCore.Hosting.Abstractions" />
1515
<Reference Include="Microsoft.AspNetCore.Hosting.Server.Abstractions" />
16+
<Reference Include="Microsoft.Extensions.Caching.Memory" />
1617
<Reference Include="System.DirectoryServices.Protocols" />
1718
</ItemGroup>
1819

src/Shared/BrowserTesting/src/Microsoft.AspNetCore.BrowserTesting.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<Reference Include="Microsoft.Playwright" Condition="'$(IsPlaywrightAvailable)' == 'true'" />
1313
<Reference Include="Microsoft.Playwright" ExcludeAssets="build" Condition="'$(IsPlaywrightAvailable)' != 'true'" />
1414
<Reference Include="Microsoft.AspNetCore.Testing" />
15+
<Reference Include="Microsoft.Extensions.Configuration.Json" />
1516
</ItemGroup>
1617

1718
</Project>

src/Tools/dotnet-user-jwts/src/dotnet-user-jwts.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<Reference Include="System.IdentityModel.Tokens.Jwt" />
3131
<Reference Include="Microsoft.Extensions.Configuration.Abstractions" />
3232
<Reference Include="Microsoft.Extensions.Configuration" />
33+
<Reference Include="Microsoft.Extensions.Configuration.Binder" />
3334
<Reference Include="Microsoft.Extensions.Configuration.UserSecrets" />
3435
</ItemGroup>
3536

0 commit comments

Comments
 (0)