Skip to content

Commit 09dc0fe

Browse files
authored
Fix VS complaining about missing projects in slns (#68488)
* Fix VS complaining about missing projects in slns Remove inbox (Project-)References in out-of-band projects as these projects already build on top of the shared framework (targeting pack). * Update Microsoft.Extensions ref projects * Update Microsoft.Extensions src projects * Update graph dependencies of Microsoft.Extensions* * Update sources that complained about Span usage
1 parent fc2f06e commit 09dc0fe

File tree

90 files changed

+109
-543
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+109
-543
lines changed

eng/generators.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
or ('@(ProjectReference)' != ''
2222
and @(ProjectReference->AnyHaveMetadataValue('Identity', '$(CoreLibProject)')))
2323
or ('$(NetCoreAppCurrentTargetFrameworkMoniker)' == '$(TargetFrameworkMoniker)'
24-
and '$(DisableImplicitAssemblyReferences)' == 'false'))" />
24+
and '$(DisableImplicitAssemblyReferences)' != 'true'))" />
2525
<EnabledGenerators Include="LibraryImportGenerator"
2626
Condition="'$(EnableLibraryImportGenerator)' == ''
2727
and '$(IsSourceProject)' == 'true'

eng/targetingpacks.targets

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<PropertyGroup Condition="'$(DisableImplicitFrameworkReferences)' != 'true' and
1818
'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
19-
$([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '$(NetCoreAppCurrentVersion)'))">
19+
'$(TargetFrameworkVersion)' == 'v$(NetCoreAppCurrentVersion)'">
2020
<UseLocalTargetingRuntimePack Condition="'$(UseLocalTargetingRuntimePack)' == ''">true</UseLocalTargetingRuntimePack>
2121
<!-- Tests don't yet use a live build of the apphost: https://github.com/dotnet/runtime/issues/58109. -->
2222
<UseLocalAppHostPack Condition="'$(UseLocalAppHostPack)' == ''">false</UseLocalAppHostPack>
@@ -67,20 +67,14 @@
6767
</Reference>
6868
</ItemGroup>
6969

70-
<!-- DisableImplicitAssemblyReferences support. -->
7170
<Target Name="RemoveFrameworkReferences"
7271
BeforeTargets="_HandlePackageFileConflicts"
7372
AfterTargets="ResolveTargetingPackAssets"
74-
Condition="'$(DisableImplicitAssemblyReferences)' == 'true' and
75-
'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
73+
Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
7674
<!-- Point MicrosoftNetCoreAppRefPackRefDir to the acquired targeting pack to use it later for AssemblySearchPaths resolution. -->
77-
<PropertyGroup Condition="'$(UseLocalTargetingRuntimePack)' != 'true'">
75+
<PropertyGroup Condition="'$(TargetFrameworkVersion)' != 'v$(NetCoreAppCurrentVersion)'">
7876
<MicrosoftNetCoreAppRefPackRefDir>%(ResolvedFrameworkReference.TargetingPackPath)\ref\net$(TargetFrameworkVersion.TrimStart('v'))\</MicrosoftNetCoreAppRefPackRefDir>
7977
</PropertyGroup>
80-
<ItemGroup>
81-
<Reference Remove="@(Reference)"
82-
Condition="'%(Reference.FrameworkReferenceName)' == '$(LocalFrameworkOverrideName)'" />
83-
</ItemGroup>
8478
</Target>
8579

8680
<!-- Add the resolved targeting pack to the assembly search path. -->

src/libraries/Directory.Build.targets

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@
5151
<DisableImplicitFrameworkReferences Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
5252
$([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '$(NETCoreAppCurrentVersion)')) and
5353
('$(IsNETCoreAppRef)' == 'true' or '$(IsNETCoreAppSrc)' == 'true')">true</DisableImplicitFrameworkReferences>
54-
<!-- Disable implicit assembly references for .NETCoreApp refs and sources. -->
55-
<DisableImplicitAssemblyReferences Condition="'$(DisableImplicitAssemblyReferences)' == '' and
56-
'$(DisableImplicitFrameworkReferences)' != 'true' and
57-
'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
58-
('$(IsReferenceAssemblyProject)' == 'true' or '$(IsSourceProject)' == 'true')">true</DisableImplicitAssemblyReferences>
5954
<!-- Enable trimming for any source project that's part of the shared framework.
6055
Don't attempt to trim PNSE assemblies which are generated from the reference source. -->
6156
<ILLinkTrimAssembly Condition="'$(ILLinkTrimAssembly)' == '' and

src/libraries/Microsoft.Extensions.Caching.Abstractions/ref/Microsoft.Extensions.Caching.Abstractions.csproj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@
88
<Compile Include="Microsoft.Extensions.Caching.Abstractions.net6.0.cs" Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))" />
99
<Compile Include="Microsoft.Extensions.Caching.Abstractions.Typeforwards.netcoreapp.cs" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'"/>
1010
<Compile Include="$(CoreLibSharedDir)System\Runtime\CompilerServices\IsExternalInit.cs" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'"
11-
Link="Common\System\Runtime\CompilerServices\IsExternalInit.cs" />
12-
<ProjectReference Include="..\..\Microsoft.Extensions.Primitives\ref\Microsoft.Extensions.Primitives.csproj" />
11+
Link="Common\System\Runtime\CompilerServices\IsExternalInit.cs" />
1312
</ItemGroup>
1413

15-
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(TargetFramework)' != '$(NetCoreAppCurrent)'">
16-
<Reference Include="System.Runtime" />
14+
<ItemGroup>
15+
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Primitives\ref\Microsoft.Extensions.Primitives.csproj" />
1716
</ItemGroup>
1817
</Project>

src/libraries/Microsoft.Extensions.Caching.Abstractions/src/Microsoft.Extensions.Caching.Abstractions.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
<PropertyGroup>
44
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
55
<EnableDefaultItems>true</EnableDefaultItems>
6-
<!-- Use targeting pack references instead of granular ones in the project file. -->
7-
<DisableImplicitAssemblyReferences>false</DisableImplicitAssemblyReferences>
86
<IsPackable>true</IsPackable>
97
<PackageDescription>Caching abstractions for in-memory cache and distributed cache.
108

src/libraries/Microsoft.Extensions.Caching.Memory/ref/Microsoft.Extensions.Caching.Memory.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,4 @@
1313
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj" />
1414
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Options\ref\Microsoft.Extensions.Options.csproj" />
1515
</ItemGroup>
16-
17-
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(TargetFramework)' != '$(NetCoreAppCurrent)'">
18-
<Reference Include="System.Runtime" />
19-
</ItemGroup>
2016
</Project>

src/libraries/Microsoft.Extensions.Caching.Memory/src/Microsoft.Extensions.Caching.Memory.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
<PropertyGroup>
44
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
55
<EnableDefaultItems>true</EnableDefaultItems>
6-
<!-- Use targeting pack references instead of granular ones in the project file. -->
7-
<DisableImplicitAssemblyReferences>false</DisableImplicitAssemblyReferences>
86
<IsPackable>true</IsPackable>
97
<PackageDescription>In-memory cache implementation of Microsoft.Extensions.Caching.Memory.IMemoryCache.</PackageDescription>
108
</PropertyGroup>

src/libraries/Microsoft.Extensions.Configuration.Abstractions/ref/Microsoft.Extensions.Configuration.Abstractions.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,4 @@
1010
<ItemGroup>
1111
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Primitives\ref\Microsoft.Extensions.Primitives.csproj" />
1212
</ItemGroup>
13-
14-
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(TargetFramework)' != '$(NetCoreAppCurrent)'">
15-
<Reference Include="System.Runtime" />
16-
</ItemGroup>
1713
</Project>

src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/Microsoft.Extensions.Configuration.Abstractions.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
55
<IsPackable>true</IsPackable>
66
<EnableDefaultItems>true</EnableDefaultItems>
7-
<!-- Use targeting pack references instead of granular ones in the project file. -->
8-
<DisableImplicitAssemblyReferences>false</DisableImplicitAssemblyReferences>
97
<PackageDescription>Abstractions of key-value pair based configuration.
108

119
Commonly Used Types:

src/libraries/Microsoft.Extensions.Configuration.Binder/ref/Microsoft.Extensions.Configuration.Binder.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,4 @@
1616
<ItemGroup>
1717
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Configuration.Abstractions\ref\Microsoft.Extensions.Configuration.Abstractions.csproj" />
1818
</ItemGroup>
19-
20-
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(TargetFramework)' != '$(NetCoreAppCurrent)'">
21-
<Reference Include="System.Runtime" />
22-
</ItemGroup>
2319
</Project>

0 commit comments

Comments
 (0)