diff --git a/src/referencePackages/Directory.Build.targets b/src/referencePackages/Directory.Build.targets index 94669bd124..2a66234432 100644 --- a/src/referencePackages/Directory.Build.targets +++ b/src/referencePackages/Directory.Build.targets @@ -112,7 +112,7 @@ AfterTargets="CopyFilesToOutputDirectory"> - + System.Collections.Immutable + + + + + diff --git a/src/referencePackages/src/system.collections.immutable/8.0.0/System.Collections.Immutable.Manual.cs b/src/referencePackages/src/system.collections.immutable/8.0.0/System.Collections.Immutable.Manual.cs new file mode 100644 index 0000000000..d5a436a142 --- /dev/null +++ b/src/referencePackages/src/system.collections.immutable/8.0.0/System.Collections.Immutable.Manual.cs @@ -0,0 +1,61 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +// ------------------------------------------------------------------------------ +// Changes to this file must follow the http://aka.ms/api-review process. +// ------------------------------------------------------------------------------ + +// See https://github.com/dotnet/sdk/issues/33693 for why this is necessary. + +namespace System.Collections.Immutable +{ + [Runtime.CompilerServices.CollectionBuilder(typeof(ImmutableList), "Create")] + public partial interface IImmutableList + {} + + [Runtime.CompilerServices.CollectionBuilder(typeof(ImmutableQueue), "Create")] + public partial interface IImmutableQueue + {} + + [Runtime.CompilerServices.CollectionBuilder(typeof(ImmutableHashSet), "Create")] + public partial interface IImmutableSet + {} + + [Runtime.CompilerServices.CollectionBuilder(typeof(ImmutableStack), "Create")] + public partial interface IImmutableStack + {} + + [Runtime.CompilerServices.CollectionBuilder(typeof(ImmutableArray), "Create")] + public readonly partial struct ImmutableArray + {} + + [Runtime.CompilerServices.CollectionBuilder(typeof(ImmutableHashSet), "Create")] + public sealed partial class ImmutableHashSet + {} + + [Runtime.CompilerServices.CollectionBuilder(typeof(ImmutableList), "Create")] + public sealed partial class ImmutableList + {} + + [Runtime.CompilerServices.CollectionBuilder(typeof(ImmutableQueue), "Create")] + public sealed partial class ImmutableQueue + {} + + [Runtime.CompilerServices.CollectionBuilder(typeof(ImmutableSortedSet), "Create")] + public sealed partial class ImmutableSortedSet + {} + + [Runtime.CompilerServices.CollectionBuilder(typeof(ImmutableStack), "Create")] + public sealed partial class ImmutableStack + {} +} + +namespace System.Runtime.CompilerServices +{ + internal sealed class CollectionBuilderAttribute(Type builderType, string methodName) : Attribute + { + public Type BuilderType { get; } = builderType; + + public string MethodName { get; } = methodName; + } +} \ No newline at end of file