--- /dev/null
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <MajorVersion>2</MajorVersion>
+ <MinorVersion>0</MinorVersion>
+ <PatchVersion>2</PatchVersion>
+ <StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
+ <PreReleaseLabel>servicing</PreReleaseLabel>
+ <ReleaseSuffix>$(PreReleaseLabel)</ReleaseSuffix>
+ <ReleaseBrandSuffix></ReleaseBrandSuffix>
+ <Channel>release/2.0.0</Channel>
+ <BranchName>release/2.0.0</BranchName>
+ </PropertyGroup>
+</Project>
CreateOrUpdateCurrentVersionFile;
CreateVersionInfoFile;
BatchRestorePackages;
- ValidateExactRestore;
BuildCustomTasks;
</TraversalBuildDependencies>
<TraversalBuildDependsOn>
</Target>
<Target Name="BatchRestorePackages" Condition="'$(RestoreDuringBuild)'=='true'">
- <!-- Restore packages in a separate msbuild instance so that the buildversion props file generated in
- CreateVersionInfoFile target gets evaluated, this ensures VersionSuffix is set (especially during
- 'dotnet restore') to work around https://github.com/NuGet/Home/issues/4337 -->
- <MSBuild Projects="$(MSBuildThisFileDirectory)restore.proj" />
- </Target>
-
- <!-- Task from buildtools that uses lockfiles to validate that packages restored are exactly what were specified. -->
- <UsingTask TaskName="ValidateExactRestore" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" />
-
- <Target Name="ValidateExactRestore"
- Condition="'$(AllowInexactRestore)'!='true'">
- <ItemGroup>
- <ProjectJsonTemplateFiles Include="$(MSBuildThisFileDirectory)**\project.json.template" />
- <ProjectJsonsExcludingTemplateFiles Include="@(ProjectJsonFiles)" Exclude="@(ProjectJsonTemplateFiles)" />
- </ItemGroup>
- <ValidateExactRestore ProjectLockJsons="@(ProjectJsonsExcludingTemplateFiles->'%(RootDir)%(Directory)%(Filename).lock.json')" />
+ <Message Importance="High" Text="Restoring all packages..." />
+ <Exec Condition="'@(SdkRestoreProjects)' != ''" Command="$(DotnetRestoreCommand) "%(SdkRestoreProjects.FullPath)"" StandardOutputImportance="Low" />
</Target>
<Import Project="dir.targets" />
<PropertyGroup>
<RepoRoot>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)../..'))/</RepoRoot>
- <VersionPrefix>2.0.2</VersionPrefix>
+ </PropertyGroup>
+
+ <Import Project="$(RepoRoot)BranchInfo.props" />
+
+ <PropertyGroup>
+ <!-- Output directories -->
+ <BinDir Condition="'$(BinDir)'==''">$(RepoRoot)Bin/</BinDir>
+ <ObjDir Condition="'$(ObjDir)'==''">$(BinDir)obj/</ObjDir>
+
+ <!-- BuildVersion Properties -->
+ <TodayTimeStamp>$([System.DateTime]::Now.ToString(yyyyMMdd))</TodayTimeStamp>
+ <BuildVersionFile Condition="'$(BuildVersionFile)'==''">$(ObjDir)BuildVersion-$(TodayTimeStamp).props</BuildVersionFile>
+ </PropertyGroup>
+
+ <Import Project="$(BuildVersionFile)" />
+
+ <PropertyGroup>
+ <VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
<AssemblyFileVersion>$(VersionPrefix)</AssemblyFileVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<PackageThirdPartyNoticesFile>$(RepoRoot)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
</PropertyGroup>
+ <PropertyGroup Condition="'$(StabilizePackageVersion)' != 'true'">
+ <!-- Dev builds get a minor version, by default, of '0'. Our tests restore packages with
+ a -* version, and include myget sources, so any package published the same day to myget
+ will conflict with the local build and override the local built package. Prevent this
+ by setting the non-official build minor version to 9 -->
+ <BuildNumberMinor Condition="'$(BuildNumberMinor)' == '0'">9</BuildNumberMinor>
+
+ <!--
+ Ensure VersionSuffix is always set (especially during 'dotnet restore')
+ to work around https://github.com/NuGet/Home/issues/4337
+ -->
+ <VersionSuffix Condition="'$(PreReleaseLabel)' != ''">$(PreReleaseLabel)-</VersionSuffix>
+ <VersionSuffix>$(VersionSuffix)$(BuildNumberMajor)-$(BuildNumberMinor)</VersionSuffix>
+ </PropertyGroup>
+
<PropertyGroup>
<AssemblyOriginatorKeyFile>$(RepoRoot)tools-local/setuptools/Key.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
</Content>
</ItemGroup>
- <Import Condition="Exists('$(RepoRoot)Tools/versioning.props')" Project="$(RepoRoot)Tools/versioning.props" />
+ <Import Condition="Exists('$(RepoRoot)Tools/versioning.props')" Project="$(RepoRoot)Tools/versioning.props" />
</Project>
\ No newline at end of file
<PropertyGroup>
<OutputArg>--output $(PackagesOutDir)</OutputArg>
<ConfigArg>--configuration $(ConfigurationGroup)</ConfigArg>
- <VersionSuffixArg Condition="'$(VersionSuffix)' != ''">--version-suffix $(VersionSuffix)</VersionSuffixArg>
</PropertyGroup>
- <Exec Command="$(DotnetToolCommand) pack %(PackageProjects.Identity) --no-build $(OutputArg) $(ConfigArg) $(VersionSuffixArg) /p:BaseOutputPath=$(IntermediateOutputForPackaging)"
+ <Exec Command="$(DotnetToolCommand) pack %(PackageProjects.Identity) --no-build $(OutputArg) $(ConfigArg) /p:BaseOutputPath=$(IntermediateOutputForPackaging)"
Condition="'@(PackageProjects)' != ''" />
</Target>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="dir.props" />
-
- <Target Name="Build">
- <Message Importance="High" Text="Restoring all packages..." />
- <Exec Condition="'@(SdkRestoreProjects)' != ''" Command="$(DotnetRestoreCommand) "%(SdkRestoreProjects.FullPath)" %(SdkRestoreProjects.ExtraRestoreArgs)" StandardOutputImportance="Low" />
- </Target>
-
-</Project>