Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
518ee61
Revert "Disable package signing"
AArnott Apr 29, 2023
d33a5d4
Fix BitBucket recognition of publicReleaseRefSpec
AArnott May 10, 2023
42295ab
Merge pull request #936 from dotnet/fix935
AArnott May 10, 2023
02d36b2
Downgrade Cake.Core to v2.3.0
kapsiR May 10, 2023
bc56096
Merge pull request #938 from kapsiR/fix-cake-version
AArnott May 11, 2023
b36f1fe
Revert "Drop BuildMetadata from NPM package version
AArnott May 17, 2023
2d32d93
Merge pull request #945 from dotnet/revertNpmVersion
AArnott May 17, 2023
4ea125e
Fix WPF incremental build
AArnott Sep 30, 2023
da15c4f
Merge pull request #982 from dotnet/fix175
AArnott Sep 30, 2023
da36fb9
Fix build.ps1 script
AArnott Nov 7, 2023
9ca060e
Merge pull request #994 from dotnet/fix992
AArnott Nov 7, 2023
d1ffce8
Bump xunit from 2.6.1 to 2.6.2 (#234)
dependabot[bot] Nov 20, 2023
ccd2c89
Bump Microsoft.SourceLink.GitHub from 1.1.1 to 8.0.0 (#232)
dependabot[bot] Nov 20, 2023
4289461
Bump powershell from 7.3.9 to 7.4.0 (#231)
dependabot[bot] Nov 20, 2023
7e872d3
Bump xunit.runner.visualstudio from 2.5.3 to 2.5.4 (#233)
dependabot[bot] Nov 20, 2023
5da8083
Validate formatted code in builds
AArnott Nov 22, 2023
1749a96
Merge pull request #235 from AArnott/dotnetFormat
AArnott Nov 22, 2023
c489050
Enable auto-format on save in VS and VS Code
AArnott Nov 22, 2023
41f6d27
Remove `dotnet-format` as a tool
AArnott Nov 22, 2023
27eb2a1
Merge pull request #236 from AArnott/removedotnet-format
AArnott Nov 22, 2023
ac3f1df
Make symbolic link failures more detectable
AArnott Nov 29, 2023
4177150
Add xml header to msbuild files
AArnott Nov 30, 2023
db44402
Stop VS Code from wrapping xml files
AArnott Dec 1, 2023
3a5c8f0
Add dotnet_separate_import_directive_groups to .editorconfig
AArnott Dec 11, 2023
f8f3f9e
Bump xunit from 2.6.2 to 2.6.3 (#239)
dependabot[bot] Dec 12, 2023
20c7541
Bump dotnet-coverage from 17.9.3 to 17.9.5 (#238)
dependabot[bot] Dec 12, 2023
37705a8
Bump xunit.runner.visualstudio from 2.5.4 to 2.5.5 (#237)
dependabot[bot] Dec 12, 2023
c3e4649
Bump dotnet-coverage from 17.9.5 to 17.9.6 (#240)
dependabot[bot] Dec 18, 2023
9198063
Bump xunit.runner.visualstudio from 2.5.5 to 2.5.6 (#243)
dependabot[bot] Dec 26, 2023
cd53181
Bump xunit from 2.6.3 to 2.6.4 (#242)
dependabot[bot] Dec 26, 2023
b9d62f3
Bump StyleCop.Analyzers.Unstable from 1.2.0.507 to 1.2.0.556 (#241)
dependabot[bot] Dec 26, 2023
130e9c8
Bump powershell from 7.4.0 to 7.4.1 (#245)
dependabot[bot] Jan 15, 2024
e1cc3ec
Change F# AssemblyInfo generation to always include a do() after the …
Numpsy Jan 16, 2024
a9e8765
Merge pull request #1024 from Numpsy/fs_assenbly_info
AArnott Jan 16, 2024
7fd4b16
Bump xunit from 2.6.4 to 2.6.6
AArnott Jan 23, 2024
050805e
Add switch to avoid creating symbolic links
AArnott Jan 25, 2024
9466f8e
Clarify parameter type in AzP template
AArnott Jan 26, 2024
4d1473c
Bump dotnet-coverage from 17.9.6 to 17.10.1Bumps [dotnet-coverage](ht…
dependabot[bot] Jan 29, 2024
ebb0607
Format init.ps1
AArnott Jan 30, 2024
e4fed75
Bump dotnet-coverage from 17.10.1 to 17.10.2 (#250)
dependabot[bot] Feb 6, 2024
420207f
Recommend prettier
AArnott Feb 9, 2024
c70b656
Identify AzP-related YAML files
AArnott Feb 9, 2024
0f2cb2e
Bump Microsoft.NET.Test.Sdk from 17.8.0 to 17.9.0 (#251)
dependabot[bot] Feb 12, 2024
aa19fdd
Bump .NET SDK from 8.0.100 to 8.0.201
AArnott Feb 19, 2024
4d78e3c
Bump xunit.runner.visualstudio from 2.5.6 to 2.5.7 (#254)
dependabot[bot] Feb 19, 2024
4540dc5
Bump dotnet-coverage from 17.10.2 to 17.10.3 (#252)
dependabot[bot] Feb 19, 2024
089ec69
Merge pull request #255 from AArnott/sdk_update
AArnott Feb 19, 2024
7dec010
Bump xunit from 2.6.6 to 2.7.0 (#253)
dependabot[bot] Feb 19, 2024
b21987e
fix typo
AArnott Feb 21, 2024
3271c78
Bump dotnet-coverage from 17.10.3 to 17.10.4 (#264)
dependabot[bot] Mar 25, 2024
532c04e
Merge remote-tracking branch 'libtemplate/main' into libtemplateUpdate
AArnott Apr 1, 2024
73d4074
Update SDK version references
AArnott Apr 1, 2024
4fd3c68
Run `dotnet format`
AArnott Apr 2, 2024
27edc6c
Bump dependencies
AArnott Apr 18, 2024
3eb6d97
Merge pull request #265 from AArnott/bumpDependencies
AArnott Apr 18, 2024
ace9391
Bump xunit to 2.8.0
AArnott Apr 30, 2024
17a14fa
Merge remote-tracking branch 'origin/v3.6' into mergev3.6
AArnott May 17, 2024
ec30afd
Merge branch 'mergev3.6' into libtemplateUpdate
AArnott May 17, 2024
aeef985
Merge remote-tracking branch 'libtemplate/main' into libtemplateUpdate
AArnott May 17, 2024
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
10 changes: 2 additions & 8 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,13 @@
"isRoot": true,
"tools": {
"powershell": {
"version": "7.3.9",
"version": "7.4.2",
"commands": [
"pwsh"
]
},
"dotnet-format": {
"version": "5.1.250801",
"commands": [
"dotnet-format"
]
},
"dotnet-coverage": {
"version": "17.9.3",
"version": "17.11.0",
"commands": [
"dotnet-coverage"
]
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions
FROM mcr.microsoft.com/dotnet/sdk:8.0.100-jammy
FROM mcr.microsoft.com/dotnet/sdk:8.0.201-jammy

# Installing mono makes `dotnet test` work without errors even for net472.
# But installing it takes a long time, so it's excluded by default.
Expand Down
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ indent_size = 4
[*.{cs,vb}]
# Sort using and Import directives with System.* appearing first
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false
dotnet_style_qualification_for_field = true:warning
dotnet_style_qualification_for_property = true:warning
dotnet_style_qualification_for_method = true:warning
Expand Down
4 changes: 0 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ updates:
directory: /
schedule:
interval: monthly
ignore:
# This package has unlisted versions on nuget.org that are not supported. Avoid them.
- dependency-name: dotnet-format
versions: ["6.x", "7.x", "8.x", "9.x"]
- package-ecosystem: npm
directory: /src/nerdbank-gitversioning.npm
schedule:
Expand Down
Empty file added .prettierrc.yaml
Empty file.
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"k--kato.docomment",
"editorconfig.editorconfig",
"formulahendry.dotnet-test-explorer",
"esbenp.prettier-vscode",
"pflannery.vscode-versionlens",
"davidanson.vscode-markdownlint",
"dotjoshjohnson.xml",
Expand Down
17 changes: 16 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,20 @@
"files.trimFinalNewlines": true,
"omnisharp.enableEditorConfigSupport": true,
"omnisharp.enableRoslynAnalyzers": true,
"dotnet.completion.showCompletionItemsFromUnimportedNamespaces": true
"dotnet.completion.showCompletionItemsFromUnimportedNamespaces": true,
"editor.formatOnSave": true,
"[xml]": {
"editor.wordWrap": "off"
},
// Treat these files as Azure Pipelines files
"files.associations": {
"**/azure-pipelines/**/*.yml": "azure-pipelines",
"azure-pipelines.yml": "azure-pipelines"
},
// Use Prettier as the default formatter for Azure Pipelines files.
// Needs to be explicitly configured: https://github.com/Microsoft/azure-pipelines-vscode#document-formatting
"[azure-pipelines]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": false // enable this when they conform
},
}
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down
1 change: 1 addition & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<!-- Workaround https://github.com/dotnet/wpf/issues/1718 -->
Expand Down
11 changes: 6 additions & 5 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<!-- https://learn.microsoft.com/nuget/consume-packages/central-package-management -->
<PropertyGroup>
Expand All @@ -23,7 +24,7 @@
<PackageVersion Include="Microsoft.Build" Version="$(MSBuildPackageVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.6.0" />
<PackageVersion Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.2.206-beta" />
<PackageVersion Include="Nerdbank.GitVersioning.LKG" Version="3.4.173-alpha" />
<PackageVersion Include="Newtonsoft.Json.Schema" Version="3.0.15" />
Expand All @@ -37,17 +38,17 @@
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="8.0.0" />
<PackageVersion Include="Validation" Version="2.5.51" />
<PackageVersion Include="Xunit.Combinatorial" Version="1.6.24" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.0" />
<PackageVersion Include="Xunit.SkippableFact" Version="1.4.13" />
<PackageVersion Include="xunit" Version="2.6.1" />
<PackageVersion Include="xunit" Version="2.8.0" />
</ItemGroup>
<ItemGroup>
<GlobalPackageReference Include="CSharpIsNullAnalyzer" Version="0.1.495" />
<GlobalPackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" />
<GlobalPackageReference Include="Nullable" Version="1.3.1" />
<GlobalPackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.507" />
<GlobalPackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.556" />
</ItemGroup>
<ItemGroup>
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ stages:
clean: true
submodules: true # keep the warnings quiet about the wiki not being enlisted
- task: UseDotNet@2
displayName: Install .NET 8.0.100 SDK
displayName: Install .NET 8.0.201 SDK
inputs:
packageType: sdk
version: 8.0.100
version: 8.0.201
- script: dotnet --info
displayName: Show dotnet SDK info
- bash: |
Expand Down
5 changes: 3 additions & 2 deletions azure-pipelines/artifacts/_pipelines.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
[CmdletBinding()]
param (
[string]$ArtifactNameSuffix,
[switch]$StageOnly
[switch]$StageOnly,
[switch]$AvoidSymbolicLinks
)

Function Set-PipelineVariable($name, $value) {
Expand All @@ -24,7 +25,7 @@ Function Test-ArtifactUploaded($artifactName) {
Test-Path "env:$varName"
}

& "$PSScriptRoot/_stage_all.ps1" -ArtifactNameSuffix $ArtifactNameSuffix |% {
& "$PSScriptRoot/_stage_all.ps1" -ArtifactNameSuffix $ArtifactNameSuffix -AvoidSymbolicLinks:$AvoidSymbolicLinks |% {
# Set a variable which will out-live this script so that a subsequent attempt to collect and upload artifacts
# will skip this one from a check in the _all.ps1 script.
Set-PipelineVariable "ARTIFACTSTAGED_$($_.Name.ToUpper())" 'true'
Expand Down
16 changes: 14 additions & 2 deletions azure-pipelines/artifacts/_stage_all.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

[CmdletBinding()]
param (
[string]$ArtifactNameSuffix
[string]$ArtifactNameSuffix,
[switch]$AvoidSymbolicLinks
)

$ArtifactStagingFolder = & "$PSScriptRoot/../Get-ArtifactsStagingDirectory.ps1" -CleanIfLocal
Expand All @@ -30,6 +31,12 @@ function Create-SymbolicLink {
} else {
cmd /c "mklink `"$Link`" `"$Target`"" | Out-Null
}

if ($LASTEXITCODE -ne 0) {
# Windows requires admin privileges to create symbolic links
# unless Developer Mode has been enabled.
throw "Failed to create symbolic link at $Link that points to $Target"
}
}

# Stage all artifacts
Expand All @@ -42,7 +49,12 @@ $Artifacts |% {

if (-not (Test-Path $DestinationFolder)) { New-Item -ItemType Directory -Path $DestinationFolder | Out-Null }
if (Test-Path -PathType Leaf $_.Source) { # skip folders
Create-SymbolicLink -Link (Join-Path $DestinationFolder $Name) -Target $_.Source
$TargetPath = Join-Path $DestinationFolder $Name
if ($AvoidSymbolicLinks) {
Copy-Item -Path $_.Source -Destination $TargetPath
} else {
Create-SymbolicLink -Link $TargetPath -Target $_.Source
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion azure-pipelines/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- template: install-dependencies.yml
- pwsh: |
Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile dotnet-install.ps1
& .\dotnet-install.ps1 -Architecture x86 -Version 8.0.100 -InstallDir "C:\Program Files (x86)\dotnet\" -NoPath -Verbose
& .\dotnet-install.ps1 -Architecture x86 -Version 8.0.201 -InstallDir "C:\Program Files (x86)\dotnet\" -NoPath -Verbose
displayName: ⚙ Install 32-bit .NET SDK and runtimes

- template: dotnet.yml
Expand All @@ -44,6 +44,8 @@ jobs:
- template: dotnet.yml
parameters:
RunTests: ${{ parameters.RunTests }}
- script: dotnet format --verify-no-changes --no-restore
displayName: 💅 Verify formatted code

- job: WrapUp
dependsOn:
Expand Down
11 changes: 7 additions & 4 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ Param(

$msbuildCommandLine = "dotnet build `"$PSScriptRoot\Nerdbank.GitVersioning.sln`" /m /verbosity:$MsBuildVerbosity /nologo /p:Platform=`"Any CPU`" /t:build,pack"

if (Test-Path "C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll") {
$msbuildCommandLine += " /logger:`"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll`""
}

if ($Configuration) {
$msbuildCommandLine += " /p:Configuration=$Configuration"
}
Expand All @@ -34,6 +30,13 @@ try {
}
}

if ($PSCmdlet.ShouldProcess('src/nbgv', 'dotnet publish')) {
dotnet publish src/nbgv -c $Configuration -o src/nerdbank-gitversioning.npm/out/nbgv.cli/tools/net6.0/any
if ($LASTEXITCODE -ne 0) {
throw "dotnet publish failed"
}
}

if ($PSCmdlet.ShouldProcess("$PSScriptRoot\src\nerdbank-gitversioning.npm", "gulp")) {
cd "$PSScriptRoot\src\nerdbank-gitversioning.npm"
yarn install
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.100",
"version": "8.0.201",
"rollForward": "patch",
"allowPrerelease": false
}
Expand Down
11 changes: 5 additions & 6 deletions init.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ try {
$HeaderColor = 'Green'

$RestoreArguments = @()
if ($Interactive)
{
if ($Interactive) {
$RestoreArguments += '--interactive'
}

Expand All @@ -98,10 +97,10 @@ try {
}

if (!$NoToolRestore -and $PSCmdlet.ShouldProcess("dotnet tool", "restore")) {
dotnet tool restore @RestoreArguments
if ($lastexitcode -ne 0) {
throw "Failure while restoring dotnet CLI tools."
}
dotnet tool restore @RestoreArguments
if ($lastexitcode -ne 0) {
throw "Failure while restoring dotnet CLI tools."
}
}

if (!$NoRestore -and $PSCmdlet.ShouldProcess("NPM packages", "Restore")) {
Expand Down
3 changes: 3 additions & 0 deletions settings.VisualStudio.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"textEditor.codeCleanup.profile": "profile1"
}
1 change: 1 addition & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<!-- Include and reference README in nuget package, if a README is in the project directory. -->
<PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)AssemblyInfo.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ public class BitbucketCloud : ICloudBuild
public bool IsPullRequest => !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("BITBUCKET_PR_ID"));

/// <inheritdoc />
public string BuildingBranch => Environment.GetEnvironmentVariable("BITBUCKET_BRANCH");
public string BuildingBranch => CloudBuild.ShouldStartWith(Environment.GetEnvironmentVariable("BITBUCKET_BRANCH"), "refs/heads/");

/// <inheritdoc />
public string BuildingTag => Environment.GetEnvironmentVariable("BITBUCKET_TAG");
public string BuildingTag => CloudBuild.ShouldStartWith(Environment.GetEnvironmentVariable("BITBUCKET_TAG"), "refs/tags/");

/// <inheritdoc />
public string GitCommitId => Environment.GetEnvironmentVariable("BITBUCKET_COMMIT");
Expand Down
2 changes: 1 addition & 1 deletion src/NerdBank.GitVersioning/VersionOracle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ public IDictionary<string, string> CloudBuildVersionVars
/// <summary>
/// Gets the version to use for NPM packages.
/// </summary>
public string NpmPackageVersion => $"{this.Version.ToStringSafe(3)}{this.PrereleaseVersion}";
public string NpmPackageVersion => this.SemVer2;

/// <summary>
/// Gets a SemVer 1.0 compliant string that represents this version, including the -COMMITID suffix
Expand Down
12 changes: 11 additions & 1 deletion src/Nerdbank.GitVersioning.Tasks/AssemblyVersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,8 @@ private void GenerateAssemblyAttributes()
this.generator.DeclareAttribute(typeof(AssemblyCopyrightAttribute), this.AssemblyCopyright);
}
}

this.generator.EndAssemblyAttributes();
}

private List<KeyValuePair<string, (object Value, bool EmitIfEmpty /* Only applies to string values */)>> GetFieldsForThisAssembly()
Expand Down Expand Up @@ -658,6 +660,10 @@ internal virtual void StartAssemblyAttributes()
{
}

internal virtual void EndAssemblyAttributes()
{
}

internal abstract void DeclareAttribute(Type type, string arg);

internal abstract void StartThisAssemblyClass();
Expand Down Expand Up @@ -726,6 +732,11 @@ internal override void StartAssemblyAttributes()
this.CodeBuilder.AppendLine($"namespace {this.Namespace}");
}

internal override void EndAssemblyAttributes()
{
this.CodeBuilder.AppendLine("do()");
}

internal override void DeclareAttribute(Type type, string arg)
{
this.CodeBuilder.AppendLine($"[<assembly: global.{type.FullName}(\"{arg}\")>]");
Expand All @@ -738,7 +749,6 @@ internal override void EndThisAssemblyClass()

internal override void StartThisAssemblyClass()
{
this.CodeBuilder.AppendLine("do()");
this.CodeBuilder.AppendLine($"#if {CompilerDefinesAroundGeneratedCodeAttribute}");
this.CodeBuilder.AppendLine($"[<global.System.CodeDom.Compiler.GeneratedCode(\"{GeneratorName}\",\"{GeneratorVersion}\")>]");
this.CodeBuilder.AppendLine("#endif");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@
<PropertyGroup>
<VersionSourceFile>$([MSBuild]::NormalizePath('$(IntermediateOutputPath)', '$(AssemblyName).Version$(DefaultLanguageSourceExtension)'))</VersionSourceFile>
<NewVersionSourceFile>$(VersionSourceFile).new</NewVersionSourceFile>
<!-- Workaround WPF inner build RootNamespace changing: https://github.com/dotnet/Nerdbank.GitVersioning/issues/175 -->
<NBGV_RootNamespace>$(RootNamespace)</NBGV_RootNamespace>
<NBGV_RootNamespace Condition="$(RootNamespace.EndsWith('_wpftmp')) and '$(_TargetAssemblyProjectName)'!=''">$(_TargetAssemblyProjectName)</NBGV_RootNamespace>
</PropertyGroup>
<ItemGroup>
<AdditionalThisAssemblyFields Include="NuGetPackageVersion" String="$(NuGetPackageVersion)" Condition="'$(NBGV_ThisAssemblyIncludesPackageVersion)' == 'true'" />
Expand All @@ -154,7 +157,7 @@
AssemblyFileVersion="$(AssemblyFileVersion)"
AssemblyInformationalVersion="$(AssemblyInformationalVersion)"
AssemblyName="$(AssemblyName)"
RootNamespace="$(RootNamespace)"
RootNamespace="$(NBGV_RootNamespace)"
ThisAssemblyNamespace="$(NBGV_ThisAssemblyNamespace)"
AssemblyOriginatorKeyFile="$(AssemblyOriginatorKeyFile)"
AssemblyTitle="$(AssemblyTitle)"
Expand Down
1 change: 1 addition & 0 deletions test/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove($(MSBuildThisFile), $(MSBuildThisFileDirectory)..))" />

Expand Down
1 change: 1 addition & 0 deletions test/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove($(MSBuildThisFile), $(MSBuildThisFileDirectory)..))" />
</Project>
4 changes: 2 additions & 2 deletions test/Nerdbank.GitVersioning.Tests/AssemblyInfoTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ namespace AssemblyInfo
[<assembly: global.System.Reflection.AssemblyVersionAttribute(""1.3.0.0"")>]
[<assembly: global.System.Reflection.AssemblyFileVersionAttribute(""1.3.1.0"")>]
[<assembly: global.System.Reflection.AssemblyInformationalVersionAttribute("""")>]
{(thisAssemblyClass.GetValueOrDefault(true) ? $@"do()
#if NETSTANDARD || NETFRAMEWORK || NETCOREAPP
do()
{(thisAssemblyClass.GetValueOrDefault(true) ? $@"#if NETSTANDARD || NETFRAMEWORK || NETCOREAPP
[<global.System.CodeDom.Compiler.GeneratedCode(""{AssemblyVersionInfo.GeneratorName}"",""{AssemblyVersionInfo.GeneratorVersion}"")>]
#endif
#if NET40_OR_GREATER || NETCOREAPP2_0_OR_GREATER || NETSTANDARD2_0_OR_GREATER
Expand Down
Loading