Skip to content
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

Merge Library.Template update #891

Merged
merged 84 commits into from
Apr 16, 2023
Merged
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
2678ec5
Use static graph restore
AArnott Sep 28, 2022
0552ddc
Update dependencies
AArnott Oct 1, 2022
2eaf0fb
Update .NET SDK to 6.0.401
AArnott Oct 5, 2022
abab1d8
Fix variable detection on linux
AArnott Oct 20, 2022
cffffa4
Update Nerdbank.GitVersioning version
AArnott Oct 24, 2022
2a5a528
Improve verbose output of artifact collection
AArnott Oct 31, 2022
77fcd3d
Switch to NuGet's central package versioning
AArnott Nov 4, 2022
b894b8a
Update to the .NET 7.0.100-rc.2 SDK
AArnott Nov 4, 2022
ab4fb10
Switch to using GlobalPackageReference
AArnott Nov 4, 2022
318aaad
Move GitHub-specific package ref to its own group
AArnott Nov 4, 2022
3a23855
Merge pull request #178 from AArnott/net7.0sdk
AArnott Nov 4, 2022
253e62c
Simplify parent import pattern
AArnott Nov 4, 2022
f91a0e8
Avoid .NET 7 SDK till it's stable
AArnott Nov 4, 2022
c32551d
Add Directory.Packages.props as a solution item
AArnott Nov 7, 2022
295d066
Use static code coverage preview
AArnott Nov 10, 2022
ad6e242
Resolve NU1507 warning
AArnott Nov 11, 2022
f7b4621
Merge pull request #181 from AArnott/switchToCoveragePreview
AArnott Nov 11, 2022
66a302c
Update Microsoft.NET.Test.Sdk
AArnott Nov 14, 2022
8ebf3f2
Use `MSBuildTreatWarningsAsErrors` in pipeline
AArnott Nov 21, 2022
73ef446
Avoid static graph restore
AArnott Nov 21, 2022
ae66da7
Update to the .NET 7 SDK
AArnott Nov 9, 2022
ca3ab7d
Enable NuGet CPVM transitive pinning
AArnott Nov 22, 2022
6bcec43
Fix build on machines with Visual Studio 2022 Update 3
AArnott Nov 22, 2022
6a34c4f
Switch back to `GlobalPackageReference`
AArnott Nov 22, 2022
fb2b395
Drop the .NET compilers toolset pin
AArnott Nov 24, 2022
a32f820
Bump Microsoft.CodeCoverage (#182)
dependabot[bot] Dec 1, 2022
e7ed3b3
Bump Microsoft.CodeCoverage from 17.5.0-preview-20221201-01 to 17.5.0…
AArnott Dec 1, 2022
a24d8a1
Drop netcoreapp3.1 targeting
AArnott Dec 15, 2022
2da6478
Multitarget the library
AArnott Dec 15, 2022
dfd69e0
Avoid System.Net.Http compile error when targeting net472
AArnott Dec 15, 2022
ade39a9
Merge pull request #183 from AArnott/retargetNet
AArnott Dec 15, 2022
8121dad
Drop obsolete WPF workarounds
AArnott Dec 15, 2022
8bf30c8
Merge pull request #185 from AArnott/dropWpfWorkarounds
AArnott Dec 15, 2022
435bda6
Add emoticons to github workflows
AArnott Dec 15, 2022
2107c6a
Bump C# language version to 11
AArnott Dec 17, 2022
7e26321
Bump Microsoft.NET.Test.Sdk to 17.4.1
AArnott Dec 18, 2022
73ed0f8
Bump Microsoft.CodeCoverage (#187)
dependabot[bot] Jan 3, 2023
1d09284
Switch code coverage from static to dynamic instrumentation
AArnott Jan 4, 2023
c36559c
Upgrade Microsoft.CodeCoverage
AArnott Jan 5, 2023
77e4b51
Fix merge coverage error when output directory already exists
AArnott Jan 6, 2023
eb847be
.gitignore .DS_Store
AArnott Jan 13, 2023
c4d099c
Increase likelihood that folks set PackageProjectUrl property
AArnott Jan 22, 2023
07df47e
Bump Microsoft.CodeCoverage to 17.5.0-release-20230106-01
AArnott Jan 22, 2023
f7f6ed3
Use latest NuGet.exe version (#188)
kartheekp-ms Feb 1, 2023
4de45d4
Bump Microsoft.CodeCoverage (#189)
dependabot[bot] Feb 1, 2023
1ad0ffa
Merge remote-tracking branch 'libtemplate/main' into libtemplate
AArnott Feb 8, 2023
196667f
Build fixes
AArnott Feb 8, 2023
6712b77
More perf run fixes
AArnott Feb 8, 2023
dd21595
Avoid build number warnings, and set the build number earlier by movi…
AArnott Feb 8, 2023
8cde04c
Add pipeline emoji icons
AArnott Feb 8, 2023
f17518b
Update the dotnet-install.ps1 script
AArnott Feb 9, 2023
551183c
Improve error message for unsupported versions
AArnott Feb 9, 2023
8381192
Remove references to "Core" in .NET Core
AArnott Feb 10, 2023
d190333
Add -SdkOnly switch
AArnott Feb 10, 2023
1aa9eca
Bump tests to .NET 7
AArnott Feb 10, 2023
8d168d2
Fix tests to find 32-bit MSBuild when required
AArnott Feb 10, 2023
c01126d
Simplify Version cast in ps1 script
AArnott Feb 13, 2023
b3a68a9
Use LF line endings for plist files
AArnott Feb 16, 2023
b579c7c
Add `-interactive` switch to init.ps1
AArnott Feb 16, 2023
d2ce0a7
Merge branch 'fixMainBreak' into libtemplate
AArnott Feb 23, 2023
6415323
Bump dependencies to 17.5.0 versions
AArnott Feb 24, 2023
34f1344
Add msbuild extension for VS Code
AArnott Feb 27, 2023
fb2395d
Add dotnet CLI tools
AArnott Feb 27, 2023
0bfecd6
Drop test-tools as a nuget feed source
AArnott Feb 27, 2023
e877595
Merge pull request #192 from AArnott/dropdotnetToolsSource
AArnott Feb 27, 2023
1b08d1c
Merge remote-tracking branch 'origin/main' into updateDotNetInstallSc…
AArnott Feb 27, 2023
e9f08c8
Merge pull request #191 from AArnott/updateDotNetInstallScript
AArnott Mar 11, 2023
5132c22
Add ASP.NET Core runtime installation support
AArnott Mar 11, 2023
a921f8d
Drop Microsoft.CodeCoverage reference
AArnott Mar 11, 2023
33aee6e
Merge pull request #193 from AArnott/aspnetRuntime
AArnott Mar 11, 2023
54bd19a
Merge pull request #194 from AArnott/removeRedundantPackageReference
AArnott Mar 11, 2023
ea48c8e
Updated SDK installer script to be able to find 7.0.200
AArnott Mar 13, 2023
2987b44
Bump SDK version to 7.0.201
AArnott Mar 13, 2023
08114e6
Merge pull request #196 from AArnott/installerUpdate
AArnott Mar 13, 2023
99df818
Move `dotnet-coverage` to repo-level tool
AArnott Mar 28, 2023
1469941
Move `nbgv` into dotnet-tools.json
AArnott Mar 28, 2023
3f1e858
Install tools except when `-NoToolRestore` is specified
AArnott Mar 28, 2023
99e9481
Merge pull request #197 from AArnott/dotnetCliTools
AArnott Mar 28, 2023
2381c72
Fix ARM64 detection on Windows Powershell
AArnott Apr 15, 2023
b3e9f4e
Bump up SDK and tools versions
AArnott Apr 16, 2023
0212e95
Merge remote-tracking branch 'origin/main' into libtemplate
AArnott Apr 16, 2023
c432cd4
Merge remote-tracking branch 'libtemplate/main' into libtemplate
AArnott Apr 16, 2023
f2d80e4
Fix 32-bit msbuild version reference
AArnott Apr 16, 2023
39553c3
Update .NET SDK more consistently
AArnott Apr 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0.403-focal
# Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions
FROM mcr.microsoft.com/dotnet/sdk:7.0.101-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
6 changes: 3 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

# Xml project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,msbuildproj}]
# MSBuild project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,msbuildproj,props,targets}]
indent_size = 2

# Xml config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct,runsettings}]
[*.{ruleset,config,nuspec,resx,vsixmanifest,vsct,runsettings}]
indent_size = 2

# JSON files
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -349,3 +349,6 @@ MigrationBackup/

# dotnet tool local install directory
.store/

# mac-created file to track user view preferences for a directory
.DS_Store
29 changes: 7 additions & 22 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<BaseOutputPath Condition=" '$(BaseOutputPath)' == '' ">$(RepoRootPath)bin\$(MSBuildProjectName)\</BaseOutputPath>
<PackageOutputPath>$(RepoRootPath)bin\Packages\$(Configuration)\</PackageOutputPath>
<DocumentationRootFolder>$(MSBuildThisFileDirectory)..\wiki\api</DocumentationRootFolder>
<LangVersion>10.0</LangVersion>
<LangVersion>latest</LangVersion>
<!--<Nullable>enable</Nullable>-->
<ImplicitUsings>enable</ImplicitUsings>
<AnalysisLevel>latest</AnalysisLevel>
Expand All @@ -17,6 +17,10 @@
<!-- https://github.com/dotnet/msbuild/blob/main/documentation/ProjectReference-Protocol.md#setplatform-negotiation -->
<EnableDynamicPlatformResolution>true</EnableDynamicPlatformResolution>

<!-- Opt in till https://github.com/NuGet/Home/issues/9803 makes this the default. -->
<!-- Opt back out until an SDK with the fix for https://github.com/NuGet/Home/issues/12177 is generally available. -->
<RestoreUseStaticGraphEvaluation>false</RestoreUseStaticGraphEvaluation>

<!-- This entire repo has just one version.json file, so compute the version once and share with all projects in a large build. -->
<GitVersionBaseDirectory>$(MSBuildThisFileDirectory)</GitVersionBaseDirectory>

Expand All @@ -25,11 +29,10 @@
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)strongname.snk</AssemblyOriginatorKeyFile>

<PackageProjectUrl>https://github.com/dotnet/Nerdbank.GitVersioning</PackageProjectUrl>
<Authors>Andrew Arnott</Authors>
<Owners>aarnott</Owners>
<PackageTags>git commit versioning version assemblyinfo</PackageTags>
<Copyright>Copyright (c) .NET Foundation and Contributors</Copyright>
<PackageProjectUrl>https://github.com/dotnet/Nerdbank.GitVersioning</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
Expand All @@ -39,19 +42,9 @@
<!-- LibGit2Sharp Native Binary version - used in both main project and Cake addin -->
<LibGit2SharpNativeVersion>2.0.315-alpha.0.9</LibGit2SharpNativeVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
<PackageReference Include="Nullable" Version="1.3.1" PrivateAssets="all" />
<!-- Use the Unstable package ID so that update tools will help us keep it current even though it seems to be ever-unstable lately. -->
<PackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.435" PrivateAssets="all" />
<PackageReference Include="CSharpIsNullAnalyzer" Version="0.1.329" PrivateAssets="all" />
<PackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)3rdPartyNotices.txt" Pack="true" PackagePath="" />
</ItemGroup>

<ItemGroup>
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Link="stylecop.json" />
</ItemGroup>
Expand All @@ -63,7 +56,7 @@

<Target Name="PrepareReleaseNotes" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion">
<PropertyGroup>
<PackageReleaseNotes>https://github.com/dotnet/Nerdbank.GitVersioning/releases/tag/v$(Version)</PackageReleaseNotes>
<PackageReleaseNotes Condition="'$(PackageProjectUrl)'!=''">$(PackageProjectUrl)/releases/tag/v$(Version)</PackageReleaseNotes>
</PropertyGroup>
</Target>

Expand All @@ -74,23 +67,15 @@

<!--
Inspired by https://github.com/dotnet/arcade/blob/cbfa29d4e859622ada3d226f90f103f659665d31/src/Microsoft.DotNet.Arcade.Sdk/tools/Workarounds.props#L14-L31
WPF temp-projects do not import .props and .targets files from NuGet packages.
(see https://github.com/dotnet/sourcelink/issues/91).

Property _TargetAssemblyProjectName is set by GenerateTemporaryTargetAssembly task.
Disable Source Link and Xliff in WPF temp projects to avoid generating non-deterministic file names to obj dir.
The project name is non-deterministic and is included in the Source Link json file name and xlf directory names.
It's also not necessary to generate these assets.
-->
<PropertyGroup Condition="'$(IsWpfTempProject)' == 'true'">
<_WpfTempProjectNuGetFilePathNoExt>$(BaseIntermediateOutputPath)..\$(_TargetAssemblyProjectName)\$(_TargetAssemblyProjectName)$(MSBuildProjectExtension).nuget.g</_WpfTempProjectNuGetFilePathNoExt>

<EnableSourceLink>false</EnableSourceLink>
<EmbedUntrackedSources>false</EmbedUntrackedSources>
<DeterministicSourcePaths>false</DeterministicSourcePaths>
<EnableXlfLocalization>false</EnableXlfLocalization>
</PropertyGroup>

<!-- Workaround https://github.com/dotnet/wpf/issues/810 -->
<Import Project="$(_WpfTempProjectNuGetFilePathNoExt).props" Condition="'$(_WpfTempProjectNuGetFilePathNoExt)' != '' and Exists('$(_WpfTempProjectNuGetFilePathNoExt).props')"/>
</Project>
5 changes: 4 additions & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
<EmbedUntrackedSources Condition=" '$(UseWPF)' == 'true' ">false</EmbedUntrackedSources>
</PropertyGroup>

<Import Project="$(_WpfTempProjectNuGetFilePathNoExt).targets" Condition="'$(_WpfTempProjectNuGetFilePathNoExt)' != '' and Exists('$(_WpfTempProjectNuGetFilePathNoExt).targets')"/>
<ItemGroup>
<!-- Avoid compile error about missing namespace when combining ImplicitUsings with .NET Framework target frameworks. -->
<Using Remove="System.Net.Http" Condition="'$(TargetFrameworkIdentifier)'=='.NETFramework'" />
</ItemGroup>
</Project>
52 changes: 52 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<Project>
<!-- https://learn.microsoft.com/nuget/consume-packages/central-package-management -->
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
<BenchmarkDotNetVersion>0.13.2</BenchmarkDotNetVersion>
<MSBuildPackageVersion>16.9.0</MSBuildPackageVersion>
<MSBuildPackageVersion Condition="'$(IsTestProject)'=='true'">15.9.20</MSBuildPackageVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="BenchmarkDotNet.Diagnostics.Windows" Version="$(BenchmarkDotNetVersion)" />
<PackageVersion Include="BenchmarkDotNet" Version="$(BenchmarkDotNetVersion)" />
<PackageVersion Include="Cake.Core" Version="2.3.0" />
<PackageVersion Include="DotNetMDDocs" Version="0.112.39" />
<PackageVersion Include="LibGit2Sharp" Version="0.27.0-preview-0182" />
<PackageVersion Include="Microsoft.Build.Framework" Version="$(MSBuildPackageVersion)" />
<PackageVersion Include="Microsoft.Build.Locator" Version="1.5.5" />
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="$(MSBuildPackageVersion)" />
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="$(MSBuildPackageVersion)" />
<PackageVersion Include="Microsoft.Build" Version="$(MSBuildPackageVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.3.1" />
<PackageVersion Include="Microsoft.CodeCoverage" Version="17.5.0-release-20230131-04" />
<PackageVersion Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.2.188-beta" />
<PackageVersion Include="Moq" Version="4.18.2" />
<PackageVersion Include="Nerdbank.GitVersioning.LKG" Version="3.4.173-alpha" />
<PackageVersion Include="Newtonsoft.Json.Schema" Version="3.0.14" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.1" />
<PackageVersion Include="NuGet.PackageManagement" Version="6.3.1" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageVersion Include="System.Diagnostics.Tools" Version="4.3.0" />
<PackageVersion Include="System.Memory" Version="4.5.5" />
<PackageVersion Include="System.Runtime.Loader" Version="4.3.0" />
<PackageVersion Include="System.Text.Json" Version="4.7.2" />
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="7.0.0" />
<PackageVersion Include="Validation" Version="2.5.51" />
<PackageVersion Include="Xunit.Combinatorial" Version="1.5.25" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageVersion Include="Xunit.SkippableFact" Version="1.4.13" />
<PackageVersion Include="xunit" Version="2.4.2" />
</ItemGroup>
<ItemGroup>
<GlobalPackageReference Include="CSharpIsNullAnalyzer" Version="0.1.329" />
<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.435" />
</ItemGroup>
<ItemGroup>
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions Nerdbank.GitVersioning.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
build.ps1 = build.ps1
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
Directory.Packages.props = Directory.Packages.props
global.json = global.json
init.ps1 = init.ps1
nuget.config = nuget.config
Expand Down
14 changes: 9 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ resources:
image: mcr.microsoft.com/dotnet/sdk:latest

variables:
TreatWarningsAsErrors: true
MSBuildTreatWarningsAsErrors: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
BuildConfiguration: Release
codecov_token: 92266a45-648d-454e-8fec-beffae2e6553
Expand Down Expand Up @@ -101,11 +101,15 @@ stages:
pool:
vmImage: $(imageName)
steps:
- checkout: self
fetchDepth: 0 # avoid shallow clone so nbgv can do its work.
clean: true
submodules: true # keep the warnings quiet about the wiki not being enlisted
- task: UseDotNet@2
displayName: Install .NET 6.0.403 SDK
displayName: Install .NET 7.0.101 SDK
inputs:
packageType: sdk
version: 6.0.403
version: 7.0.101
- script: dotnet --info
displayName: Show dotnet SDK info
- bash: |
Expand All @@ -119,7 +123,7 @@ stages:
dotnet build -c Release
displayName: Build in Release mode
- script: |
dotnet run -c Release -f net6.0 -- --filter *GetVersionBenchmarks* --artifacts $(Build.ArtifactStagingDirectory)/benchmarks/packed/$(imageName)
dotnet run -c Release -f net7.0 -- --filter *GetVersionBenchmarks* --artifacts $(Build.ArtifactStagingDirectory)/benchmarks/packed/$(imageName)
workingDirectory: test/Nerdbank.GitVersioning.Benchmarks
displayName: Run benchmarks (packed)
- bash: |
Expand All @@ -136,7 +140,7 @@ stages:
git unpack-objects < .git/objects/pack/*.pack
displayName: Unpack Git repositories
- script: |
dotnet run -c Release -f net6.0 -- --filter '*GetVersionBenchmarks*' --artifacts $(Build.ArtifactStagingDirectory)/benchmarks/unpacked/$(imageName)
dotnet run -c Release -f net7.0 -- --filter '*GetVersionBenchmarks*' --artifacts $(Build.ArtifactStagingDirectory)/benchmarks/unpacked/$(imageName)
workingDirectory: test/Nerdbank.GitVersioning.Benchmarks
displayName: Run benchmarks (unpacked)
- task: PublishBuildArtifacts@1
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/Get-NuGetTool.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#>
Param(
[Parameter()]
[string]$NuGetVersion='5.2.0'
[string]$NuGetVersion='6.4.0'
)

$toolsPath = & "$PSScriptRoot\Get-TempToolsPath.ps1"
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/Merge-CodeCoverage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if ($reports) {

$Inputs = $reports |% { Resolve-Path -relative $_.FullName }

if (Split-Path $OutputFile) {
if ((Split-Path $OutputFile) -and -not (Test-Path (Split-Path $OutputFile))) {
New-Item -Type Directory -Path (Split-Path $OutputFile) | Out-Null
}

Expand Down
1 change: 1 addition & 0 deletions azure-pipelines/artifacts/_all.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Get-ChildItem "$PSScriptRoot\*.ps1" -Exclude "_*" -Recurse | % {
$ArtifactName = $_.BaseName
if ($Force -or !(Test-ArtifactStaged($ArtifactName + $ArtifactNameSuffix))) {
$totalFileCount = 0
Write-Verbose "Collecting file list for artifact $($_.BaseName)"
$fileGroups = & $_
if ($fileGroups) {
$fileGroups.GetEnumerator() | % {
Expand Down
7 changes: 3 additions & 4 deletions azure-pipelines/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,9 @@ 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 6.0.403 -InstallDir "C:\Program Files (x86)\dotnet\" -NoPath -Verbose
& .\dotnet-install.ps1 -Architecture x86 -Version 7.0.101 -InstallDir "C:\Program Files (x86)\dotnet\" -NoPath -Verbose
displayName: ⚙ Install 32-bit .NET SDK and runtimes

- powershell: '& (./azure-pipelines/Get-nbgv.ps1) cloud -c'
displayName: ⚙ Set build number

- template: dotnet.yml
parameters:
RunTests: ${{ parameters.RunTests }}
Expand All @@ -42,6 +39,8 @@ jobs:
clean: true
submodules: true # keep the warnings quiet about the wiki not being enlisted
- template: install-dependencies.yml
- powershell: '& (./azure-pipelines/Get-nbgv.ps1) cloud -c'
displayName: ⚙ Set build number
- template: dotnet.yml
parameters:
RunTests: ${{ parameters.RunTests }}
Expand Down
8 changes: 4 additions & 4 deletions azure-pipelines/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ steps:
- script: |
git config --global user.name ci
git config --global user.email me@ci.com
displayName: Configure git commit author for testing
displayName: ⚙️ Configure git commit author for testing

- script: dotnet build -t:build,pack --no-restore -c $(BuildConfiguration) /bl:"$(Build.ArtifactStagingDirectory)/build_logs/build.binlog"
displayName: 🛠 dotnet build

- script: dotnet pack -c $(BuildConfiguration) --no-build -p:PackLKG=true /bl:"$(Build.ArtifactStagingDirectory)/build_logs/msbuild_lkg.binlog"
displayName: Build LKG package
displayName: 🛠️ Build LKG package
workingDirectory: src/Nerdbank.GitVersioning.Tasks

- script: dotnet publish -c $(BuildConfiguration) -o ../nerdbank-gitversioning.npm/out/nbgv.cli/tools/net6.0/any /bl:"$(Build.ArtifactStagingDirectory)/build_logs/nbgv_publish.binlog"
displayName: Publish nbgv tool
displayName: 📢 Publish nbgv tool
workingDirectory: src/nbgv

- script: yarn build
displayName: Build nerdbank-gitversioning NPM package
displayName: 🛠️ Build nerdbank-gitversioning NPM package
workingDirectory: src/nerdbank-gitversioning.npm

- powershell: azure-pipelines/dotnet-test-cloud.ps1 -Configuration $(BuildConfiguration) -Agent $(Agent.JobName) -PublishResults
Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines/test.runsettings
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
<!-- When set to True, restarts the IIS process and collects coverage information from it. -->
<CollectAspDotNet>False</CollectAspDotNet>
<!-- When set to True, static native instrumentation will be enabled. -->
<EnableStaticNativeInstrumentation>True</EnableStaticNativeInstrumentation>
<EnableStaticNativeInstrumentation>False</EnableStaticNativeInstrumentation>
<!-- When set to True, dynamic native instrumentation will be enabled. -->
<EnableDynamicNativeInstrumentation>True</EnableDynamicNativeInstrumentation>
<EnableDynamicNativeInstrumentation>False</EnableDynamicNativeInstrumentation>
<!-- When set to True, instrumented binaries on disk are removed and original files are restored. -->
<EnableStaticNativeInstrumentationRestore>True</EnableStaticNativeInstrumentationRestore>
</CodeCoverage>
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/variables/_pipelines.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ param (
(& "$PSScriptRoot\_all.ps1").GetEnumerator() |% {
# Always use ALL CAPS for env var names since Azure Pipelines converts variable names to all caps and on non-Windows OS, env vars are case sensitive.
$keyCaps = $_.Key.ToUpper()
if (Test-Path -Path "env:$keyCaps") {
if ((Test-Path "env:$keyCaps") -and (Get-Content "env:$keyCaps")) {
Write-Host "Skipping setting $keyCaps because variable is already set to '$(Get-Content env:$keyCaps)'." -ForegroundColor Cyan
} else {
Write-Host "$keyCaps=$($_.Value)" -ForegroundColor Yellow
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": "6.0.403",
"version": "7.0.101",
"rollForward": "patch",
"allowPrerelease": false
}
Expand Down
30 changes: 14 additions & 16 deletions nuget.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,27 @@
<configuration>
<config>
<add key="repositorypath" value="packages" />
<add key="signatureValidationMode" value="require" />
</config>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
<add key="test-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/test-tools/nuget/v3/index.json" />
<add key="Consumption" value="https://pkgs.dev.azure.com/andrewarnott/OSS/_packaging/Consumption/nuget/v3/index.json" />
</packageSources>
<disabledPackageSources>
<!-- Defend against user or machine level disabling of sources that we list in this file. -->
<clear />
</disabledPackageSources>
<trustedSigners>
AArnott marked this conversation as resolved.
Show resolved Hide resolved
<repository name="nuget" serviceIndex="https://api.nuget.org/v3/index.json">
<owners>Microsoft;aarnott;xunit;kzu;castleproject;patrickb8man;jamesnk;ethomson;AndreyAkinshin;MarcoRossignoli;cake-build;ericnewton76;0xd4d;manuel.roemer;Thecentury;sharwell;dotnetfoundation;wtfsck</owners>
<certificate fingerprint="0e5f38f57dc1bcc806d8494f4f90fbcedd988b46760709cbeec6f4219aa6157d" hashAlgorithm="SHA256" allowUntrustedRoot="false" />
<certificate fingerprint="5A2901D6ADA3D18260B9C6DFE2133C95D74B9EEF6AE0E5DC334C8454D1477DF4" hashAlgorithm="SHA256" allowUntrustedRoot="false" />
</repository>
<author name="Nerdbank">
<certificate fingerprint="1f891e64936d15de5fae22d910cd39f3e9860213c92f20cf9638a245b1249d2b" hashAlgorithm="SHA256" allowUntrustedRoot="false" />
</author>
<author name="Microsoft">
<certificate fingerprint="aa12da22a49bce7d5c1ae64cc1f3d892f150da76140f210abd2cbffca2c18a27" hashAlgorithm="SHA256" allowUntrustedRoot="false" />
<certificate fingerprint="3f9001ea83c560d712c24cf213c3d312cb3bff51ee89435d3430bd06b5d0eece" hashAlgorithm="SHA256" allowUntrustedRoot="false" />
</author>
</trustedSigners>
<packageSourceMapping>
<packageSource key="test-tools">
<package pattern="Microsoft.CodeCoverage" />
</packageSource>
<packageSource key="nuget">
<package pattern="*" />
</packageSource>
<packageSource key="Consumption">
<package pattern="Nerdbank.GitVersioning.LKG" />
</packageSource>
</packageSourceMapping>
</configuration>