Skip to content

[release/8.0] Add SBRP attribute #802

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

Merged
merged 9 commits into from
Oct 16, 2023
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
4 changes: 4 additions & 0 deletions src/SourceBuildAssemblyMetdata.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

[assembly: System.Reflection.AssemblyMetadata("source", "source-build-reference-packages")]
5 changes: 5 additions & 0 deletions src/referencePackages/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<Project>

<Import Project="..\..\Directory.Build.props" />

<ItemGroup>
<!-- Attributes for all Reference Packages -->
<Compile Include="$(RepoRoot)src\SourceBuildAssemblyMetdata.cs" />
</ItemGroup>

<PropertyGroup>
<!-- Common properties for all Reference Packages -->
Expand Down
10 changes: 8 additions & 2 deletions src/referencePackages/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,18 @@

<Target Name="CopyBuildOutputToTempOutput"
AfterTargets="CopyFilesToOutputDirectory">

<ItemGroup>
<CompileForRelativePath Include="@(Compile)" />
<CompileForRelativePath Remove="$(RepoRoot)src\SourceBuildAssemblyMetdata.cs" />
</ItemGroup>

<Error
Condition="@(Compile->Count()) != 1"
Condition="@(CompileForRelativePath->Count()) != 1"
Text="Number of Compile items != 1. We need just one, to determine the path of the resulting DLL in the package including ref/lib and TFM." />

<ItemGroup>
<FullCompileDir Include="$([System.IO.Directory]::GetParent('%(Compile.Identity)'))" />
<FullCompileDir Include="$([System.IO.Directory]::GetParent('%(CompileForRelativePath.Identity)'))" />
<RelativeCompileDir Include="$([MSBuild]::MakeRelative('$(MSBuildProjectDirectory)\', '%(FullCompileDir.Identity)'))" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
[assembly: AssemblyProduct("Microsoft® .NET Framework")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyFileVersion("6.0.21.52210")]
[assembly: AssemblyInformationalVersion("6.0.21.52210 built by: SOURCEBUILD")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyMetadata("", "")]
[assembly: AssemblyVersion("6.0.0.0")]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
[assembly: AssemblyProduct("Microsoft® .NET Framework")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyFileVersion("4.0.30319.17929")]
[assembly: AssemblyInformationalVersion("4.0.30319.17929 built by: SOURCEBUILD")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyMetadata("", "")]
[assembly: AssemblyVersion("4.0.0.0")]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
[assembly: AssemblyProduct("Microsoft® .NET Framework")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyFileVersion("4.0.40013.0")]
[assembly: AssemblyInformationalVersion("4.0.40013.0 built by: SOURCEBUILD")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyMetadata("", "")]
[assembly: AssemblyVersion("4.0.10.0")]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
[assembly: AssemblyProduct("Microsoft® .NET Framework")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyFileVersion("4.6.23123.00")]
[assembly: AssemblyInformationalVersion("4.6.23123.00 built by: SOURCEBUILD")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyMetadata("", "")]
[assembly: AssemblyVersion("4.0.20.0")]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
[assembly: AssemblyProduct("Microsoft® .NET Framework")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyFileVersion("1.0.24212.01")]
[assembly: AssemblyInformationalVersion("1.0.24212.01 built by: SOURCEBUILD")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyMetadata("", "")]
[assembly: AssemblyVersion("4.1.0.0")]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
[assembly: AssemblyProduct("Microsoft® .NET Framework")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyFileVersion("4.0.30319.17929")]
[assembly: AssemblyInformationalVersion("4.0.30319.17929 built by: SOURCEBUILD")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyMetadata("", "")]
[assembly: AssemblyVersion("4.0.0.0")]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
[assembly: AssemblyProduct("Microsoft® .NET Framework")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyFileVersion("4.0.40013.0")]
[assembly: AssemblyInformationalVersion("4.0.40013.0 built by: SOURCEBUILD")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyMetadata("", "")]
[assembly: AssemblyVersion("4.0.10.0")]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
[assembly: AssemblyProduct("Microsoft® .NET Framework")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyFileVersion("4.6.23123.00")]
[assembly: AssemblyInformationalVersion("4.6.23123.00 built by: SOURCEBUILD")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyMetadata("", "")]
[assembly: AssemblyVersion("4.0.20.0")]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
[assembly: AssemblyProduct("Microsoft® .NET Framework")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyFileVersion("1.0.24212.01")]
[assembly: AssemblyInformationalVersion("1.0.24212.01 built by: SOURCEBUILD")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyMetadata("", "")]
[assembly: AssemblyVersion("4.1.0.0")]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
[assembly: AssemblyProduct("Microsoft® .NET Framework")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyFileVersion("4.0.30319.17929")]
[assembly: AssemblyInformationalVersion("4.0.30319.17929 built by: SOURCEBUILD")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyMetadata("", "")]
[assembly: AssemblyVersion("4.0.0.0")]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
[assembly: AssemblyProduct("Microsoft® .NET Framework")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyFileVersion("4.0.40013.0")]
[assembly: AssemblyInformationalVersion("4.0.40013.0 built by: SOURCEBUILD")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyMetadata("", "")]
[assembly: AssemblyVersion("4.0.10.0")]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
[assembly: AssemblyProduct("Microsoft® .NET Framework")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyFileVersion("4.6.23123.00")]
[assembly: AssemblyInformationalVersion("4.6.23123.00 built by: SOURCEBUILD")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyMetadata("", "")]
[assembly: AssemblyVersion("4.0.20.0")]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
[assembly: AssemblyProduct("Microsoft® .NET Framework")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyFileVersion("1.0.24212.01")]
[assembly: AssemblyInformationalVersion("1.0.24212.01 built by: SOURCEBUILD")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyMetadata("", "")]
[assembly: AssemblyVersion("4.1.0.0")]


Expand Down
5 changes: 5 additions & 0 deletions src/targetPacks/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<Project>
<Import Project="..\..\Directory.Build.props" />

<ItemGroup>
<!-- Attributes for all Target Packages -->
<Compile Include="$(RepoRoot)src\SourceBuildAssemblyMetdata.cs" />
</ItemGroup>

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IncludeBuildOutput>false</IncludeBuildOutput>
Expand Down