Skip to content

Commit 23ba564

Browse files
committed
Fixed bug where the git information is not properly obtained and the head information was not properly dumped to the right file name.
This also sadly requires fixing the roslyn version to 4.0.1 for now to avoid loading errors when using the generator when building projects. Signed-off-by: AraHaan <seandhunt_7@yahoo.com>
1 parent d5beac0 commit 23ba564

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

build/GitBuildInfo.SourceGenerator.targets

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
WorkingDirectory="$(MSBuildProjectDirectory)"
1111
ConsoleToMSBuild="true"
1212
IgnoreExitCode="true"
13+
StandardOutputImportance="low"
1314
Condition="'$(GitHead)' == ''">
1415
<Output TaskParameter="ConsoleOutput" PropertyName="GitHead" />
1516
</Exec>
@@ -18,6 +19,7 @@
1819
WorkingDirectory="$(MSBuildProjectDirectory)"
1920
ConsoleToMSBuild="true"
2021
IgnoreExitCode="true"
22+
StandardOutputImportance="low"
2123
Condition="'$(CommitHash)' == ''">
2224
<Output TaskParameter="ConsoleOutput" PropertyName="CommitHash" />
2325
</Exec>
@@ -26,6 +28,7 @@
2628
WorkingDirectory="$(MSBuildProjectDirectory)"
2729
ConsoleToMSBuild="true"
2830
IgnoreExitCode="true"
31+
StandardOutputImportance="low"
2932
Condition="'$(GitBranch)' == ''">
3033
<Output TaskParameter="ConsoleOutput" PropertyName="GitBranch" />
3134
</Exec>

src/GitBuildInfo.SourceGenerator/Directory.Build.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<IsPackable>true</IsPackable>
7-
<Version>1.0.15</Version>
8-
<PackageReleaseNotes>Fixed bug where the git information is not properly obtained and the head information was not properly dumped to the right file name.</PackageReleaseNotes>
7+
<Version>1.0.16</Version>
8+
<PackageReleaseNotes>Fixed issue where the roslyn dependencies gets placed in the nuget package.</PackageReleaseNotes>
99
<Copyright>Copyright (c) 2021-2022</Copyright>
1010
<!-- Suppresses the warnings about the package not having assemblies in lib/*/.dll.-->
1111
<NoPackageAnalysis>true</NoPackageAnalysis>
1212
<!-- Special properties for analyzer packages. -->
1313
<IncludeBuildOutput>false</IncludeBuildOutput>
14-
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
14+
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
1515
<NoWarn>$(NoWarn);NU5128;NU5127</NoWarn>
1616
<NuSpecFile>GitBuildInfo.SourceGenerator.nuspec</NuSpecFile>
1717
<IsRoslynComponent>true</IsRoslynComponent>

src/GitBuildInfo.SourceGenerator/Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</ItemDefinitionGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="*-*" />
10+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" />
1111
</ItemGroup>
1212

1313
</Project>

src/GitBuildInfo.SourceGenerator/GitBuildInfo.SourceGenerator.targets

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
<ItemGroup>
1515
<!-- Analysis of C# projects -->
1616
<TfmSpecificPackageFile Include="$(TargetPath)" PackagePath="analyzers\cs\" />
17-
<TfmSpecificPackageFile Include="@(ReferencePath)" PackagePath="analyzers\cs\" Condition=" '%(FileName)%(Extension)' == 'Microsoft.CodeAnalysis.dll' " />
18-
<TfmSpecificPackageFile Include="@(SatelliteDllsProjectOutputGroupDependency)" PackagePath="analyzers\cs\%(SatelliteDllsProjectOutputGroupDependency.DestinationSubDirectory)" Condition=" '%(SatelliteDllsProjectOutputGroupDependency.DestinationSubDirectory)' != '' " />
19-
<TfmSpecificPackageFile Include="@(SatelliteDllsProjectOutputGroupOutput->'%(FinalOutputPath)')" PackagePath="analyzers\cs\%(SatelliteDllsProjectOutputGroupOutput.Culture)\" />
20-
<TfmSpecificPackageFile Include="%(_ResolvedProjectReferencePaths.Identity)" PackagePath="analyzers\cs\" />
2117
</ItemGroup>
2218
</Target>
2319

tests/Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22

33
<ItemGroup>
4-
<PackageReference Include="Microsoft.CodeAnalysis" Version="*-*" />
4+
<PackageReference Include="Microsoft.CodeAnalysis" Version="4.0.1" />
55
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="*-*" />
66
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.XUnit" Version="*-*" />
77
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.SourceGenerators.Testing" Version="*-*" />

0 commit comments

Comments
 (0)