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

[Draft] Remove reference projects from nearly all out-of-band projects #65775

Closed
wants to merge 2 commits into from
Closed
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// ------------------------------------------------------------------------------
// Changes to this file must follow the https://aka.ms/api-review process.
// This file is auto-generated and any changes to it will be lost.
// ------------------------------------------------------------------------------

[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Extensions.DependencyInjection.ServiceCollection))]
20 changes: 20 additions & 0 deletions eng/resolveContract.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
<ContractDependencyPaths Condition="'$(ContractDependencyPaths)' == ''">@(ReferencePath->'%(RelativeDir)'->Distinct())</ContractDependencyPaths>
<!-- Fall back to the targeting pack dir for NetCoreAppCurrent to avoid passing through dependencies from ref to src. -->
<ContractDependencyPaths Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '$(NetCoreAppCurrent)'))">$(ContractDependencyPaths);$(MicrosoftNetCoreAppRefPackRefDir)</ContractDependencyPaths>

<!-- Ignore the .ref.cs file-->
<ReferenceSourceTargetName>$(TargetName).ref.g.cs</ReferenceSourceTargetName>
<!-- Rename to DefaultExcludesInProjectFolder when https://github.com/dotnet/sdk/pull/24063 is merged and consumed. -->
<DefaultItemExcludesInProjectFolder>$(ReferenceSourceTargetName)</DefaultItemExcludesInProjectFolder>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -14,6 +19,21 @@
<GenAPILangVersion Condition="'$(LangVersion)' != ''">$(LangVersion)</GenAPILangVersion>
</PropertyGroup>

<!-- Create a reference source file from the platform agnostic NetCoreAppCurrent assembly and make sure that it isn't treated as a compile input. -->
<PropertyGroup Condition="'$(ProduceReferenceAssembly)' == 'true' and
'$(IsSourceProject)' == 'true' and
'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
$([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '$(NETCoreAppCurrentVersion)')) and
'$(TargetFrameworkSuffix)' == '' and
'$(DotNetBuildFromSource)' != 'true'">
<!-- Use a different header and don't feed in an attribute exclusion list. -->
<GenAPITargetPath>$(MSBuildProjectDirectory)\$(ReferenceSourceTargetName)</GenAPITargetPath>
<GenAPIHeaderFile>$(RepositoryEngineeringDir)LicenseHeader.Generated.txt</GenAPIHeaderFile>
<GenAPIExcludeAttributesList />
<GenerateReferenceAssemblySource Condition="'$(GenerateReferenceAssemblySource)' == ''">true</GenerateReferenceAssemblySource>
<TargetsTriggeredByCompilation>$(TargetsTriggeredByCompilation);GenerateReferenceAssemblySource</TargetsTriggeredByCompilation>
</PropertyGroup>

<PropertyGroup Condition="'$(IsSourceProject)' == 'true'">
<ContractProject Condition="'$(ContractProject)' == ''">$(LibrariesProjectRoot)$(MSBuildProjectName)\ref\$(MSBuildProjectName).csproj</ContractProject>
<HasMatchingContract Condition="'$(HasMatchingContract)' == '' and Exists('$(ContractProject)')">true</HasMatchingContract>
Expand Down
3 changes: 2 additions & 1 deletion src/libraries/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@
<PropertyGroup>
<!-- Default any assembly not specifying a key to use the Open Key -->
<StrongNameKeyId>Open</StrongNameKeyId>
<!-- Microsoft.Extensions projects have a separate StrongNameKeyId -->
<!-- Microsoft.Extensions projects have a separate StrongNameKeyId and no dedicated reference project. -->
<StrongNameKeyId Condition="$(MSBuildProjectName.StartsWith('Microsoft.Extensions.'))">MicrosoftAspNetCore</StrongNameKeyId>
<ProduceReferenceAssembly Condition="$(MSBuildProjectName.StartsWith('Microsoft.Extensions.')) and '$(IsSourceProject)' == 'true'">true</ProduceReferenceAssembly>
<!-- We can't generate an apphost without restoring the targeting pack. -->
<UseAppHost>false</UseAppHost>
<EnableDefaultItems>false</EnableDefaultItems>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Caching.Abstractions", "ref\Microsoft.Extensions.Caching.Abstractions.csproj", "{E206E7BE-3269-4E6E-BF22-0E20B687E90C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Caching.Abstractions", "src\Microsoft.Extensions.Caching.Abstractions.csproj", "{5904EB23-3221-4992-A1F9-70F8B5478DF2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\ref\Microsoft.Extensions.Primitives.csproj", "{3CE7A561-5A2F-4AF3-8CC2-8148BC5CCE90}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\src\Microsoft.Extensions.Primitives.csproj", "{9556B0C4-098C-45E3-A7EB-1A219B7F941C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DllImportGenerator", "..\System.Runtime.InteropServices\gen\DllImportGenerator\DllImportGenerator.csproj", "{D71A4150-166D-4195-90BC-5A44035FD836}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{22B98A76-A2BE-47ED-82F2-9BD0EF50B22D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{4B23C940-1856-48C0-94F2-66D4ADC41EA4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F5D1F8C5-8A12-4EE8-9ABA-D393EBBCB1AA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{CF895AB4-6805-4E7D-B8B3-7D363C7D6027}"
Expand All @@ -23,18 +17,10 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E206E7BE-3269-4E6E-BF22-0E20B687E90C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E206E7BE-3269-4E6E-BF22-0E20B687E90C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E206E7BE-3269-4E6E-BF22-0E20B687E90C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E206E7BE-3269-4E6E-BF22-0E20B687E90C}.Release|Any CPU.Build.0 = Release|Any CPU
{5904EB23-3221-4992-A1F9-70F8B5478DF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5904EB23-3221-4992-A1F9-70F8B5478DF2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5904EB23-3221-4992-A1F9-70F8B5478DF2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5904EB23-3221-4992-A1F9-70F8B5478DF2}.Release|Any CPU.Build.0 = Release|Any CPU
{3CE7A561-5A2F-4AF3-8CC2-8148BC5CCE90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3CE7A561-5A2F-4AF3-8CC2-8148BC5CCE90}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3CE7A561-5A2F-4AF3-8CC2-8148BC5CCE90}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3CE7A561-5A2F-4AF3-8CC2-8148BC5CCE90}.Release|Any CPU.Build.0 = Release|Any CPU
{9556B0C4-098C-45E3-A7EB-1A219B7F941C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9556B0C4-098C-45E3-A7EB-1A219B7F941C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9556B0C4-098C-45E3-A7EB-1A219B7F941C}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -52,8 +38,6 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{E206E7BE-3269-4E6E-BF22-0E20B687E90C} = {4B23C940-1856-48C0-94F2-66D4ADC41EA4}
{3CE7A561-5A2F-4AF3-8CC2-8148BC5CCE90} = {4B23C940-1856-48C0-94F2-66D4ADC41EA4}
{5904EB23-3221-4992-A1F9-70F8B5478DF2} = {F5D1F8C5-8A12-4EE8-9ABA-D393EBBCB1AA}
{9556B0C4-098C-45E3-A7EB-1A219B7F941C} = {F5D1F8C5-8A12-4EE8-9ABA-D393EBBCB1AA}
{D71A4150-166D-4195-90BC-5A44035FD836} = {CF895AB4-6805-4E7D-B8B3-7D363C7D6027}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// ------------------------------------------------------------------------------
// Changes to this file must follow the https://aka.ms/api-review process.
// This file is auto-generated and any changes to it will be lost.
// ------------------------------------------------------------------------------

namespace Microsoft.Extensions.Caching.Distributed
Expand All @@ -22,6 +23,7 @@ public DistributedCacheEntryOptions() { }
public static partial class DistributedCacheExtensions
{
public static string? GetString(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key) { throw null; }
[System.Diagnostics.DebuggerStepThroughAttribute]
public static System.Threading.Tasks.Task<string?> GetStringAsync(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) { throw null; }
public static void Set(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, byte[] value) { }
public static System.Threading.Tasks.Task SetAsync(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, byte[] value, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) { throw null; }
Expand Down Expand Up @@ -60,6 +62,7 @@ public static partial class CacheEntryExtensions
public static partial class CacheExtensions
{
public static object? Get(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key) { throw null; }
[System.Diagnostics.DebuggerStepThroughAttribute]
public static System.Threading.Tasks.Task<TItem?> GetOrCreateAsync<TItem>(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key, System.Func<Microsoft.Extensions.Caching.Memory.ICacheEntry, System.Threading.Tasks.Task<TItem>> factory) { throw null; }
public static TItem? GetOrCreate<TItem>(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key, System.Func<Microsoft.Extensions.Caching.Memory.ICacheEntry, TItem> factory) { throw null; }
public static TItem? Get<TItem>(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key) { throw null; }
Expand Down Expand Up @@ -120,17 +123,17 @@ public partial class MemoryCacheEntryOptions
public MemoryCacheEntryOptions() { }
public System.DateTimeOffset? AbsoluteExpiration { get { throw null; } set { } }
public System.TimeSpan? AbsoluteExpirationRelativeToNow { get { throw null; } set { } }
public System.Collections.Generic.IList<Microsoft.Extensions.Primitives.IChangeToken> ExpirationTokens { get { throw null; } }
public System.Collections.Generic.IList<Microsoft.Extensions.Caching.Memory.PostEvictionCallbackRegistration> PostEvictionCallbacks { get { throw null; } }
public Microsoft.Extensions.Caching.Memory.CacheItemPriority Priority { get { throw null; } set { } }
public System.Collections.Generic.IList<Microsoft.Extensions.Primitives.IChangeToken> ExpirationTokens { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public System.Collections.Generic.IList<Microsoft.Extensions.Caching.Memory.PostEvictionCallbackRegistration> PostEvictionCallbacks { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public Microsoft.Extensions.Caching.Memory.CacheItemPriority Priority { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public long? Size { get { throw null; } set { } }
public System.TimeSpan? SlidingExpiration { get { throw null; } set { } }
}
public partial class PostEvictionCallbackRegistration
{
public PostEvictionCallbackRegistration() { }
public Microsoft.Extensions.Caching.Memory.PostEvictionDelegate? EvictionCallback { get { throw null; } set { } }
public object? State { get { throw null; } set { } }
public Microsoft.Extensions.Caching.Memory.PostEvictionDelegate? EvictionCallback { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public object? State { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
}
public delegate void PostEvictionDelegate(object key, object? value, Microsoft.Extensions.Caching.Memory.EvictionReason reason, object? state);
}
Expand Down
Loading