Replace custom targets for generating assembly attributes and source control info by using SDK features (#7504)

This commit is contained in:
Nate McMaster 2019-02-13 10:22:03 -08:00 коммит произвёл GitHub
Родитель 06d7fe73a9
Коммит 2ac4619635
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
31 изменённых файлов: 155 добавлений и 105 удалений

Просмотреть файл

@ -263,7 +263,7 @@ jobs:
jobDisplayName: "Build: Linux Musl x64"
agentOs: Linux
buildScript: ./dockerbuild.sh alpine
buildArgs: --ci --pack --all -e KOREBUILD_SKIP_INSTALL_NETFX=0 --arch x64 --os-name linux-musl --no-build-nodejs --no-build-java -p:RepositoryBranch=$(Build.SourceBranchName)
buildArgs: --ci --pack --all -e KOREBUILD_SKIP_INSTALL_NETFX=0 --arch x64 --os-name linux-musl --no-build-nodejs --no-build-java
installNodeJs: false
afterBuild:
# Remove packages that are not rid-specific.

Просмотреть файл

@ -15,15 +15,6 @@
<PackageLicenseUrl>https://raw.githubusercontent.com/aspnet/AspNetCore/2.0.0/LICENSE.txt</PackageLicenseUrl>
<!-- The SPDX name for the source license. See https://spdx.org/licenses/. -->
<PackageLicenseType>Apache-2.0</PackageLicenseType>
<!--
Suppress a warning about upcoming deprecation of PackageLicenseUrl. When embedding licenses are supported,
replace PackageLicenseUrl with PackageLicenseExpression.
-->
<NoWarn>$(NoWarn);NU5125</NoWarn>
<!-- Suppress warnings about using SemVer 2.0. -->
<NoWarn>$(NoWarn);NU5105</NoWarn>
<!-- Don't make missing XML docs a fatal build error, but still surface so we have visibility into undocumented APIs. -->
<WarningsNotAsErrors>$(WarningsNotAsErrors);CS1591</WarningsNotAsErrors>
<!-- Contact email address for NuGet packages and Linux installers. -->
<MaintainerEmail>nugetaspnet@microsoft.com</MaintainerEmail>
@ -42,6 +33,22 @@
<SharedFxDescription>Shared Framework for hosting of Microsoft ASP.NET Core applications. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub ($(RepositoryUrl)). We happily accept issues and PRs.</SharedFxDescription>
</PropertyGroup>
<!-- Warnings and errors -->
<PropertyGroup>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!--
Suppress NuGet warning about upcoming deprecation of PackageLicenseUrl. When embedding licenses are supported,
replace PackageLicenseUrl with PackageLicenseExpression.
-->
<NoWarn>$(NoWarn);NU5125</NoWarn>
<!-- Suppress NuGet warnings about using SemVer 2.0. -->
<NoWarn>$(NoWarn);NU5105</NoWarn>
<!-- Don't make missing XML docs a fatal build error, but still surface so we have visibility into undocumented APIs. -->
<WarningsNotAsErrors>$(WarningsNotAsErrors);CS1591</WarningsNotAsErrors>
<!-- xUnit1004 = warns about skipped tests. Make this a non-fatal build warning. -->
<WarningsNotAsErrors>$(WarningsNotAsErrors);xUnit1004</WarningsNotAsErrors>
</PropertyGroup>
<!-- Source code settings -->
<PropertyGroup>
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
@ -49,13 +56,23 @@
<RepositoryType>git</RepositoryType>
<SharedSourceRoot>$(MSBuildThisFileDirectory)src\Shared\</SharedSourceRoot>
<GoogleTestSubmoduleRoot>$(RepositoryRoot)src\submodules\googletest\</GoogleTestSubmoduleRoot>
<!-- Embed source files that are not tracked by the source control manager in the PDB. -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!-- Additional assembly attributes are already configured to include the source revision ID. -->
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<!-- These project types are disabled because the presence of a PackageReference causes issues for NuGet. -->
<DisableSourceLink Condition="'$(MSBuildProjectExtension)' == '.zipproj' OR '$(MSBuildProjectExtension)' == '.debproj' OR '$(MSBuildProjectExtension)' == '.rpmproj'">true</DisableSourceLink>
</PropertyGroup>
<ItemGroup Condition="'$(DisableSourceLink)' != 'true'">
<!-- See https://github.com/dotnet/sourcelink -->
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="$(MicrosoftSourceLinkGitHubPackageVersion)" PrivateAssets="All" AllowExplicitReference="true" />
<PackageReference Include="Microsoft.SourceLink.Vsts.Git" Version="$(MicrosoftSourceLinkVstsGitPackageVersion)" PrivateAssets="All" AllowExplicitReference="true" />
</ItemGroup>
<!-- Compilation options which apply to all languages. Language-specific options should be set in eng/targets/$(lang).Common.props -->
<PropertyGroup>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)eng\AspNetCore.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<PlatformName Condition=" '$(PlatformName)' == '' ">$(Platform)</PlatformName>
@ -77,16 +94,14 @@
linux-arm64
</SupportedRuntimeIdentifiers>
<!-- Instructs the compiler to use SHA256 instead of SHA1 when adding file hashes to PDBs. -->
<ChecksumAlgorithm>SHA256</ChecksumAlgorithm>
<!-- Make error messages clickable in VS Code's console -->
<GenerateFullPaths Condition="'$(VSCODE_PID)' != ''">true</GenerateFullPaths>
<!-- Suppress the message about using a preview version of .NET Core SDK. We are okay with this and don't need the warning. -->
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
<!-- Fixes a common error in targets implementing a NoBuild mode. -->
<BuildProjectReferences Condition=" '$(NoBuild)' == 'true' ">false</BuildProjectReferences>
<!-- Enables Strict mode for Roslyn compiler -->
<Features>strict</Features>
</PropertyGroup>
<Import Project="eng\Versions.props" />
@ -139,12 +154,17 @@
<IsTestAssetProject Condition="$(RepoRelativeProjectDir.Contains('testassets'))">true</IsTestAssetProject>
<IsSampleProject Condition="$(RepoRelativeProjectDir.Contains('sample'))">true</IsSampleProject>
<IsAnalyzersProject Condition="$(MSBuildProjectName.EndsWith('.Analyzers'))">true</IsAnalyzersProject>
<DisableDeterministicSourceRoot Condition="'$(IsSampleProject)' == 'true' OR '$(IsTestAssetProject)' == 'true'">true</DisableDeterministicSourceRoot>
</PropertyGroup>
<Import Project="build\tasks\RepoTasks.tasks" Condition="'$(MSBuildProjectName)' != 'RepoTasks' AND '$(DesignTimeBuild)' != 'true'" />
<PropertyGroup>
<ContinuousIntegrationBuild Condition="'$(CI)' == 'true'">true</ContinuousIntegrationBuild>
<!--
Disable deterministic source paths in test assets and samples.
In order for the debugger to find source files when debugging a locally built binary the PDB must contain original, unmapped local paths
-->
<DeterministicSourcePaths Condition="'$(IsSampleProject)' == 'true' OR '$(IsTestAssetProject)' == 'true'">false</DeterministicSourcePaths>
<!-- Projects which reference Microsoft.AspNetCore.Mvc.Testing should import this targets file to ensure dependency .deps.json files are copied into test output. -->
<MvcTestingTargets>$(MSBuildThisFileDirectory)src\Mvc\src\Microsoft.AspNetCore.Mvc.Testing\Microsoft.AspNetCore.Mvc.Testing.targets</MvcTestingTargets>
<!-- IIS native projects can only be built on Windows for x86 and x64. -->

Просмотреть файл

@ -67,6 +67,7 @@
<BuildHelixPayload Condition="'$(BuildHelixPayload)' == '' AND '$(IsTestProject)' == 'true'">true</BuildHelixPayload>
</PropertyGroup>
<Import Project="eng\Workarounds.targets" />
<Import Project="eng\targets\ResolveIisReferences.targets" Condition=" '$(MSBuildProjectExtension)' != '.vcxproj' " />
<Import Project="eng\targets\Cpp.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.vcxproj'" />
<Import Project="eng\targets\CSharp.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.csproj'" />

Просмотреть файл

@ -23,15 +23,15 @@
</Target>
<Target Name="GenerateBuildAssetManifest"
DependsOnTargets="GetFilesToPublish;ResolveRepositoryBranch;ResolveCommitHash">
DependsOnTargets="GetFilesToPublish">
<GenerateBuildManifest
Artifacts="@(PackageToPublish)"
OutputPath="$(ManifestsPath)aspnetcore-$(TargetRuntimeIdentifier)-$(PackageVersion).xml"
BuildId="$(PackageVersion)"
RepoUri="$(RepositoryUrl)"
RepoBranch="$(RepositoryBranch)"
RepoCommit="$(RepositoryCommit)" />
RepoUri="$(BUILD_REPOSITORY_URI)"
RepoBranch="$(BUILD_SOURCEBRANCH)"
RepoCommit="$(BUILD_SOURCEVERSION)" />
</Target>
</Project>

Просмотреть файл

@ -21,7 +21,7 @@
<Target Name="BuildSharedFx" DependsOnTargets="$(BuildSharedFxDependsOn)" />
<Target Name="_BuildSharedFxProjects" DependsOnTargets="ResolveCommitHash">
<Target Name="_BuildSharedFxProjects">
<PropertyGroup>
<_RestoreGraphProjectInput>@(FxProjectToBuild)</_RestoreGraphProjectInput>

Просмотреть файл

@ -2,7 +2,6 @@
<Import Project="AzureIntegration.targets" />
<Import Project="SharedFx.targets" />
<Import Project="CodeSign.targets" />
<Import Project="..\eng\Workarounds.targets" />
<PropertyGroup>
<!-- Some projects need access to tasks bundled in KoreBuild. -->

Просмотреть файл

@ -98,7 +98,7 @@ fi
commit_hash="$(git rev-parse HEAD || true)"
if [ ! -z "$commit_hash" ]; then
build_args[${#build_args[*]}]="-p:RepositoryCommit=$commit_hash"
build_args[${#build_args[*]}]="-p:SourceRevisionId=$commit_hash"
fi
dockerfile="$DIR/build/docker/$image.Dockerfile"
@ -118,6 +118,9 @@ docker run \
-e TEAMCITY_VERSION \
-e BUILD_NUMBER \
-e BUILD_BUILDNUMBER \
-e BUILD_REPOSITORY_URI \
-e BUILD_SOURCEVERSION \
-e BUILD_SOURCEBRANCH \
-e DOTNET_CLI_TELEMETRY_OPTOUT \
-e Configuration \
-v "$DIR:/code/build" \

Просмотреть файл

@ -130,6 +130,8 @@
<InternalAspNetCoreSdkPackageVersion Condition=" '$(KoreBuildVersion)' == '' ">3.0.0-build-20190130.1</InternalAspNetCoreSdkPackageVersion>
<MicrosoftNETFrameworkReferenceAssembliesPackageVersion>1.0.0-alpha-004</MicrosoftNETFrameworkReferenceAssembliesPackageVersion>
<MicrosoftNETTestSdkPackageVersion>15.9.0</MicrosoftNETTestSdkPackageVersion>
<MicrosoftSourceLinkGitHubPackageVersion>1.0.0-beta2-18618-05</MicrosoftSourceLinkGitHubPackageVersion>
<MicrosoftSourceLinkVstsGitPackageVersion>1.0.0-beta2-18618-05</MicrosoftSourceLinkVstsGitPackageVersion>
<!-- Stable dotnet/corefx packages no longer updated for .NET Core 3 -->
<SystemBuffersPackageVersion>4.5.0</SystemBuffersPackageVersion>
<SystemCodeDomPackageVersion>4.4.0</SystemCodeDomPackageVersion>

Просмотреть файл

@ -1,3 +1,9 @@
<!-- Use this file to workaround issues. List the issue tracking the item to fix so we can remove the workaround when the issue is resolved. -->
<Project>
<!-- Workaround https://github.com/aspnet/AspNetCore/issues/7503. This chains GenerateSourceLinkFile before razor component targets run. -->
<Target Name="_EnsureSourceLinkHappensBeforeRazorComponentGeneration"
BeforeTargets="PrepareForRazorComponentGenerate"
DependsOnTargets="GenerateSourceLinkFile" />
</Project>

Просмотреть файл

@ -2,6 +2,22 @@
<PropertyGroup>
<LangVersion>7.3</LangVersion>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\AspNetCore.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<!-- Instructs the compiler to use SHA256 instead of SHA1 when adding file hashes to PDBs. -->
<ChecksumAlgorithm>SHA256</ChecksumAlgorithm>
<!-- Enables Strict mode for Roslyn compiler -->
<Features>strict</Features>
<!-- Disables targets in Internal.AspNetCore.Sdk which are obsolete. -->
<GenerateSourceLinkFile>false</GenerateSourceLinkFile>
<GenerateRepositoryCommitUrlInDescription>false</GenerateRepositoryCommitUrlInDescription>
<GenerateCommitHashAttribute>false</GenerateCommitHashAttribute>
<GenerateInternalAspNetCoreAttributes>false</GenerateInternalAspNetCoreAttributes>
<DisableDeterministicSourceRoot>true</DisableDeterministicSourceRoot>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -5,7 +5,35 @@
<TargetFramework>net$(TargetFrameworkVersion.Substring(1).Replace('.',''))</TargetFramework>
<TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier>
</PropertyGroup>
<Target Name="GetCustomAssemblyAttributes"
BeforeTargets="GetAssemblyAttributes"
DependsOnTargets="InitializeSourceControlInformation">
<ItemGroup>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(SourceRevisionId)' != ''">
<_Parameter1>CommitHash</_Parameter1>
<_Parameter2>$(SourceRevisionId)</_Parameter2>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="$(RepositoryUrl.StartsWith('https://github.com'))">
<_Parameter1>SourceCommitUrl</_Parameter1>
<_Parameter2>$(RepositoryUrl)/tree/$(SourceRevisionId)</_Parameter2>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(Serviceable)' == 'true'">
<_Parameter1>Serviceable</_Parameter1>
<_Parameter2>True</_Parameter2>
</AssemblyAttribute>
</ItemGroup>
</Target>
<Target Name="GetCustomFileVersion" BeforeTargets="GetAssemblyVersion">
<PropertyGroup Condition="'$(FileVerison)' == '' AND '$(FileRevisionVersion)' != ''">
<FileVersion>$(VersionPrefix).$(FileRevisionVersion)</FileVersion>
</PropertyGroup>
</Target>
<Import Project="Packaging.targets" />
<Import Project="ResolveReferences.targets" />
</Project>

Просмотреть файл

@ -19,4 +19,17 @@
</ItemGroup>
</Target>
<PropertyGroup>
<GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);_AppendRepostoryUrlToPackageDescription</GenerateNuspecDependsOn>
</PropertyGroup>
<Target Name="_AppendRepostoryUrlToPackageDescription"
DependsOnTargets="InitializeSourceControlInformation">
<PropertyGroup Condition="'$(RepositoryUrl)' != '' AND '$(SourceRevisionId)' != ''">
<PackageDescription>$(PackageDescription)
This package was built from the source code at $(RepositoryUrl)/tree/$(SourceRevisionId)</PackageDescription>
</PropertyGroup>
</Target>
</Project>

Просмотреть файл

@ -8,8 +8,8 @@
</PropertyGroup>
<PropertyGroup>
<!-- Required to make NuGet happy -->
<TargetFramework>net461</TargetFramework>
<TargetFrameworkMoniker>Native,Version=v0.0</TargetFrameworkMoniker>
<MSBuildProjectExtensionsPath>$(BaseIntermediateOutputPath)</MSBuildProjectExtensionsPath>
<MSBuildProjectExtensionsPath Condition="'$(MSBuildProjectExtensionsPath)' == ''">$(MSBuildProjectDir)\obj\</MSBuildProjectExtensionsPath>
<!-- IsRunningFromVisualStudio may be true even when running msbuild.exe from command line. This generally means that MSBUild is Visual Studio installation and therefore we need to find NuGet.targets in a different location. -->

Просмотреть файл

@ -22,21 +22,4 @@
<Reference Include="Microsoft.NET.Sdk.Razor" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<RazorAssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(BuildNumber)' != ''">
<_Parameter1>BuildNumber</_Parameter1>
<_Parameter2>$(BuildNumber)</_Parameter2>
</RazorAssemblyAttribute>
<RazorTargetAssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(BuildNumber)' != ''">
<_Parameter1>BuildNumber</_Parameter1>
<_Parameter2>$(BuildNumber)</_Parameter2>
</RazorTargetAssemblyAttribute>
</ItemGroup>
<ItemGroup>
<RazorCompile Include="$(GeneratedCommitHashAttributeFile)" />
<RazorCompile Include="$(GeneratedInternalAspNetCoreAttributeFile)" />
</ItemGroup>
</Project>

Просмотреть файл

@ -22,21 +22,4 @@
<Reference Include="Microsoft.NET.Sdk.Razor" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<RazorAssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(BuildNumber)' != ''">
<_Parameter1>BuildNumber</_Parameter1>
<_Parameter2>$(BuildNumber)</_Parameter2>
</RazorAssemblyAttribute>
<RazorTargetAssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(BuildNumber)' != ''">
<_Parameter1>BuildNumber</_Parameter1>
<_Parameter2>$(BuildNumber)</_Parameter2>
</RazorTargetAssemblyAttribute>
</ItemGroup>
<ItemGroup>
<RazorCompile Include="$(GeneratedCommitHashAttributeFile)" />
<RazorCompile Include="$(GeneratedInternalAspNetCoreAttributeFile)" />
</ItemGroup>
</Project>

Просмотреть файл

@ -28,7 +28,7 @@
componentsversion=$(ComponentsPackageVersion);
razorversion=$(MicrosoftAspNetCoreRazorDesignPackageVersion);
blazormonoversion=$(MicrosoftAspNetCoreBlazorMonoPackageVersion);
repositorycommit=$(RepositoryCommit);</NuspecProperties>
repositorycommit=$(SourceRevisionId);</NuspecProperties>
</PropertyGroup>
<ItemGroup>
<_TargetFramework Include="$(TargetFramework)" />

Просмотреть файл

@ -35,7 +35,7 @@
blazorversion=$(PackageVersion);
aspnetcoreversion=$(ComponentsPackageVersion);
sharedfxversion=$(SharedFxVersion);
repositorycommit=$(RepositoryCommit);</NuspecProperties>
repositorycommit=$(SourceRevisionId);</NuspecProperties>
</PropertyGroup>
<!-- Also temporarily generate the runtimeconfig.json manually until we can use <FrameworkReference> -->
<Sdk_GenerateFileFromTemplate

Просмотреть файл

@ -22,7 +22,7 @@
IncludeCustomRestoreSources=$(IncludeCustomRestoreSourcesValue);
TemplateBlazorVersion=$(PackageVersion);
TemplateComponentsVersion=$(ComponentsPackageVersion);
RepositoryCommit=$(RepositoryCommit);
RepositoryCommit=$(SourceRevisionId);
</GeneratedContentProperties>
</PropertyGroup>
</Target>

Просмотреть файл

@ -17,7 +17,7 @@
<PropertyGroup>
<NuspecProperties>
version=$(PackageVersion);
repositorycommit=$(RepositoryCommit);
repositorycommit=$(SourceRevisionId);
</NuspecProperties>
</PropertyGroup>
</Target>

Просмотреть файл

@ -174,9 +174,9 @@ This targets file should only be imported by .shfxproj files.
</Target>
<!-- Generates the .version file in the shared framework -->
<Target Name="GenerateSharedFxVersionsFile">
<Target Name="GenerateSharedFxVersionsFile" DependsOnTargets="InitializeSourceControlInformation">
<ItemGroup>
<VersionLines Include="$(RepositoryCommit)" />
<VersionLines Include="$(SourceRevisionId)" />
<VersionLines Include="$(PackageVersion)" />
</ItemGroup>
@ -369,7 +369,7 @@ This targets file should only be imported by .shfxproj files.
projectUrl=$(PackageProjectUrl);
iconUrl=$(PackageIconUrl);
repositoryUrl=$(RepositoryUrl);
repositoryCommit=$(RepositoryCommit);
repositoryCommit=$(SourceRevisionId);
copyright=$(Copyright);
targetFramework=$(TargetFramework);
symbolsAssets=$([MSBuild]::NormalizeDirectory($(SymbolsOutputPath)));

Просмотреть файл

@ -14,10 +14,6 @@
<_Parameter1>TargetRuntimeIdentifier</_Parameter1>
<_Parameter2>$(TargetRuntimeIdentifier)</_Parameter2>
</AssemblyAttribute>
<AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
<_Parameter1>RepositoryCommit</_Parameter1>
<_Parameter2>$(RepositoryCommit)</_Parameter2>
</AssemblyAttribute>
<AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
<_Parameter1>MicrosoftNETCoreAppPackageVersion</_Parameter1>
<_Parameter2>$(RuntimeFrameworkVersion)</_Parameter2>
@ -35,8 +31,12 @@
</ProjectReference>
</ItemGroup>
<Target Name="GenerateTestData" BeforeTargets="GetAssemblyAttributes" DependsOnTargets="ResolveProjectReferences">
<Target Name="GenerateTestData" BeforeTargets="GetAssemblyAttributes" DependsOnTargets="ResolveProjectReferences;InitializeSourceControlInformation">
<ItemGroup>
<AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
<_Parameter1>RepositoryCommit</_Parameter1>
<_Parameter2>$(SourceRevisionId)</_Parameter2>
</AssemblyAttribute>
<AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
<_Parameter1>SharedFxDependencies</_Parameter1>
<_Parameter2>@(AspNetCoreAppReference);@(AspNetCoreAppReferenceAndPackage);@(ExternalAspNetCoreAppReference);@(_TransitiveExternalAspNetCoreAppReference)</_Parameter2>

Просмотреть файл

@ -38,24 +38,6 @@
<Reference Include="Microsoft.NET.Sdk.Razor" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<RazorAssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(BuildNumber)' != ''">
<_Parameter1>BuildNumber</_Parameter1>
<_Parameter2>$(BuildNumber)</_Parameter2>
</RazorAssemblyAttribute>
<RazorTargetAssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(BuildNumber)' != ''">
<_Parameter1>BuildNumber</_Parameter1>
<_Parameter2>$(BuildNumber)</_Parameter2>
</RazorTargetAssemblyAttribute>
</ItemGroup>
<ItemGroup>
<RazorCompile Include="$(GeneratedCommitHashAttributeFile)" />
<RazorCompile Include="$(GeneratedInternalAspNetCoreAttributeFile)" />
</ItemGroup>
<ItemGroup>
<UIFrameworkVersionMoniker Include="V3" />
<UIFrameworkVersionMoniker Include="V4" />

Просмотреть файл

@ -17,6 +17,7 @@
<ItemGroup>
<ProjectReference Include="..\..\Framework\src\Microsoft.AspNetCore.App.shfxproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
<OutputItemType>_ResolvedFxProjects</OutputItemType>
</ProjectReference>

Просмотреть файл

@ -26,6 +26,7 @@
<ItemGroup>
<ProjectReference Include="..\..\Framework\src\Microsoft.AspNetCore.App.shfxproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
<OutputItemType>_ResolvedFxProjects</OutputItemType>
</ProjectReference>

Просмотреть файл

@ -3,6 +3,7 @@
<PropertyGroup>
<ANCM-Setup Condition="$(ANCM-Setup) == ''">$(MSBuildThisFileDirectory)..\</ANCM-Setup>
<EnableSourceLink>false</EnableSourceLink>
</PropertyGroup>
<PropertyGroup>

Просмотреть файл

@ -0,0 +1,8 @@
<Project>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" />
<PropertyGroup>
<!-- Some of the tests make assertions which require symbols to map exactly back to the source root. -->
<DeterministicSourcePaths>false</DeterministicSourcePaths>
</PropertyGroup>
</Project>

Просмотреть файл

@ -28,7 +28,7 @@
projectUrl=$(PackageProjectUrl);
iconUrl=$(PackageIconUrl);
repositoryUrl=$(RepositoryUrl);
repositoryCommit=$(RepositoryCommit);
repositoryCommit=$(SourceRevisionId);
copyright=$(Copyright);
OutputBinary=$(OutputPath)$(AssemblyName).dll;

Просмотреть файл

@ -33,7 +33,7 @@
projectUrl=$(PackageProjectUrl);
iconUrl=$(PackageIconUrl);
repositoryUrl=$(RepositoryUrl);
repositoryCommit=$(RepositoryCommit);
repositoryCommit=$(SourceRevisionId);
copyright=$(Copyright);
OutputBinary=$(OutputPath)$(AssemblyName).dll;

Просмотреть файл

@ -46,7 +46,7 @@
licenseUrl=$(PackageLicenseUrl);
owners=$(Company);
projectUrl=$(PackageProjectUrl);
repositoryCommit=$(RepositoryCommit);
repositoryCommit=$(SourceRevisionId);
repositoryUrl=$(RepositoryUrl);
tags=$(PackageTags.Replace(';', ' '));
version=$(PackageVersion);

Просмотреть файл

@ -14,7 +14,7 @@
projectUrl=$(PackageProjectUrl);
repositoryUrl=$(RepositoryUrl);
repositoryType=$(RepositoryType);
repositoryCommit=$(RepositoryCommit);
repositoryCommit=$(SourceRevisionId);
</NuspecProperties>
</PropertyGroup>
</Target>

Просмотреть файл

@ -8,6 +8,7 @@
<PreReleaseBrandingLabel>Preview $(PreReleasePreviewNumber)</PreReleaseBrandingLabel>
<ExperimentalVersionPrefix>0.3.$(AspNetCorePatchVersion)</ExperimentalVersionPrefix>
<BlazorComponentsVersionPrefix>0.8.$(AspNetCorePatchVersion)</BlazorComponentsVersionPrefix>
<VersionPrefix>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion)</VersionPrefix>
<!-- ANCM versioning is intentionally 10 + AspNetCoreMajorVersion because earlier versions of ANCM shipped as 8.x. -->
<AspNetCoreModuleVersionMajor>1$(AspNetCoreMajorVersion)</AspNetCoreModuleVersionMajor>
@ -15,10 +16,10 @@
<AspNetCoreModuleVersionRevision>$(AspNetCorePatchVersion)</AspNetCoreModuleVersionRevision>
<OfficialBuildId Condition="'$(OfficialBuildId)' == ''">$(BUILD_BUILDNUMBER)</OfficialBuildId>
<OfficialBuildId Condition="'$(OfficialBuildId)' == '' AND '$(TEAMCITY_VERSION)' != ''">$([System.DateTime]::Now.ToString('yyyyMMdd')).$(BUILD_NUMBER)</OfficialBuildId>
<OfficialBuildId Condition="'$(OfficialBuildId)' == '' AND '$(IsOfficialBuild)' == 'true'">$([System.DateTime]::Now.ToString('yyyyMMdd')).1</OfficialBuildId>
</PropertyGroup>
<PropertyGroup Condition=" '$(OfficialBuildId)' != '' AND '$(BuildNumberSuffix)' == '' ">
<PropertyGroup Condition=" '$(OfficialBuildId)' != '' ">
<!-- This *mostly* implements core versioning. Spec: https://github.com/dotnet/arcade/blob/master/Documentation/CorePackages/Versioning.md -->
<_BuildNumber>$(OfficialBuildId)</_BuildNumber>
@ -32,18 +33,20 @@
<_BuildNumberShortDate>$([MSBuild]::Add($([MSBuild]::Add($([MSBuild]::Multiply($(_BuildNumberYY), 1000)), $([MSBuild]::Multiply($(_BuildNumberMM), 50)))), $(_BuildNumberDD)))</_BuildNumberShortDate>
<VersionSuffixBuildOfTheDay>$([System.Convert]::ToInt32($(_BuildNumberR)))</VersionSuffixBuildOfTheDay>
<!-- This is where we currently differ from the core versioning spec. This can be removed when we get official builds running in Azure Pipelines. -->
<VersionSuffixBuildOfTheDayPadded Condition=" '$(TEAMCITY_VERSION)' == '' ">$(VersionSuffixBuildOfTheDay.PadLeft(2, '0'))</VersionSuffixBuildOfTheDayPadded>
<VersionSuffixBuildOfTheDayPadded Condition=" '$(TEAMCITY_VERSION)' != '' ">$(VersionSuffixBuildOfTheDay.PadLeft(4, '0'))</VersionSuffixBuildOfTheDayPadded>
<VersionSuffixBuildOfTheDayPadded>$(VersionSuffixBuildOfTheDay.PadLeft(2, '0'))</VersionSuffixBuildOfTheDayPadded>
<!-- TODO: consider using semver 2.0 instead, when/if https://github.com/dotnet/core-setup/issues/4795 is resolved -->
<BuildNumberSuffix>$(_BuildNumberShortDate)-$(VersionSuffixBuildOfTheDayPadded)</BuildNumberSuffix>
<FileRevisionVersion>$(_BuildNumberShortDate)</FileRevisionVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(OfficialBuildId)' == '' ">
<BuildNumberSuffix>t000</BuildNumberSuffix>
<FileRevisionVersion>42424</FileRevisionVersion>
</PropertyGroup>
<PropertyGroup>
<BuildNumberSuffix Condition=" '$(BuildNumberSuffix)' == '' ">t000</BuildNumberSuffix>
<VersionPrefix>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion)</VersionPrefix>
<VersionSuffix>$(PreReleaseLabel)-$(BuildNumberSuffix)</VersionSuffix>
<BrandingVersionSuffix>$(PreReleaseBrandingLabel) Build $(BuildNumberSuffix)</BrandingVersionSuffix>