Skip to content

Commit 2347c49

Browse files
committed
Build with CSharp file
1 parent b0d320b commit 2347c49

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

src/AssemblyInfo.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[assembly: System.Reflection.AssemblyMetadata("source", "source-build-reference-packages")]

src/referencePackages/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<ItemGroup>
66
<!-- Attributes for all Reference Packages -->
7-
<AssemblyMetadata Include="source" Value="source-build-reference-packages" />
7+
<Compile Include="$(RepoRoot)src\AssemblyInfo.cs" />
88
</ItemGroup>
99

1010
<PropertyGroup>

src/referencePackages/Directory.Build.targets

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@
120120

121121
<Target Name="CopyBuildOutputToTempOutput"
122122
AfterTargets="CopyFilesToOutputDirectory">
123+
124+
<ItemGroup>
125+
<Compile Remove="$(RepoRoot)src\AssemblyInfo.cs" />
126+
</ItemGroup>
127+
123128
<Error
124129
Condition="@(Compile->Count()) != 1"
125130
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." />

src/targetPacks/Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<Project>
22
<Import Project="..\..\Directory.Build.props" />
33

4+
<ItemGroup>
5+
<!-- Attributes for all Target Packages -->
6+
<Compile Include="$(RepoRoot)src\AssemblyInfo.cs" />
7+
</ItemGroup>
8+
49
<PropertyGroup>
510
<TargetFramework>netstandard2.0</TargetFramework>
611
<IncludeBuildOutput>false</IncludeBuildOutput>

0 commit comments

Comments
 (0)