|
1 | | -<Project Sdk="Microsoft.Build.NoTargets"> |
2 | | - <PropertyGroup> |
3 | | - <TargetFramework>netstandard2.0</TargetFramework> |
4 | | - <GenerateAssemblyVersionInfo>false</GenerateAssemblyVersionInfo> |
5 | | - <EnableDefaultSignFiles>false</EnableDefaultSignFiles> |
6 | | - <MicroBuild_DoNotStrongNameSign>true</MicroBuild_DoNotStrongNameSign> |
7 | | - <IsPackable>false</IsPackable> |
8 | | - <OutDir>$(RepoRoot)packages\</OutDir> |
9 | | - </PropertyGroup> |
10 | | - |
| 1 | +<Project Sdk="Microsoft.NET.Sdk"> |
11 | 2 | <PropertyGroup> |
| 3 | + <TargetFramework>net10.0</TargetFramework> |
12 | 4 | <!-- Determine repository root when the pipeline variables are unavailable (e.g. local invocations). --> |
13 | 5 | <_RepoRoot Condition="'$(RepoRoot)' != ''">$(RepoRoot)</_RepoRoot> |
14 | 6 | <_RepoRoot Condition="'$(_RepoRoot)' == ''">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\..\'))</_RepoRoot> |
|
25 | 17 | <MicroBuild_SigningEnabled>true</MicroBuild_SigningEnabled> |
26 | 18 | </PropertyGroup> |
27 | 19 |
|
| 20 | + <Import Project="$(NuGetPackageRoot)microsoft.dotnet.signtool\$(MicrosoftDotNetSignToolVersion)\build\Microsoft.DotNet.SignTool.props" /> |
| 21 | + |
| 22 | + <!-- The name of the .NET specific certificate, which is a general replacement for Microsoft400 |
| 23 | + If UseDotNetCert is specific in a repo's eng/Signing.props, all usage of Microsoft400 is replaced |
| 24 | + with MicrosoftDotNet500 --> |
| 25 | + <PropertyGroup> |
| 26 | + <DotNetCertificateName>MicrosoftDotNet500</DotNetCertificateName> |
| 27 | + <UseDotNetCertificate>false</UseDotNetCertificate> |
| 28 | + </PropertyGroup> |
| 29 | + |
28 | 30 | <ItemGroup> |
29 | | - <FilesToSign Include="$(PackagesDir)**\*.nupkg"> |
| 31 | + <FileExtensionSignInfo Include=".nupkg" CertificateName="NuGet" /> |
| 32 | + <FileExtensionSignInfo Include=".dll" CertificateName="Microsoft400" /> |
| 33 | + <FileSignInfo Include="Microsoft.Dotnet.Installation.dll" CertificateName="Microsoft400" /> |
| 34 | + <FileSignInfo Include="Microsoft.Dotnet.Installation*.nupkg" CertificateName="NuGet" /> |
| 35 | + <ItemsToSign Include="$(PackagesDir)**\Microsoft.Dotnet.Installation*.nupkg"> |
30 | 36 | <Authenticode>NuGet</Authenticode> |
31 | | - </FilesToSign> |
| 37 | + </ItemsToSign> |
32 | 38 | </ItemGroup> |
33 | 39 |
|
| 40 | + <PropertyGroup Condition="'$(SignType)' == ''"> |
| 41 | + <SignType>test</SignType> |
| 42 | + <TestSign>true</TestSign> |
| 43 | + </PropertyGroup> |
| 44 | + |
| 45 | + <PropertyGroup Condition="'$(TestSign)' == ''"> |
| 46 | + <TestSign>false</TestSign> |
| 47 | + </PropertyGroup> |
| 48 | + |
| 49 | + |
| 50 | + <Target Name="Sign" AfterTargets="Build"> |
| 51 | + <Microsoft.DotNet.SignTool.SignToolTask |
| 52 | + DryRun="false" |
| 53 | + TestSign="$(TestSign)" |
| 54 | + ItemsToSign="@(ItemsToSign)" |
| 55 | + FileSignInfo="@(FileSignInfo)" |
| 56 | + FileExtensionSignInfo="@(FileExtensionSignInfo)" |
| 57 | + TempDir="$(IntermediateOutputPath)" |
| 58 | + LogDir="$(LogDir)" |
| 59 | + DoStrongNameCheck="false" |
| 60 | + DotNetPath="$(DotNetPath)" |
| 61 | + MicroBuildCorePath="$(NuGetPackageRoot)microsoft.visualstudioeng.microbuild.core\$(MicrosoftVisualStudioEngMicroBuildCoreVersion)" |
| 62 | + SNBinaryPath="$(NuGetPackageRoot)sn\$(SNVersion)\sn.exe" |
| 63 | + > |
| 64 | + </Microsoft.DotNet.SignTool.SignToolTask> |
| 65 | + </Target> |
34 | 66 | </Project> |
0 commit comments