Installer updates (Merge to SDK Changeset) (#17959)

This commit is contained in:
Michael Yanni 2024-04-06 11:13:05 -07:00 committed by GitHub
commit 899cd0fdb3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
209 changed files with 986 additions and 1713 deletions

View file

@ -41,7 +41,7 @@ dotnet_style_qualification_for_event = false:suggestion
# only use var when it's obvious what the variable type is # only use var when it's obvious what the variable type is
csharp_style_var_for_built_in_types = false:none csharp_style_var_for_built_in_types = false:none
csharp_style_var_when_type_is_apparent = false:none csharp_style_var_when_type_is_apparent = false:none
csharp_style_var_elsewhere = false:suggestion csharp_style_var_elsewhere = false:none
# use language keywords instead of BCL types # use language keywords instead of BCL types
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion

22
.gitattributes vendored
View file

@ -1,13 +1,13 @@
*.doc diff=astextplain *.doc binary
*.DOC diff=astextplain *.DOC binary
*.docx diff=astextplain *.docx binary
*.DOCX diff=astextplain *.DOCX binary
*.dot diff=astextplain *.dot binary
*.DOT diff=astextplain *.DOT binary
*.pdf diff=astextplain *.pdf binary
*.PDF diff=astextplain *.PDF binary
*.rtf diff=astextplain *.rtf binary
*.RTF diff=astextplain *.RTF binary
*.jpg binary *.jpg binary
*.png binary *.png binary
@ -52,4 +52,4 @@
*.fsproj text=auto *.fsproj text=auto
*.dbproj text=auto *.dbproj text=auto
*.xlf text=auto *.xlf text=auto
*.sln text=auto eol=crlf *.sln text=auto eol=crlf

View file

@ -1,11 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project> <!-- Platform needs to be set with TreatAsLocalProperty since it is a global property and cannot be overridden otherwise. -->
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" /> <Project TreatAsLocalProperty="Platform">
<PropertyGroup Condition="'$(CopyrightNetFoundation)' != ''">
<Copyright>$(CopyrightNetFoundation)</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>
<PropertyGroup> <PropertyGroup>
<BuildArchitecture Condition="'$(BuildArchitecture)' == ''">$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture> <BuildArchitecture Condition="'$(BuildArchitecture)' == ''">$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture>
@ -14,7 +9,24 @@
<Architecture Condition="'$(Architecture)' == '' AND '$(BuildArchitecture)' == 'ppc64le'">$(BuildArchitecture)</Architecture> <Architecture Condition="'$(Architecture)' == '' AND '$(BuildArchitecture)' == 'ppc64le'">$(BuildArchitecture)</Architecture>
<Architecture Condition="'$(Architecture)' == '' AND '$(BuildArchitecture)' == 'loongarch64'">$(BuildArchitecture)</Architecture> <Architecture Condition="'$(Architecture)' == '' AND '$(BuildArchitecture)' == 'loongarch64'">$(BuildArchitecture)</Architecture>
<Architecture Condition="'$(Architecture)' == ''">x64</Architecture> <Architecture Condition="'$(Architecture)' == ''">x64</Architecture>
<!--
The finalizer project needs to have Platform set to build for the correct architecture.
Platform needs to be set prior to calling the Arcade SDK, which sets PlatformName in RepoDefaults.props and modifies the OutputPath in ProjectLayout.props to include a PlatformName folder in the path.
Currently, build.cmd calls run-build.ps1, which always sets the Architecture.
However, if you wanted to build the finalizer project directly, the Architecture will use the logic above to be set properly, and thus maintain the correct OutputPath.
Note: The redist project does use Architecture. The Arcade SDK does not use either BuildArchitecture or Architecture.
-->
<Platform Condition="'$(SetPlatformFromArchitecture)' == 'true' And ('$(Platform)' == '' Or '$(Platform)' == 'AnyCPU')">$(Architecture)</Platform>
</PropertyGroup> </PropertyGroup>
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<PropertyGroup Condition="'$(CopyrightNetFoundation)' != ''">
<Copyright>$(CopyrightNetFoundation)</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>
<PropertyGroup Condition="'$(PgoInstrument)' == 'true'"> <PropertyGroup Condition="'$(PgoInstrument)' == 'true'">
<SkipBuildingInstallers>true</SkipBuildingInstallers> <SkipBuildingInstallers>true</SkipBuildingInstallers>
<PgoTerm>-pgo</PgoTerm> <PgoTerm>-pgo</PgoTerm>

View file

@ -1,7 +1,7 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16 # Visual Studio Version 17
VisualStudioVersion = 16.0.28603.18 VisualStudioVersion = 17.8.34112.27
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{ED2FE3E2-F7E7-4389-8231-B65123F2076F}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{ED2FE3E2-F7E7-4389-8231-B65123F2076F}"
EndProject EndProject
@ -15,8 +15,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "core-sdk-tasks", "src\core-
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Tools.Tests.Utilities", "test\Microsoft.DotNet.Tools.Tests.Utilities\Microsoft.DotNet.Tools.Tests.Utilities.csproj", "{78E15EC1-7732-41E3-8591-934E9F583254}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Tools.Tests.Utilities", "test\Microsoft.DotNet.Tools.Tests.Utilities\Microsoft.DotNet.Tools.Tests.Utilities.csproj", "{78E15EC1-7732-41E3-8591-934E9F583254}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SdkResolver", "src\SdkResolver\SdkResolver.csproj", "{7EE15292-2CAD-44FA-8A1F-BAC4688A49E0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Dotnet.Sdk.Internal", "src\Microsoft.Dotnet.Sdk.Internal\Microsoft.Dotnet.Sdk.Internal.csproj", "{73F07908-981B-41BB-B9BD-F3420274A6F7}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Dotnet.Sdk.Internal", "src\Microsoft.Dotnet.Sdk.Internal\Microsoft.Dotnet.Sdk.Internal.csproj", "{73F07908-981B-41BB-B9BD-F3420274A6F7}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SdkTests", "test\SdkTests\SdkTests.csproj", "{CB1EE94E-CB83-4071-9DD0-9929AE2B7282}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SdkTests", "test\SdkTests\SdkTests.csproj", "{CB1EE94E-CB83-4071-9DD0-9929AE2B7282}"
@ -45,10 +43,6 @@ Global
{78E15EC1-7732-41E3-8591-934E9F583254}.Debug|Any CPU.Build.0 = Debug|Any CPU {78E15EC1-7732-41E3-8591-934E9F583254}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78E15EC1-7732-41E3-8591-934E9F583254}.Release|Any CPU.ActiveCfg = Release|Any CPU {78E15EC1-7732-41E3-8591-934E9F583254}.Release|Any CPU.ActiveCfg = Release|Any CPU
{78E15EC1-7732-41E3-8591-934E9F583254}.Release|Any CPU.Build.0 = Release|Any CPU {78E15EC1-7732-41E3-8591-934E9F583254}.Release|Any CPU.Build.0 = Release|Any CPU
{7EE15292-2CAD-44FA-8A1F-BAC4688A49E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7EE15292-2CAD-44FA-8A1F-BAC4688A49E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7EE15292-2CAD-44FA-8A1F-BAC4688A49E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7EE15292-2CAD-44FA-8A1F-BAC4688A49E0}.Release|Any CPU.Build.0 = Release|Any CPU
{73F07908-981B-41BB-B9BD-F3420274A6F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {73F07908-981B-41BB-B9BD-F3420274A6F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{73F07908-981B-41BB-B9BD-F3420274A6F7}.Debug|Any CPU.Build.0 = Debug|Any CPU {73F07908-981B-41BB-B9BD-F3420274A6F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{73F07908-981B-41BB-B9BD-F3420274A6F7}.Release|Any CPU.ActiveCfg = Release|Any CPU {73F07908-981B-41BB-B9BD-F3420274A6F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -70,7 +64,6 @@ Global
{1BFF54F9-4E35-49DB-893C-AF2047722FC6} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {1BFF54F9-4E35-49DB-893C-AF2047722FC6} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{53AF2D01-B69F-4CD0-86A7-8FD95967D23C} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} {53AF2D01-B69F-4CD0-86A7-8FD95967D23C} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{78E15EC1-7732-41E3-8591-934E9F583254} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {78E15EC1-7732-41E3-8591-934E9F583254} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{7EE15292-2CAD-44FA-8A1F-BAC4688A49E0} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{CB1EE94E-CB83-4071-9DD0-9929AE2B7282} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {CB1EE94E-CB83-4071-9DD0-9929AE2B7282} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{658EF9BE-452C-4D31-AA24-B9E2235799A8} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {658EF9BE-452C-4D31-AA24-B9E2235799A8} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
EndGlobalSection EndGlobalSection

View file

@ -1,48 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28603.18
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{ED2FE3E2-F7E7-4389-8231-B65123F2076F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "finalizer_shim", "src\finalizer_shim\finalizer_shim.csproj", "{688E2883-C5A9-4D66-A207-772C9160989C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Debug|x64 = Debug|x64
Debug|arm64 = Debug|arm64
Debug|arm = Debug|arm
Release|x86 = Release|x86
Release|x64 = Release|x64
Release|arm64 = Release|arm64
Release|arm = Release|arm
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{688E2883-C5A9-4D66-A207-772C9160989C}.Debug|x86.ActiveCfg = Debug|x86
{688E2883-C5A9-4D66-A207-772C9160989C}.Debug|x86.Build.0 = Debug|x86
{688E2883-C5A9-4D66-A207-772C9160989C}.Debug|x64.ActiveCfg = Debug|x64
{688E2883-C5A9-4D66-A207-772C9160989C}.Debug|x64.Build.0 = Debug|x64
{688E2883-C5A9-4D66-A207-772C9160989C}.Debug|arm64.ActiveCfg = Debug|arm64
{688E2883-C5A9-4D66-A207-772C9160989C}.Debug|arm64.Build.0 = Debug|arm64
{688E2883-C5A9-4D66-A207-772C9160989C}.Debug|arm.ActiveCfg = Debug|arm
{688E2883-C5A9-4D66-A207-772C9160989C}.Debug|arm.Build.0 = Debug|arm
{688E2883-C5A9-4D66-A207-772C9160989C}.Release|x86.ActiveCfg = Release|x86
{688E2883-C5A9-4D66-A207-772C9160989C}.Release|x86.Build.0 = Release|x86
{688E2883-C5A9-4D66-A207-772C9160989C}.Release|x64.ActiveCfg = Release|x64
{688E2883-C5A9-4D66-A207-772C9160989C}.Release|x64.Build.0 = Release|x64
{688E2883-C5A9-4D66-A207-772C9160989C}.Release|arm64.ActiveCfg = Release|arm64
{688E2883-C5A9-4D66-A207-772C9160989C}.Release|arm64.Build.0 = Release|arm64
{688E2883-C5A9-4D66-A207-772C9160989C}.Release|arm.ActiveCfg = Release|arm
{688E2883-C5A9-4D66-A207-772C9160989C}.Release|arm.Build.0 = Release|arm
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{688E2883-C5A9-4D66-A207-772C9160989C} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {18FCFCA3-D1A8-4D3A-9763-6A658D0D726F}
EndGlobalSection
EndGlobal

View file

@ -1,12 +1,10 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<_SuppressSdkImports>false</_SuppressSdkImports> <_SuppressSdkImports>false</_SuppressSdkImports>
</PropertyGroup> </PropertyGroup>
<Target Name="PopulateGenerateChecksumItems" <Target Name="PopulateGenerateChecksumItems" AfterTargets="Build" BeforeTargets="GenerateChecksums">
AfterTargets="Build"
BeforeTargets="GenerateChecksums" >
<ItemGroup> <ItemGroup>
<InstallerFiles Include="$(ArtifactsShippingPackagesDir)**\*.msi" /> <InstallerFiles Include="$(ArtifactsShippingPackagesDir)**\*.msi" />
<InstallerFiles Include="$(ArtifactsShippingPackagesDir)**\*.exe" /> <InstallerFiles Include="$(ArtifactsShippingPackagesDir)**\*.exe" />
@ -14,11 +12,12 @@
<InstallerFiles Include="$(ArtifactsShippingPackagesDir)**\*.tar.gz" /> <InstallerFiles Include="$(ArtifactsShippingPackagesDir)**\*.tar.gz" />
<InstallerFiles Include="$(ArtifactsShippingPackagesDir)**\*.deb" /> <InstallerFiles Include="$(ArtifactsShippingPackagesDir)**\*.deb" />
<InstallerFiles Include="$(ArtifactsShippingPackagesDir)**\*.rpm" /> <InstallerFiles Include="$(ArtifactsShippingPackagesDir)**\*.rpm" />
<GenerateChecksumItems Include="%(InstallerFiles.Identity)" > <GenerateChecksumItems Include="%(InstallerFiles.Identity)">
<DestinationPath>%(FullPath).sha512</DestinationPath> <DestinationPath>%(FullPath).sha512</DestinationPath>
</GenerateChecksumItems> </GenerateChecksumItems>
</ItemGroup> </ItemGroup>
</Target> </Target>
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" /> <Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
</Project> </Project>

View file

@ -12,9 +12,8 @@
<!-- Regular build --> <!-- Regular build -->
<ItemGroup> <ItemGroup>
<ProjectToBuild Include="$(RepoRoot)Microsoft.DotNet.Cli.sln" /> <ProjectToBuild Include="$(RepoRoot)Microsoft.DotNet.Cli.sln" />
<ProjectToBuild Condition="'$(OS)' == 'Windows_NT' And ('$(Architecture)' == 'x86' Or '$(Architecture)' == 'x64' Or '$(Architecture)' == 'arm64' Or '$(Architecture)' == 'arm')" <ProjectToBuild Condition="'$(OS)' == 'Windows_NT' And ('$(Architecture)' == 'x86' Or '$(Architecture)' == 'x64' Or '$(Architecture)' == 'arm64')"
Include="$(RepoRoot)eng\version.csproj; Include="$(RepoRoot)src\finalizer\finalizer-build.csproj" />
$(RepoRoot)eng\native.proj" />
</ItemGroup> </ItemGroup>
</Otherwise> </Otherwise>
</Choose> </Choose>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <Project>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- The following properties (unlike those in version.props) are maintained manually. So <!--
when there is a merge conflict, the highest version should generally be chosen, rather The following properties (unlike those in version.props) are maintained manually. So
than keeping what's in the branch, which is the usual strategy with version.props merge when there is a merge conflict, the highest version should generally be chosen, rather
conflicts. than keeping what's in the branch, which is the usual strategy with version.props merge
conflicts.
Basically: In this file, choose the highest version when resolving merge conflicts.
Basically: In this file, choose the highest version when resolving merge conflicts.
--> -->
<PropertyGroup> <PropertyGroup>
<MicrosoftWindowsSDKNETRef10_0_17763PackageVersion>10.0.17763.31</MicrosoftWindowsSDKNETRef10_0_17763PackageVersion> <MicrosoftWindowsSDKNETRef10_0_17763PackageVersion>10.0.17763.31</MicrosoftWindowsSDKNETRef10_0_17763PackageVersion>
@ -16,4 +16,5 @@
<MicrosoftWindowsSDKNETRef10_0_22000PackageVersion>10.0.22000.31</MicrosoftWindowsSDKNETRef10_0_22000PackageVersion> <MicrosoftWindowsSDKNETRef10_0_22000PackageVersion>10.0.22000.31</MicrosoftWindowsSDKNETRef10_0_22000PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_22621PackageVersion>10.0.22621.31</MicrosoftWindowsSDKNETRef10_0_22621PackageVersion> <MicrosoftWindowsSDKNETRef10_0_22621PackageVersion>10.0.22621.31</MicrosoftWindowsSDKNETRef10_0_22621PackageVersion>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View file

@ -85,18 +85,15 @@
<CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)productCommit-*.txt.sha512" Condition=" '$(PublishBinariesAndBadge)' == 'false'" /> <CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)productCommit-*.txt.sha512" Condition=" '$(PublishBinariesAndBadge)' == 'false'" />
<CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)productVersion.txt.sha512" Condition=" '$(OS)' != 'Windows_NT' or '$(Architecture)' != 'x64'" /> <CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)productVersion.txt.sha512" Condition=" '$(OS)' != 'Windows_NT' or '$(Architecture)' != 'x64'" />
<CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)sdk-productVersion.txt.sha512" Condition=" '$(OS)' != 'Windows_NT' or '$(Architecture)' != 'x64'" /> <CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)sdk-productVersion.txt.sha512" Condition=" '$(OS)' != 'Windows_NT' or '$(Architecture)' != 'x64'" />
<CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)*.zip.sha512" Condition=" '$(PublishBinariesAndBadge)' == 'false' "/> <CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)*.zip.sha512" Condition=" '$(PublishBinariesAndBadge)' == 'false' " />
<CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)*.tar.gz.sha512" Condition=" '$(PublishBinariesAndBadge)' == 'false' "/> <CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)*.tar.gz.sha512" Condition=" '$(PublishBinariesAndBadge)' == 'false' " />
</ItemGroup> </ItemGroup>
<Target Name="PublishSdkAssetsAndChecksums" <Target Name="PublishSdkAssetsAndChecksums"
BeforeTargets="Publish" BeforeTargets="Publish"
Condition="$(DotNetPublishUsingPipelines)"> Condition="$(DotNetPublishUsingPipelines)">
<ReadLinesFromFile File="$(ArtifactsTmpDir)FullNugetVersion.version"> <ReadLinesFromFile File="$(ArtifactsTmpDir)FullNugetVersion.version">
<Output <Output TaskParameter="Lines" PropertyName="FullNugetVersion" />
TaskParameter="Lines"
PropertyName="FullNugetVersion"/>
</ReadLinesFromFile> </ReadLinesFromFile>
<ItemGroup> <ItemGroup>

View file

@ -5,6 +5,7 @@
custom publishing target. And should not be picked up by arcade's default publishing logic. --> custom publishing target. And should not be picked up by arcade's default publishing logic. -->
<ItemsToSignPostBuild Remove="*.wixpack.zip" /> <ItemsToSignPostBuild Remove="*.wixpack.zip" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(PostBuildSign)' != 'true'"> <ItemGroup Condition="'$(PostBuildSign)' != 'true'">
<ItemsToSign Remove="@(ItemsToSign)" /> <ItemsToSign Remove="@(ItemsToSign)" />
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.exe" /> <ItemsToSign Include="$(ArtifactsPackagesDir)**\*.exe" />
@ -17,10 +18,7 @@
<ExternalCertificateId Condition="'$(ExternalCertificateId)' == ''">3PartySHA2</ExternalCertificateId> <ExternalCertificateId Condition="'$(ExternalCertificateId)' == ''">3PartySHA2</ExternalCertificateId>
<InternalCertificateId Condition="'$(InternalCertificateId)' == ''">MicrosoftDotNet500</InternalCertificateId> <InternalCertificateId Condition="'$(InternalCertificateId)' == ''">MicrosoftDotNet500</InternalCertificateId>
<!-- <!-- Signing of shipping artifacts (layout, msi, bundle) are handled separately. It is therefore expected that <ItemsToSign> could be an empty set. -->
Signing of shipping artifacts (layout, msi, bundle) are handled separately.
It is therefore expected that <ItemsToSign> could be an empty set.
-->
<AllowEmptySignList>true</AllowEmptySignList> <AllowEmptySignList>true</AllowEmptySignList>
<AllowEmptySignPostBuildList>true</AllowEmptySignPostBuildList> <AllowEmptySignPostBuildList>true</AllowEmptySignPostBuildList>
@ -33,6 +31,7 @@
<FileSignInfo Include="MessagePack.dll" CertificateName="$(ExternalCertificateId)" /> <FileSignInfo Include="MessagePack.dll" CertificateName="$(ExternalCertificateId)" />
<FileSignInfo Include="Nerdbank.Streams.dll" CertificateName="$(ExternalCertificateId)" /> <FileSignInfo Include="Nerdbank.Streams.dll" CertificateName="$(ExternalCertificateId)" />
<FileSignInfo Include="StreamJsonRpc.dll" CertificateName="$(ExternalCertificateId)" /> <FileSignInfo Include="StreamJsonRpc.dll" CertificateName="$(ExternalCertificateId)" />
<FileSignInfo Include="Valleysoft.DockerCredsProvider.dll" CertificateName="$(ExternalCertificateId)" />
<!-- Files in the layout that should not be signed --> <!-- Files in the layout that should not be signed -->
<FileSignInfo Include="apphost.exe" CertificateName="None" /> <FileSignInfo Include="apphost.exe" CertificateName="None" />

View file

@ -71,9 +71,9 @@
<MicrosoftAspNetCoreAppRefInternalPackageVersion>9.0.0-preview.4.24205.2</MicrosoftAspNetCoreAppRefInternalPackageVersion> <MicrosoftAspNetCoreAppRefInternalPackageVersion>9.0.0-preview.4.24205.2</MicrosoftAspNetCoreAppRefInternalPackageVersion>
<MicrosoftAspNetCoreAppRuntimewinx64PackageVersion>9.0.0-preview.4.24205.2</MicrosoftAspNetCoreAppRuntimewinx64PackageVersion> <MicrosoftAspNetCoreAppRuntimewinx64PackageVersion>9.0.0-preview.4.24205.2</MicrosoftAspNetCoreAppRuntimewinx64PackageVersion>
<VSRedistCommonAspNetCoreSharedFrameworkx6490PackageVersion>9.0.0-preview.4.24205.2</VSRedistCommonAspNetCoreSharedFrameworkx6490PackageVersion> <VSRedistCommonAspNetCoreSharedFrameworkx6490PackageVersion>9.0.0-preview.4.24205.2</VSRedistCommonAspNetCoreSharedFrameworkx6490PackageVersion>
<dotnetdevcertsPackageVersion>9.0.0-preview.4.24205.2</dotnetdevcertsPackageVersion> <DotnetDevCertsPackageVersion>9.0.0-preview.4.24205.2</DotnetDevCertsPackageVersion>
<dotnetuserjwtsPackageVersion>9.0.0-preview.4.24205.2</dotnetuserjwtsPackageVersion> <DotnetUserJwtsPackageVersion>9.0.0-preview.4.24205.2</DotnetUserJwtsPackageVersion>
<dotnetusersecretsPackageVersion>9.0.0-preview.4.24205.2</dotnetusersecretsPackageVersion> <DotnetUserSecretsPackageVersion>9.0.0-preview.4.24205.2</DotnetUserSecretsPackageVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<MicroBuildCorePackageVersion>0.2.0</MicroBuildCorePackageVersion> <MicroBuildCorePackageVersion>0.2.0</MicroBuildCorePackageVersion>
@ -112,8 +112,7 @@
<MicrosoftWindowsDesktopAppRuntimewinx64PackageVersion>9.0.0-preview.4.24204.1</MicrosoftWindowsDesktopAppRuntimewinx64PackageVersion> <MicrosoftWindowsDesktopAppRuntimewinx64PackageVersion>9.0.0-preview.4.24204.1</MicrosoftWindowsDesktopAppRuntimewinx64PackageVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- Runtime and Apphost pack versions are the same for all RIDs. We flow the x64 --> <!-- Runtime and Apphost pack versions are the same for all RIDs. We flow the x64 version above and create aliases without the winx64 here for clarity elsewhere. -->
<!-- version above and create aliases without the winx64 here for clarity elsewhere. -->
<MicrosoftNETCoreAppHostPackageVersion>$(MicrosoftNETCoreAppHostwinx64PackageVersion)</MicrosoftNETCoreAppHostPackageVersion> <MicrosoftNETCoreAppHostPackageVersion>$(MicrosoftNETCoreAppHostwinx64PackageVersion)</MicrosoftNETCoreAppHostPackageVersion>
<MicrosoftNETCoreAppRuntimePackageVersion>$(MicrosoftNETCoreAppRuntimewinx64PackageVersion)</MicrosoftNETCoreAppRuntimePackageVersion> <MicrosoftNETCoreAppRuntimePackageVersion>$(MicrosoftNETCoreAppRuntimewinx64PackageVersion)</MicrosoftNETCoreAppRuntimePackageVersion>
<MicrosoftAspNetCoreAppRuntimePackageVersion>$(MicrosoftAspNetCoreAppRuntimewinx64PackageVersion)</MicrosoftAspNetCoreAppRuntimePackageVersion> <MicrosoftAspNetCoreAppRuntimePackageVersion>$(MicrosoftAspNetCoreAppRuntimewinx64PackageVersion)</MicrosoftAspNetCoreAppRuntimePackageVersion>

View file

@ -1,16 +0,0 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->
<Project>
<PropertyGroup>
<Platform Condition="'$(Platform)'=='' Or $(Platform)=='AnyCPU'">$(Architecture)</Platform>
</PropertyGroup>
<Target Name="Build">
<MSBuild Projects="$(RepoRoot)Native.sln" Properties="Platform=$(Platform)" Targets="Restore;Build" />
</Target>
<Target Name="Test" />
<Target Name="Pack" />
<Target Name="Rebuild" />
<Target Name="IntegrationTest" />
<Target Name="PerformanceTest" />
</Project>

View file

@ -1,8 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<PropertyGroup>
<TargetFramework>$(CoreSdkTargetFramework)</TargetFramework>
<NativeVersionFile>$(ArtifactsObjDir)sdk_version.h</NativeVersionFile>
</PropertyGroup>
<Target Name="GenerateSdkVersionFile" BeforeTargets="CoreCompile" DependsOnTargets="GenerateNativeVersionFile" />
</Project>

View file

@ -12,6 +12,6 @@
}, },
"msbuild-sdks": { "msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24203.1", "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24203.1",
"Microsoft.DotNet.CMake.Sdk": "9.0.0-beta.24203.1" "Microsoft.DotNet.CMake.Sdk": "9.0.0-beta.24203.1",
} "Microsoft.Build.NoTargets": "3.7.0" }
} }

View file

@ -24,9 +24,6 @@ if ($PgoInstrument) {
if ($Sign) { if ($Sign) {
$Parameters = "$Parameters -sign /p:SignCoreSdk=true" $Parameters = "$Parameters -sign /p:SignCoreSdk=true"
# Workaround https://github.com/dotnet/arcade/issues/1776
$WarnAsError = $false
} }
$Parameters = "$Parameters -WarnAsError `$$WarnAsError" $Parameters = "$Parameters -WarnAsError `$$WarnAsError"

View file

@ -82,12 +82,12 @@ src/fsharp/setup/resources/eula/*.rtf
# False positive # False positive
src/installer/src/core-sdk-tasks/BuildFPMToolPreReqs.cs|json src/installer/src/core-sdk-tasks/BuildFPMToolPreReqs.cs|json
src/installer/src/redist/targets/packaging/osx/clisdk/resources/en.lproj/welcome.html|cecill-c src/installer/src/redist/packaging/osx/resources/en.lproj/welcome.html|cecill-c
src/installer/THIRD-PARTY-NOTICES|proprietary-license src/installer/THIRD-PARTY-NOTICES|proprietary-license
# Configuration, doesn't apply to source directly # Configuration, doesn't apply to source directly
src/installer/src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt src/installer/src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt
src/installer/src/redist/targets/packaging/**/*.json src/installer/src/redist/packaging/**/*.json
# #
# msbuild # msbuild

View file

@ -26,16 +26,9 @@ namespace Microsoft.DotNet.Cli.Build
{ {
var resultItem = new TaskItem(item); var resultItem = new TaskItem(item);
item.CopyMetadataTo(resultItem); item.CopyMetadataTo(resultItem);
if (File.Exists(resultItem.GetMetadata("FullPath")) && var isPe = File.Exists(resultItem.GetMetadata("FullPath")) && HasMetadata(resultItem.GetMetadata("FullPath"));
HasMetadata(resultItem.GetMetadata("FullPath"))) resultItem.SetMetadata("IsPE", isPe.ToString());
{
resultItem.SetMetadata("IsPE", "True");
}
else
{
resultItem.SetMetadata("IsPE", "False");
}
resultItemsList.Add(resultItem); resultItemsList.Add(resultItem);
} }

View file

@ -27,7 +27,6 @@ namespace Microsoft.DotNet.Cli.Build
private const string s_dotnetBlobContainerName = "dotnet"; private const string s_dotnetBlobContainerName = "dotnet";
private string _connectionString { get; set; }
private string _containerName { get; set; } private string _containerName { get; set; }
private CloudBlobContainer _blobContainer { get; set; } private CloudBlobContainer _blobContainer { get; set; }
@ -41,14 +40,7 @@ namespace Microsoft.DotNet.Cli.Build
{ {
var storageCredentials = new StorageCredentials(accountName, accountKey); var storageCredentials = new StorageCredentials(accountName, accountKey);
var storageAccount = new CloudStorageAccount(storageCredentials, true); var storageAccount = new CloudStorageAccount(storageCredentials, true);
return GetDotnetBlobContainer(storageAccount, containerName); return storageAccount.CreateCloudBlobClient().GetContainerReference(containerName);
}
private CloudBlobContainer GetDotnetBlobContainer(CloudStorageAccount storageAccount, string containerName)
{
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
return blobClient.GetContainerReference(containerName);
} }
public string UploadFile(string file, Product product, string version) public string UploadFile(string file, Product product, string version)
@ -105,11 +97,7 @@ namespace Microsoft.DotNet.Cli.Build
} }
} }
public IEnumerable<string> ListBlobs(Product product, string version) public IEnumerable<string> ListBlobs(Product product, string version) => ListBlobs($"{product}/{version}");
{
string virtualDirectory = $"{product}/{version}";
return ListBlobs(virtualDirectory);
}
public IEnumerable<string> ListBlobs(string virtualDirectory) public IEnumerable<string> ListBlobs(string virtualDirectory)
{ {
@ -120,10 +108,7 @@ namespace Microsoft.DotNet.Cli.Build
return blobFiles.Results.Select(bf => bf.Uri.PathAndQuery.Replace($"/{_containerName}/", string.Empty)); return blobFiles.Results.Select(bf => bf.Uri.PathAndQuery.Replace($"/{_containerName}/", string.Empty));
} }
public string AcquireLeaseOnBlob( public string AcquireLeaseOnBlob(string blob, TimeSpan? maxWaitDefault = null, TimeSpan? delayDefault = null)
string blob,
TimeSpan? maxWaitDefault = null,
TimeSpan? delayDefault = null)
{ {
TimeSpan maxWait = maxWaitDefault ?? TimeSpan.FromSeconds(120); TimeSpan maxWait = maxWaitDefault ?? TimeSpan.FromSeconds(120);
TimeSpan delay = delayDefault ?? TimeSpan.FromMilliseconds(500); TimeSpan delay = delayDefault ?? TimeSpan.FromMilliseconds(500);
@ -194,26 +179,18 @@ namespace Microsoft.DotNet.Cli.Build
try try
{ {
DeleteBlob(path); DeleteBlob(path);
return true; return true;
} }
catch (Exception e) catch (Exception e)
{ {
Console.WriteLine($"Deleting blob {path} failed with \r\n{e.Message}"); Console.WriteLine($"Deleting blob {path} failed with \r\n{e.Message}");
return false; return false;
} }
} }
private void DeleteBlob(string path) private void DeleteBlob(string path) => _blobContainer.GetBlockBlobReference(path).DeleteAsync().Wait();
{
_blobContainer.GetBlockBlobReference(path).DeleteAsync().Wait();
}
private static string CalculateRelativePathForFile(string file, Product product, string version) private static string CalculateRelativePathForFile(string file, Product product, string version) => $"{product}/{version}/{Path.GetFileName(file)}";
{
return $"{product}/{version}/{Path.GetFileName(file)}";
}
} }
} }
#endif #endif

View file

@ -6,7 +6,6 @@ using System.Collections.Generic;
using Microsoft.Build.Utilities; using Microsoft.Build.Utilities;
using Microsoft.Build.Framework; using Microsoft.Build.Framework;
using System.IO; using System.IO;
using System.Linq;
using System.Text; using System.Text;
using Newtonsoft.Json; using Newtonsoft.Json;
@ -116,32 +115,29 @@ namespace Microsoft.DotNet.Build.Tasks
// --verbose : Set verbose output for FPM tool --Static // --verbose : Set verbose output for FPM tool --Static
// <All folder mappings> : Add all the folder mappings for package_root, docs, man pages --Static // <All folder mappings> : Add all the folder mappings for package_root, docs, man pages --Static
var parameters = new List<string>(); var parameters = new List<string>
parameters.Add("-s dir"); {
parameters.Add("-t rpm"); "-s dir",
parameters.Add(string.Concat("-n ", configJson.Package_Name)); "-t rpm",
parameters.Add(string.Concat("-v ", package_version)); string.Concat("-n ", configJson.Package_Name),
parameters.Add(string.Concat("-a ", configJson.Control.Architecture)); string.Concat("-v ", package_version),
string.Concat("-a ", configJson.Control.Architecture)
};
// Build the list of dependencies as -d <dep1> -d <dep2> // Build the list of dependencies as -d <dep1> -d <dep2>
if (configJson.Rpm_Dependencies != null) if (configJson.Rpm_Dependencies != null)
{ {
foreach (RpmDependency rpmdep in configJson.Rpm_Dependencies) foreach (RpmDependency rpmdep in configJson.Rpm_Dependencies)
{ {
string dependency = "";
if (rpmdep.Package_Name != "") if (rpmdep.Package_Name != "")
{ {
// If no version is specified then the dependency is just the package without >= check // If no version is specified then the dependency is just the package without >= check
if (rpmdep.Package_Version == "") string dependency = rpmdep.Package_Version != "" ?
{ string.Concat(rpmdep.Package_Name, " >= ", rpmdep.Package_Version) :
dependency = rpmdep.Package_Name; rpmdep.Package_Name;
}
else parameters.Add(string.Concat("-d ", EscapeArg(dependency)));
{
dependency = string.Concat(rpmdep.Package_Name, " >= ", rpmdep.Package_Version);
}
} }
if (dependency != "") parameters.Add(string.Concat("-d ", EscapeArg(dependency)));
} }
} }
@ -183,14 +179,11 @@ namespace Microsoft.DotNet.Build.Tasks
// Map all the payload directories as they need to install on the system // Map all the payload directories as they need to install on the system
if (configJson.Install_Root != null) if (configJson.Install_Root != null)
parameters.Add(string.Concat(Path.Combine(InputDir, "package_root/="), parameters.Add(string.Concat(Path.Combine(InputDir, "package_root/="), configJson.Install_Root)); // Package Files
configJson.Install_Root)); // Package Files
if (configJson.Install_Man != null) if (configJson.Install_Man != null)
parameters.Add(string.Concat(Path.Combine(InputDir, "docs", "host/="), parameters.Add(string.Concat(Path.Combine(InputDir, "docs", "host/="), configJson.Install_Man)); // Man Pages
configJson.Install_Man)); // Man Pages
if (configJson.Install_Doc != null) if (configJson.Install_Doc != null)
parameters.Add(string.Concat(Path.Combine(InputDir, "templates", "copyright="), parameters.Add(string.Concat(Path.Combine(InputDir, "templates", "copyright="), configJson.Install_Doc)); // CopyRight File
configJson.Install_Doc)); // CopyRight File
return string.Join(" ", parameters); return string.Join(" ", parameters);
} }
@ -220,14 +213,12 @@ namespace Microsoft.DotNet.Build.Tasks
{ {
sb.Append('\\', 2 * backslashCount); sb.Append('\\', 2 * backslashCount);
} }
// Escape any preceding backslashes and the quote // Escape any preceding backslashes and the quote
else if (arg[i] == '"') else if (arg[i] == '"')
{ {
sb.Append('\\', (2 * backslashCount) + 1); sb.Append('\\', (2 * backslashCount) + 1);
sb.Append('"'); sb.Append('"');
} }
// Output any consumed backslashes and the character // Output any consumed backslashes and the character
else else
{ {
@ -255,6 +246,7 @@ namespace Microsoft.DotNet.Build.Tasks
{ {
return true; return true;
} }
return false; return false;
} }
} }

View file

@ -28,7 +28,6 @@ namespace Microsoft.DotNet.Cli.Build
[Required] [Required]
public int CombinedBuildNumberAndRevision { get; set; } public int CombinedBuildNumberAndRevision { get; set; }
// Should be the BundledTemplates with BundledTemplateInstallPath metadata set to the value calculated for that group // Should be the BundledTemplates with BundledTemplateInstallPath metadata set to the value calculated for that group
[Output] [Output]
public ITaskItem [] BundledTemplatesWithInstallPaths { get; set; } public ITaskItem [] BundledTemplatesWithInstallPaths { get; set; }
@ -39,11 +38,10 @@ namespace Microsoft.DotNet.Cli.Build
// TemplatesMajorMinorVersion: 6.0 (from BundledTemplateMajorMinorVersion from group) // TemplatesMajorMinorVersion: 6.0 (from BundledTemplateMajorMinorVersion from group)
// InstallerUpgradeCode: Guid generated using GenerateGuidFromName, combining TemplateBaseFilename, FullNugetVersion, ProductMonikerRid, and InstallerExtension // InstallerUpgradeCode: Guid generated using GenerateGuidFromName, combining TemplateBaseFilename, FullNugetVersion, ProductMonikerRid, and InstallerExtension
// MSIVersion: Result of calling GenerateMsiVersionFromFullVersion logic with CombinedBuildNumberAndRevision and BundledTemplateMajorMinorPatchVersion from template group // MSIVersion: Result of calling GenerateMsiVersionFromFullVersion logic with CombinedBuildNumberAndRevision and BundledTemplateMajorMinorPatchVersion from template group
[Output] [Output]
public ITaskItem [] TemplatesComponents { get; set; } public ITaskItem [] TemplatesComponents { get; set; }
private const int _patchVersionResetOffset = 1; private const int PatchVersionResetOffset = 1;
public override bool Execute() public override bool Execute()
{ {
@ -62,20 +60,20 @@ namespace Microsoft.DotNet.Cli.Build
BundledTemplatesWithInstallPaths = BundledTemplates.Select(t => BundledTemplatesWithInstallPaths = BundledTemplates.Select(t =>
{ {
var templateWithInstallPath = new TaskItem(t); var templateWithInstallPath = new TaskItem(t);
templateWithInstallPath.SetMetadata("BundledTemplateInstallPath", groups[t.GetMetadata("TemplateFrameworkVersion")].BundledTemplateInstallPath); templateWithInstallPath.SetMetadata("BundledTemplateInstallPath", groups[t.GetMetadata("TemplateFrameworkVersion")].InstallPath);
return templateWithInstallPath; return templateWithInstallPath;
}).ToArray(); }).ToArray();
TemplatesComponents = groups.Select(g => TemplatesComponents = groups.Select(g =>
{ {
string majorMinorWithoutDots = g.Value.BundledTemplateMajorMinorVersion.Replace(".", ""); string majorMinorWithoutDots = g.Value.MajorMinorVersion.Replace(".", "");
var componentItem = new TaskItem($"NetCore{majorMinorWithoutDots}Templates"); var componentItem = new TaskItem($"NetCore{majorMinorWithoutDots}Templates");
var templateBaseFilename = $"dotnet-{majorMinorWithoutDots}templates"; var templateBaseFilename = $"dotnet-{majorMinorWithoutDots}templates";
componentItem.SetMetadata("TemplateBaseFilename", templateBaseFilename); componentItem.SetMetadata("TemplateBaseFilename", templateBaseFilename);
componentItem.SetMetadata("TemplatesMajorMinorVersion", g.Value.BundledTemplateMajorMinorVersion); componentItem.SetMetadata("TemplatesMajorMinorVersion", g.Value.MajorMinorVersion);
var installerUpgradeCode = GenerateGuidFromName.GenerateGuid(string.Join("-", templateBaseFilename, FullNugetVersion, ProductMonikerRid) + InstallerExtension).ToString().ToUpper(); var installerUpgradeCode = GenerateGuidFromName.GenerateGuid(string.Join("-", templateBaseFilename, FullNugetVersion, ProductMonikerRid) + InstallerExtension).ToString().ToUpper();
componentItem.SetMetadata("InstallerUpgradeCode", installerUpgradeCode); componentItem.SetMetadata("InstallerUpgradeCode", installerUpgradeCode);
componentItem.SetMetadata("MSIVersion", GenerateMsiVersionFromFullVersion.GenerateMsiVersion(CombinedBuildNumberAndRevision, g.Value.BundledTemplateMajorMinorPatchVersion)); componentItem.SetMetadata("MSIVersion", GenerateMsiVersionFromFullVersion.GenerateMsiVersion(CombinedBuildNumberAndRevision, g.Value.MajorMinorPatchVersion));
var brandName = System.Version.Parse(g.Key).Major >= 5 ? var brandName = System.Version.Parse(g.Key).Major >= 5 ?
$"Microsoft .NET {g.Key} Templates" : $"Microsoft .NET {g.Key} Templates" :
@ -89,24 +87,20 @@ namespace Microsoft.DotNet.Cli.Build
return true; return true;
} }
public static public static BundledTemplate Calculate(string aspNetCorePackageVersionTemplate)
(string BundledTemplateInstallPath,
string BundledTemplateMajorMinorVersion,
string BundledTemplateMajorMinorPatchVersion)
Calculate(string aspNetCorePackageVersionTemplate)
{ {
var aspNetCoreTemplate = NuGetVersion.Parse(aspNetCorePackageVersionTemplate); var aspNetCoreTemplate = NuGetVersion.Parse(aspNetCorePackageVersionTemplate);
NuGetVersion baseMajorMinorPatch = GetBaseMajorMinorPatch(aspNetCoreTemplate); NuGetVersion baseMajorMinorPatch = GetBaseMajorMinorPatch(aspNetCoreTemplate);
string bundledTemplateInstallPath = aspNetCoreTemplate.IsPrerelease string bundledTemplateInstallPath = aspNetCoreTemplate.IsPrerelease
? $"{baseMajorMinorPatch.Major}.{baseMajorMinorPatch.Minor}.{baseMajorMinorPatch.Patch}-{aspNetCoreTemplate.Release}" ? $"{baseMajorMinorPatch.Major}.{baseMajorMinorPatch.Minor}.{baseMajorMinorPatch.Patch}-{aspNetCoreTemplate.Release}"
: $"{baseMajorMinorPatch.Major}.{baseMajorMinorPatch.Minor}.{baseMajorMinorPatch.Patch}"; : $"{baseMajorMinorPatch.Major}.{baseMajorMinorPatch.Minor}.{baseMajorMinorPatch.Patch}";
return ( return new BundledTemplate
bundledTemplateInstallPath, {
$"{baseMajorMinorPatch.Major}.{baseMajorMinorPatch.Minor}", InstallPath = bundledTemplateInstallPath,
$"{baseMajorMinorPatch.Major}.{baseMajorMinorPatch.Minor}.{baseMajorMinorPatch.Patch}"); MajorMinorVersion = $"{baseMajorMinorPatch.Major}.{baseMajorMinorPatch.Minor}",
MajorMinorPatchVersion = $"{baseMajorMinorPatch.Major}.{baseMajorMinorPatch.Minor}.{baseMajorMinorPatch.Patch}"
};
} }
private static NuGetVersion GetBaseMajorMinorPatch(NuGetVersion aspNetCoreTemplate) private static NuGetVersion GetBaseMajorMinorPatch(NuGetVersion aspNetCoreTemplate)
@ -116,15 +110,17 @@ namespace Microsoft.DotNet.Cli.Build
// more in the above bug's detail. // more in the above bug's detail.
// There is no non-deterministic existing ComponentId under Major version 5. // There is no non-deterministic existing ComponentId under Major version 5.
// so only apply the patch bump when below 5 // so only apply the patch bump when below 5
int basePatch = aspNetCoreTemplate.Major < 5 ?
int basePatch = aspNetCoreTemplate.Patch + PatchVersionResetOffset :
aspNetCoreTemplate.Major < 5 aspNetCoreTemplate.Patch;
? aspNetCoreTemplate.Patch + _patchVersionResetOffset return new NuGetVersion(aspNetCoreTemplate.Major, aspNetCoreTemplate.Minor, basePatch);
: aspNetCoreTemplate.Patch;
var baseMajorMinorPatch = new NuGetVersion(aspNetCoreTemplate.Major, aspNetCoreTemplate.Minor,
basePatch);
return baseMajorMinorPatch;
} }
} }
public class BundledTemplate
{
public string InstallPath { get; set; }
public string MajorMinorVersion { get; set; }
public string MajorMinorPatchVersion { get; set; }
}
} }

View file

@ -16,44 +16,18 @@ namespace Microsoft.DotNet.Cli.Build
public bool Recursive { get; set; } public bool Recursive { get; set; }
protected override string ToolName protected override string ToolName => "chmod";
{
get { return "chmod"; }
}
protected override MessageImportance StandardOutputLoggingImportance protected override MessageImportance StandardOutputLoggingImportance => MessageImportance.High;
{
get { return MessageImportance.High; } // or else the output doesn't get logged by default
}
protected override string GenerateFullPathToTool() protected override string GenerateFullPathToTool() => "chmod";
{
return "chmod";
}
protected override string GenerateCommandLineCommands() protected override string GenerateCommandLineCommands() => $"{GetRecursive()} {GetMode()} {GetGlob()}";
{
return $"{GetRecursive()} {GetMode()} {GetGlob()}";
}
private string GetGlob() private string GetGlob() => Glob;
{
return Glob;
}
private string GetMode() private string GetMode() => Mode;
{
return Mode;
}
private string GetRecursive() private string GetRecursive() => Recursive ? "--recursive" : null;
{
if(Recursive)
{
return "--recursive";
}
return null;
}
} }
} }

View file

@ -1,10 +1,7 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved. // Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information. // Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using Microsoft.Build.Framework; using Microsoft.Build.Framework;
using Microsoft.Build.Utilities; using Microsoft.Build.Utilities;

View file

@ -1,13 +0,0 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Runtime.InteropServices;
namespace Microsoft.DotNet.Cli.Build.Framework
{
public static class Constants
{
//public static readonly string ProjectFileName = "project.json";
public static readonly string ExeSuffix = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : string.Empty;
}
}

View file

@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license. // The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System;
using System.Diagnostics;
using System.IO; using System.IO;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using Microsoft.Build.Framework; using Microsoft.Build.Framework;
@ -63,12 +61,12 @@ namespace Microsoft.DotNet.Build.Tasks
if (toolResult) if (toolResult)
{ {
var files = System.IO.Directory.GetFiles(Path.GetDirectoryName(TempOutputPath)); var files = Directory.GetFiles(Path.GetDirectoryName(TempOutputPath));
var dest = Path.GetDirectoryName(DestinationPath); var destination = Path.GetDirectoryName(DestinationPath);
// Copy both dll and pdb files to the destination folder // Copy both dll and pdb files to the destination folder
foreach(var file in files) foreach(var file in files)
{ {
File.Copy(file, Path.Combine(dest, Path.GetFileName(file)), overwrite: true); File.Copy(file, Path.Combine(destination, Path.GetFileName(file)), overwrite: true);
// Delete file in temp // Delete file in temp
File.Delete(file); File.Delete(file);
} }
@ -83,22 +81,13 @@ namespace Microsoft.DotNet.Build.Tasks
return toolResult; return toolResult;
} }
protected override string ToolName protected override string ToolName => "crossgen2";
{
get { return "crossgen2"; }
}
protected override MessageImportance StandardOutputLoggingImportance // Default is low, but we want to see output at normal verbosity.
{ protected override MessageImportance StandardOutputLoggingImportance => MessageImportance.Normal;
// Default is low, but we want to see output at normal verbosity.
get { return MessageImportance.Normal; }
}
protected override MessageImportance StandardErrorLoggingImportance // This turns stderr messages into msbuild errors below.
{ protected override MessageImportance StandardErrorLoggingImportance => MessageImportance.High;
// This turns stderr messages into msbuild errors below.
get { return MessageImportance.High; }
}
protected override void LogEventsFromTextOutput(string singleLine, MessageImportance messageImportance) protected override void LogEventsFromTextOutput(string singleLine, MessageImportance messageImportance)
{ {
@ -124,56 +113,21 @@ namespace Microsoft.DotNet.Build.Tasks
} }
} }
protected override string GenerateFullPathToTool() protected override string GenerateFullPathToTool() => CrossgenPath ?? "crossgen2";
{
if (CrossgenPath != null)
{
return CrossgenPath;
}
return "crossgen2"; protected override string GenerateCommandLineCommands() => $"{GetInPath()} {GetOutPath()} {GetArchitecture()} {GetPlatformAssemblyPaths()} {GetCreateSymbols()}";
}
protected override string GenerateCommandLineCommands() private string GetArchitecture() => $"--targetarch {Architecture}";
{
return $"{GetInPath()} {GetOutPath()} {GetArchitecture()} {GetPlatformAssemblyPaths()} {GetCreateSymbols()}";
}
private string GetArchitecture() private string GetCreateSymbols() => RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "--pdb" : "--perfmap";
{
return $"--targetarch {Architecture}";
}
private string GetCreateSymbols() private string GetInPath() => $"\"{SourceAssembly}\"";
{
var option = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "--pdb" : "--perfmap";
return $"{option}";
}
private string GetReadyToRun() private string GetOutPath() => $"-o \"{TempOutputPath}\"";
{
if (ReadyToRun)
{
return "-readytorun";
}
return null;
}
private string GetInPath()
{
return $"\"{SourceAssembly}\"";
}
private string GetOutPath()
{
return $"-o \"{TempOutputPath}\"";
}
private string GetPlatformAssemblyPaths() private string GetPlatformAssemblyPaths()
{ {
var platformAssemblyPaths = String.Empty; var platformAssemblyPaths = string.Empty;
if (PlatformAssemblyPaths != null) if (PlatformAssemblyPaths != null)
{ {
foreach (var excludeTaskItem in PlatformAssemblyPaths) foreach (var excludeTaskItem in PlatformAssemblyPaths)
@ -184,15 +138,7 @@ namespace Microsoft.DotNet.Build.Tasks
return platformAssemblyPaths; return platformAssemblyPaths;
} }
private string GetMissingDependenciesOk()
{
return "-MissingDependenciesOK";
}
protected override void LogToolCommand(string message) protected override void LogToolCommand(string message) => base.LogToolCommand($"{GetWorkingDirectory()}> {message}");
{
base.LogToolCommand($"{base.GetWorkingDirectory()}> {message}");
}
} }
} }

View file

@ -25,50 +25,30 @@ namespace Microsoft.DotNet.Cli.Build
protected override string ToolName => "package_tool.sh"; protected override string ToolName => "package_tool.sh";
private string GetInputDir() private string GetInputDir() => $"-i {InputDirectory}";
{
return $"-i {InputDirectory}";
}
private string GetOutputFile() private string GetOutputFile() => $"-o {OutputDirectory}";
{
return $"-o {OutputDirectory}";
}
private string GetPackageName() private string GetPackageName() => $"-n {PackageName}";
{
return $"-n {PackageName}";
}
private string GetPackageVersion() private string GetPackageVersion() => $"-v {PackageVersion}";
{
return $"-v {PackageVersion}";
}
protected override MessageImportance StandardOutputLoggingImportance protected override MessageImportance StandardOutputLoggingImportance => MessageImportance.High;
{
get { return MessageImportance.High; } // or else the output doesn't get logged by default
}
protected override string GenerateFullPathToTool() protected override string GenerateFullPathToTool()
{ {
string path = ToolPath;
// if ToolPath was not provided by the MSBuild script // if ToolPath was not provided by the MSBuild script
if (string.IsNullOrEmpty(path)) if (string.IsNullOrEmpty(ToolPath))
{ {
Log.LogError($"Could not find the Path to {ToolName}"); Log.LogError($"Could not find the Path to {ToolName}");
return string.Empty; return string.Empty;
} }
return path; return ToolPath;
} }
protected override string GetWorkingDirectory() protected override string GetWorkingDirectory() => WorkingDirectory ?? base.GetWorkingDirectory();
{
return WorkingDirectory ?? base.GetWorkingDirectory();
}
protected override string GenerateCommandLineCommands() protected override string GenerateCommandLineCommands()
{ {
@ -79,26 +59,13 @@ namespace Microsoft.DotNet.Cli.Build
return commandLineCommands; return commandLineCommands;
} }
protected override void LogToolCommand(string message) protected override void LogToolCommand(string message) => base.LogToolCommand($"{GetWorkingDirectory()}> {message}");
{
base.LogToolCommand($"{GetWorkingDirectory()}> {message}");
}
protected override void LogEventsFromTextOutput(string singleLine, MessageImportance messageImportance) protected override void LogEventsFromTextOutput(string singleLine, MessageImportance messageImportance) => Log.LogMessage(messageImportance, singleLine, null);
{
Log.LogMessage(messageImportance, singleLine, null);
}
protected override ProcessStartInfo GetProcessStartInfo( protected override ProcessStartInfo GetProcessStartInfo(string pathToTool, string commandLineCommands, string responseFileSwitch)
string pathToTool,
string commandLineCommands,
string responseFileSwitch)
{ {
var psi = base.GetProcessStartInfo( var psi = base.GetProcessStartInfo(pathToTool, commandLineCommands, responseFileSwitch);
pathToTool,
commandLineCommands,
responseFileSwitch);
foreach (var environmentVariableName in new EnvironmentFilter().GetEnvironmentVariableNamesToRemove()) foreach (var environmentVariableName in new EnvironmentFilter().GetEnvironmentVariableNamesToRemove())
{ {
psi.Environment.Remove(environmentVariableName); psi.Environment.Remove(environmentVariableName);

View file

@ -1,10 +1,9 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved. // Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information. // Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Diagnostics; using System.Diagnostics;
using System.Runtime.InteropServices;
using Microsoft.Build.Framework; using Microsoft.Build.Framework;
using Microsoft.Build.Utilities; using Microsoft.Build.Utilities;
using Microsoft.DotNet.Cli.Build.Framework; using Microsoft.DotNet.Cli.Build.Framework;
namespace Microsoft.DotNet.Cli.Build namespace Microsoft.DotNet.Cli.Build
@ -19,16 +18,9 @@ namespace Microsoft.DotNet.Cli.Build
protected abstract string Args { get; } protected abstract string Args { get; }
protected override ProcessStartInfo GetProcessStartInfo( protected override ProcessStartInfo GetProcessStartInfo(string pathToTool, string commandLineCommands, string responseFileSwitch)
string pathToTool,
string commandLineCommands,
string responseFileSwitch)
{ {
var psi = base.GetProcessStartInfo( var psi = base.GetProcessStartInfo(pathToTool, commandLineCommands, responseFileSwitch);
pathToTool,
commandLineCommands,
responseFileSwitch);
foreach (var environmentVariableName in new EnvironmentFilter().GetEnvironmentVariableNamesToRemove()) foreach (var environmentVariableName in new EnvironmentFilter().GetEnvironmentVariableNamesToRemove())
{ {
psi.Environment.Remove(environmentVariableName); psi.Environment.Remove(environmentVariableName);
@ -39,35 +31,24 @@ namespace Microsoft.DotNet.Cli.Build
public string WorkingDirectory { get; set; } public string WorkingDirectory { get; set; }
protected override string ToolName protected override string ToolName => $"dotnet{(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : string.Empty)}";
{
get { return $"dotnet{Constants.ExeSuffix}"; }
}
protected override MessageImportance StandardOutputLoggingImportance protected override MessageImportance StandardOutputLoggingImportance => MessageImportance.High;
{
get { return MessageImportance.High; } // or else the output doesn't get logged by default
}
protected override string GenerateFullPathToTool() protected override string GenerateFullPathToTool()
{ {
string path = ToolPath; // if ToolPath was not provided by the MSBuild script
if (string.IsNullOrEmpty(ToolPath))
// if ToolPath was not provided by the MSBuild script
if (string.IsNullOrEmpty(path))
{ {
Log.LogError($"Could not find the Path to {ToolName}"); Log.LogError($"Could not find the Path to {ToolName}");
return string.Empty; return string.Empty;
} }
return path; return ToolPath;
} }
protected override string GetWorkingDirectory() protected override string GetWorkingDirectory() => WorkingDirectory ?? base.GetWorkingDirectory();
{
return WorkingDirectory ?? base.GetWorkingDirectory();
}
protected override string GenerateCommandLineCommands() protected override string GenerateCommandLineCommands()
{ {
@ -78,9 +59,6 @@ namespace Microsoft.DotNet.Cli.Build
return commandLineCommands; return commandLineCommands;
} }
protected override void LogToolCommand(string message) protected override void LogToolCommand(string message) => base.LogToolCommand($"{GetWorkingDirectory()}> {message}");
{
base.LogToolCommand($"{GetWorkingDirectory()}> {message}");
}
} }
} }

View file

@ -9,15 +9,15 @@ namespace Microsoft.DotNet.Cli.Build
{ {
public class EnvironmentFilter public class EnvironmentFilter
{ {
private const string _MSBuildEnvironmentVariablePrefix = "MSBuild"; private const string MSBuildEnvironmentVariablePrefix = "MSBuild";
private const string _DotNetEnvironmentVariablePrefix = "DOTNET"; private const string DotNetEnvironmentVariablePrefix = "DOTNET";
private const string _NugetEnvironmentVariablePrefix = "NUGET"; private const string NugetEnvironmentVariablePrefix = "NUGET";
private IEnumerable<string> _prefixesOfEnvironmentVariablesToRemove = new string [] private IEnumerable<string> _prefixesOfEnvironmentVariablesToRemove = new string []
{ {
_MSBuildEnvironmentVariablePrefix, MSBuildEnvironmentVariablePrefix,
_DotNetEnvironmentVariablePrefix, DotNetEnvironmentVariablePrefix,
_NugetEnvironmentVariablePrefix NugetEnvironmentVariablePrefix
}; };
private IEnumerable<string> _environmentVariablesToRemove = new string [] private IEnumerable<string> _environmentVariablesToRemove = new string []
@ -36,7 +36,7 @@ namespace Microsoft.DotNet.Cli.Build
public IEnumerable<string> GetEnvironmentVariableNamesToRemove() public IEnumerable<string> GetEnvironmentVariableNamesToRemove()
{ {
var allEnvironmentVariableNames = (IEnumerable<string>)Environment var allEnvironmentVariableNames = Environment
.GetEnvironmentVariables() .GetEnvironmentVariables()
.Keys .Keys
.Cast<string>(); .Cast<string>();

View file

@ -47,13 +47,10 @@ namespace Microsoft.DotNet.Build.Tasks
var retVal = true; var retVal = true;
if (Directory.Exists(DestinationDirectory)) if (Directory.Exists(DestinationDirectory) && CleanDestination == true)
{ {
if (CleanDestination == true) Log.LogMessage(MessageImportance.Low, "'{0}' already exists, trying to delete before unzipping...", DestinationDirectory);
{ Directory.Delete(DestinationDirectory, recursive: true);
Log.LogMessage(MessageImportance.Low, "'{0}' already exists, trying to delete before unzipping...", DestinationDirectory);
Directory.Delete(DestinationDirectory, recursive: true);
}
} }
if (!File.Exists(SourceArchive)) if (!File.Exists(SourceArchive))
@ -178,35 +175,14 @@ namespace Microsoft.DotNet.Build.Tasks
return retVal; return retVal;
} }
private bool ShouldExtractItem(string path) private bool ShouldExtractItem(string path) => DirectoriesToCopy?.Any(p => path.StartsWith(p.ItemSpec)) ?? false;
{
if (DirectoriesToCopy != null)
{
return DirectoriesToCopy.Any(p => path.StartsWith(p.ItemSpec));
} protected override string ToolName => "tar";
return false; protected override MessageImportance StandardOutputLoggingImportance => MessageImportance.High;
}
protected override string ToolName protected override string GenerateFullPathToTool() => "tar";
{
get { return "tar"; }
}
protected override MessageImportance StandardOutputLoggingImportance protected override string GenerateCommandLineCommands() => $"xf {SourceArchive} -C {DestinationDirectory}";
{
get { return MessageImportance.High; } // or else the output doesn't get logged by default
}
protected override string GenerateFullPathToTool()
{
return "tar";
}
protected override string GenerateCommandLineCommands()
{
return $"xf {SourceArchive} -C {DestinationDirectory}";
}
} }
} }

View file

@ -19,21 +19,14 @@ namespace Microsoft.DotNet.Cli.Build
{ {
if (NuGetVersion.TryParse(RuntimePackVersion, out var version)) if (NuGetVersion.TryParse(RuntimePackVersion, out var version))
{ {
if (version.IsPrerelease && version.Patch == 0) DefaultRuntimeFrameworkVersion = version.IsPrerelease && version.Patch == 0 ?
{ RuntimePackVersion :
DefaultRuntimeFrameworkVersion = RuntimePackVersion; new NuGetVersion(version.Major, version.Minor, 0).ToFullString();
}
else
{
DefaultRuntimeFrameworkVersion = new NuGetVersion(version.Major, version.Minor, 0).ToFullString();
}
return true; return true;
} }
else
{ return false;
return false;
}
} }
} }
} }

View file

@ -3,8 +3,6 @@
using System; using System;
using System.Security.Cryptography; using System.Security.Cryptography;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
namespace Microsoft.DotNet.Cli.Build namespace Microsoft.DotNet.Cli.Build
{ {

View file

@ -1,11 +1,7 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved. // Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information. // Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq;
using System.Text;
using Microsoft.Build.Framework; using Microsoft.Build.Framework;
using Microsoft.Build.Utilities; using Microsoft.Build.Utilities;
using NuGet.RuntimeModel; using NuGet.RuntimeModel;

View file

@ -2,7 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information. // Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System; using System;
using System.IO;
using System.Linq; using System.Linq;
using System.Xml.Linq; using System.Xml.Linq;
using Microsoft.Build.Framework; using Microsoft.Build.Framework;
@ -49,6 +48,7 @@ namespace Microsoft.DotNet.Cli.Build
{ {
Log.LogWarning($"GetComponentCommit failed for VersionDetailsXmlFile={VersionDetailsXmlFile}, DependencyName={DependencyName}: {ex}"); Log.LogWarning($"GetComponentCommit failed for VersionDetailsXmlFile={VersionDetailsXmlFile}, DependencyName={DependencyName}: {ex}");
} }
return true; return true;
} }
} }

View file

@ -1,14 +1,8 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved. // Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information. // Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using Microsoft.Build.Framework; using Microsoft.Build.Framework;
using Microsoft.Build.Utilities; using Microsoft.Build.Utilities;
using Newtonsoft.Json.Linq;
namespace Microsoft.DotNet.Cli.Build namespace Microsoft.DotNet.Cli.Build
{ {

View file

@ -1,11 +1,8 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved. // Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information. // Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text;
using Microsoft.Build.Framework; using Microsoft.Build.Framework;
using Microsoft.Build.Utilities; using Microsoft.Build.Utilities;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
@ -27,6 +24,7 @@ namespace Microsoft.DotNet.Cli.Build
var runtimeJsonRoot = JObject.Parse(runtimeJsonContents); var runtimeJsonRoot = JObject.Parse(runtimeJsonContents);
string [] runtimeIdentifiers = ((JObject)runtimeJsonRoot["runtimes"]).Properties().Select(p => p.Name).ToArray(); string [] runtimeIdentifiers = ((JObject)runtimeJsonRoot["runtimes"]).Properties().Select(p => p.Name).ToArray();
AvailableRuntimePackRuntimeIdentifiers = runtimeIdentifiers.Select(rid => new TaskItem(rid)).ToArray(); AvailableRuntimePackRuntimeIdentifiers = runtimeIdentifiers.Select(rid => new TaskItem(rid)).ToArray();
return true; return true;
} }
} }

View file

@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license. // The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System;
using System.IO; using System.IO;
using Microsoft.Build.Framework; using Microsoft.Build.Framework;
using Microsoft.Build.Utilities; using Microsoft.Build.Utilities;
@ -88,39 +87,22 @@ namespace Microsoft.DotNet.Build.Tasks
return retVal; return retVal;
} }
public override bool Execute() public override bool Execute() => base.Execute();
{
return base.Execute();
}
protected override string ToolName protected override string ToolName => "tar";
{
get { return "tar"; }
}
protected override MessageImportance StandardOutputLoggingImportance protected override MessageImportance StandardOutputLoggingImportance => MessageImportance.High;
{
get { return MessageImportance.High; } // or else the output doesn't get logged by default
}
protected override string GenerateFullPathToTool() protected override string GenerateFullPathToTool() => "tar";
{
return "tar";
}
protected override string GenerateCommandLineCommands() protected override string GenerateCommandLineCommands() => $"{GetDestinationArchive()} {GetSourceSpecification()}";
{
return $"{GetDestinationArchive()} {GetSourceSpecification()}";
}
private string GetSourceSpecification() private string GetSourceSpecification()
{ {
if (IncludeBaseDirectory) if (IncludeBaseDirectory)
{ {
var parentDirectory = Directory.GetParent(SourceDirectory).Parent.FullName; var parentDirectory = Directory.GetParent(SourceDirectory).Parent.FullName;
var sourceDirectoryName = Path.GetFileName(Path.GetDirectoryName(SourceDirectory)); var sourceDirectoryName = Path.GetFileName(Path.GetDirectoryName(SourceDirectory));
return $"--directory {parentDirectory} {sourceDirectoryName} {GetExcludes()}"; return $"--directory {parentDirectory} {sourceDirectoryName} {GetExcludes()}";
} }
else else
@ -129,14 +111,11 @@ namespace Microsoft.DotNet.Build.Tasks
} }
} }
private string GetDestinationArchive() private string GetDestinationArchive() => $"-czf {DestinationArchive}";
{
return $"-czf {DestinationArchive}";
}
private string GetExcludes() private string GetExcludes()
{ {
var excludes = String.Empty; var excludes = string.Empty;
if (ExcludePatterns != null) if (ExcludePatterns != null)
{ {
@ -148,10 +127,7 @@ namespace Microsoft.DotNet.Build.Tasks
return excludes; return excludes;
} }
protected override void LogToolCommand(string message) protected override void LogToolCommand(string message) => base.LogToolCommand($"{GetWorkingDirectory()}> {message}");
{
base.LogToolCommand($"{base.GetWorkingDirectory()}> {message}");
}
} }
} }

View file

@ -1,10 +1,7 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved. // Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information. // Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq;
using Microsoft.Build.Framework; using Microsoft.Build.Framework;
using Microsoft.Build.Utilities; using Microsoft.Build.Utilities;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;

View file

@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.20) cmake_minimum_required(VERSION 3.20)
# Create project named finalizer, this will # Create project named finalizer, this will generate Finalizer.vcxproj
# will generate Finalizer.vcxproj
project(Finalizer) project(Finalizer)
set(CMAKE_MACOSX_RPATH 1) set(CMAKE_MACOSX_RPATH 1)
@ -10,12 +9,13 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib") set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /ENTRY:wmainCRTStartup") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /ENTRY:wmainCRTStartup")
# The WiX SDK is extracted from a NuGet package using an SDK .csproj (finalizer_shim) # The WiX SDK is extracted from a NuGet package using an SDK .csproj (finalizer-build) that copies the "lib" and "inc" folders to a stable location.
# that copies the "lib" and "inc" folders to a stable location. # The defines below (values in ${}) are set in the finalizer.nativeproj.
# See: https://github.com/dotnet/arcade/tree/main/src/Microsoft.DotNet.CMake.Sdk#common-items
include_directories(../../artifacts/WixSdk/inc) # Note: The directory paths use forward slashes because backslashes are escape characters.
include_directories(../../artifacts/obj) include_directories(${ArtifactsDir}WixSdk/inc)
link_directories(../../artifacts/WixSdk/lib/${Platform}) include_directories(${ArtifactsDir}obj)
link_directories(${ArtifactsDir}WixSdk/lib/${Platform})
add_compile_options(/MT) add_compile_options(/MT)
@ -48,9 +48,7 @@ add_executable(Finalizer
native.rc native.rc
) )
# These are normally part of a .vcxproj in Visual Studio, but # These are normally part of a .vcxproj in Visual Studio, but appears to be missing when CMAKE generates a .vcxproj for arm64.
# appears to be missing when CMAKE generates a .vcxproj
# for arm64.
target_link_libraries(Finalizer shell32.lib) target_link_libraries(Finalizer shell32.lib)
target_link_libraries(Finalizer advapi32.lib) target_link_libraries(Finalizer advapi32.lib)
target_link_libraries(Finalizer version.lib) target_link_libraries(Finalizer version.lib)

View file

@ -0,0 +1,9 @@
<Project>
<PropertyGroup>
<SetPlatformFromArchitecture>true</SetPlatformFromArchitecture>
</PropertyGroup>
<Import Project="..\..\Directory.Build.props" />
</Project>

View file

@ -1,14 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.Build.NoTargets">
<!--
This is a shim project to restore the WiX library and copy out the *.lib and *.h files so
we can build the finalizer.
-->
<PropertyGroup> <PropertyGroup>
<Platform Condition="'$(Platform)' == 'AnyCPU' Or '$(Platform)' == ''">$(Architecture)</Platform>
<TargetFramework>$(CoreSdkTargetFramework)</TargetFramework> <TargetFramework>$(CoreSdkTargetFramework)</TargetFramework>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<CopyBuildOutputToPublishDirectory>false</CopyBuildOutputToPublishDirectory> <CopyBuildOutputToPublishDirectory>false</CopyBuildOutputToPublishDirectory>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly> <ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<NativeVersionFile>$(ArtifactsObjDir)sdk_version.h</NativeVersionFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -17,20 +14,26 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<NativeProjectReference Include="$(RepoRoot)src\finalizer\CMakeLists.txt" CMakeProject="$(RepoRoot)src\finalizer\finalizer.proj" BuildNative="true"/> <!-- See: https://github.com/dotnet/arcade/tree/main/src/Microsoft.DotNet.CMake.Sdk#referencing-native-assets-with-nativeprojectreference -->
<NativeProjectReference Include="CMakeLists.txt" CMakeProject="finalizer.nativeproj" BuildNative="true" />
</ItemGroup> </ItemGroup>
<Target Name="GenerateSdkVersionFile" BeforeTargets="CoreCompile" DependsOnTargets="GenerateNativeVersionFile" />
<!-- This target needs to run before the native project reference is built. --> <!-- This target needs to run before the native project reference is built. -->
<Target Name="CopySdk" AfterTargets="Restore" BeforeTargets="Build"> <Target Name="CopyWixSdk" AfterTargets="Restore" BeforeTargets="Build">
<ItemGroup> <ItemGroup>
<WixLib Include="$(WixSdkPath)vs2017\lib\**\*.*" /> <WixLib Include="$(WixSdkPath)vs2017\lib\**\*.*" />
<WixInclude Include="$(WixSdkPath)inc\**\*.*" /> <WixInclude Include="$(WixSdkPath)inc\**\*.*" />
</ItemGroup> </ItemGroup>
<!-- Copy all the lib files for x86, x64, and arm64 --> <!-- Copy all the lib files for x86, x64, and arm64. -->
<Copy SourceFiles="@(WixLib)" DestinationFiles="@(WixLib->'$(ArtifactsDir)WixSdk\lib\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" /> <Copy SourceFiles="@(WixLib)" DestinationFiles="@(WixLib->'$(ArtifactsDir)WixSdk\lib\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
<Copy SourceFiles="@(WixInclude)" DestinationFolder="$(ArtifactsDir)WixSdk\inc" SkipUnchangedFiles="true" /> <Copy SourceFiles="@(WixInclude)" DestinationFolder="$(ArtifactsDir)WixSdk\inc" SkipUnchangedFiles="true" />
</Target> </Target>
<!-- This imports the CMake SDK and because BuildNative is true, it builds the native project. -->
<!-- See: https://github.com/dotnet/arcade/tree/main/src/Microsoft.DotNet.CMake.Sdk#referencing-native-assets-with-nativeprojectreference -->
<Import Project="ProjectReference.targets" Sdk="Microsoft.DotNet.CMake.Sdk" /> <Import Project="ProjectReference.targets" Sdk="Microsoft.DotNet.CMake.Sdk" />
</Project>
</Project>

View file

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.DotNet.CMake.Sdk">
<PropertyGroup>
<!-- We use forward slashes in the ArtifactsDir path because backslashes in the CMakeLists.txt are escape characters. -->
<ArtifactsDirForCMake>$([System.String]::Copy($(ArtifactsDir)).Replace('\','/'))</ArtifactsDirForCMake>
<CMakeLists>CMakeLists.txt</CMakeLists>
</PropertyGroup>
<!-- This will be passed through -D and referenced by the CMakeLists.txt to correctly resolve the platform specific libs. -->
<ItemGroup>
<CMakeDefines Include="Platform" Value="$(Platform)" />
<CMakeDefines Include="ArtifactsDir" Value="$(ArtifactsDirForCMake)" />
<!-- Include this item below to create a binlog for the native build. -->
<!-- <CMakeNativeToolArguments Include="/bl:$(ArtifactsDirForCMake)native.binlog" /> -->
</ItemGroup>
</Project>

View file

@ -1,14 +0,0 @@
<Project Sdk="Microsoft.DotNet.CMake.Sdk">
<PropertyGroup>
<CMakeLists>CMakeLists.txt</CMakeLists>
</PropertyGroup>
<!--
This will be passed through -D and referenced by the CMakeLists.txt to correctly resolve
the platform specific libs
-->
<ItemGroup>
<CMakeDefines Include="Platform" Value="$(Platform)" />
<!-- <CMakeNativeToolArguments Include="/bl:$(ArtifactsDir)native.binlog" /> -->
</ItemGroup>
</Project>

View file

@ -1,34 +1,34 @@
{ {
"maintainer_name":"Microsoft", "maintainer_name":"Microsoft",
"maintainer_email": "dotnetcore@microsoft.com", "maintainer_email": "dotnetcore@microsoft.com",
"package_name": "dotnet-sdk-%SDK_NUGET_VERSION%", "package_name": "dotnet-sdk-%SDK_NUGET_VERSION%",
"install_root": "/usr/share/dotnet", "install_root": "/usr/share/dotnet",
"short_description": "%CLI_SDK_BRAND_NAME%", "short_description": "%CLI_SDK_BRAND_NAME%",
"long_description": ".NET is a development platform that you can use to build command-line applications, microservices and modern websites. 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 (https://github.com/dotnet/core). We happily accept issues and PRs.", "long_description": ".NET is a development platform that you can use to build command-line applications, microservices and modern websites. 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 (https://github.com/dotnet/core). We happily accept issues and PRs.",
"homepage": "https://github.com/dotnet/core", "homepage": "https://github.com/dotnet/core",
"release":{ "release": {
"package_version":"0.0.0.0", "package_version":"0.0.0.0",
"package_revision":"1", "package_revision":"1",
"urgency" : "low", "urgency" : "low",
"changelog_message" : "Bootstrap loop package" "changelog_message" : "Bootstrap loop package"
}, },
"control": { "control": {
"priority":"standard", "priority":"standard",
"section":"devel", "section":"devel",
"architecture":"any" "architecture":"any"
}, },
"copyright": ".NET Foundation and contributors", "copyright": ".NET Foundation and contributors",
"license": { "license": {
"type": "MIT", "type": "MIT",
"full_text": "The MIT License (MIT)\nCopyright (c) .NET Foundation and Contributors\n\nAll rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE." "full_text": "The MIT License (MIT)\nCopyright (c) .NET Foundation and Contributors\n\nAll rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
}, },
"debian_dependencies":{ "debian_dependencies": {
"%SHARED_FRAMEWORK_DEBIAN_PACKAGE_NAME%": { "package_version": "%SHARED_FRAMEWORK_DEBIAN_PACKAGE_VERSION%" }%SHARED_FRAMEWORK_DEBIAN_PACKAGE_ADDITIONAL_DEPENDENCY%, "%SHARED_FRAMEWORK_DEBIAN_PACKAGE_NAME%": { "package_version": "%SHARED_FRAMEWORK_DEBIAN_PACKAGE_VERSION%" }%SHARED_FRAMEWORK_DEBIAN_PACKAGE_ADDITIONAL_DEPENDENCY%,
"%NETCOREAPP_TARGETING_PACK_DEBIAN_PACKAGE_NAME%": { "package_version": "%NETCOREAPP_TARGETING_PACK_DEBIAN_PACKAGE_VERSION%" }, "%NETCOREAPP_TARGETING_PACK_DEBIAN_PACKAGE_NAME%": { "package_version": "%NETCOREAPP_TARGETING_PACK_DEBIAN_PACKAGE_VERSION%" },
"%NETCORE_APPHOST_PACK_DEBIAN_PACKAGE_NAME%": { "package_version": "%SHARED_FRAMEWORK_DEBIAN_PACKAGE_VERSION%" }, "%NETCORE_APPHOST_PACK_DEBIAN_PACKAGE_NAME%": { "package_version": "%SHARED_FRAMEWORK_DEBIAN_PACKAGE_VERSION%" },

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LCX SchemaVersion="6.0" Name="D:\a\_work\1\s\src\redist\targets\packaging\osx\clisdk\resources\conclusion.html" PsrId="22" FileType="1" SrcCul="en-US" Desc="Commenting file created by LCXAdmin. For more information, please visit http://localizability/longhorn/LcxAdmin.asp" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx"> <LCX SchemaVersion="6.0" Name="D:\a\_work\1\s\src\redist\packaging\osx\resources\conclusion.html" PsrId="22" FileType="1" SrcCul="en-US" Desc="Commenting file created by LCXAdmin. For more information, please visit http://localizability/longhorn/LcxAdmin.asp" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<OwnedComments> <OwnedComments>
<Cmt Name="LcxAdmin" /> <Cmt Name="LcxAdmin" />
</OwnedComments> </OwnedComments>

View file

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LCX SchemaVersion="6.0" Name="D:\a\_work\1\s\src\redist\targets\packaging\osx\clisdk\resources\welcome.html" PsrId="22" FileType="1" SrcCul="en-US" Desc="Commenting file created by LCXAdmin. For more information, please visit http://localizability/longhorn/LcxAdmin.asp" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx"> <LCX SchemaVersion="6.0" Name="D:\a\_work\1\s\src\redist\packaging\osx\resources\welcome.html" PsrId="22" FileType="1" SrcCul="en-US" Desc="Commenting file created by LCXAdmin. For more information, please visit http://localizability/longhorn/LcxAdmin.asp" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<OwnedComments> <OwnedComments>
<Cmt Name="LcxAdmin" /> <Cmt Name="LcxAdmin" />
</OwnedComments> </OwnedComments>

Some files were not shown because too many files have changed in this diff Show more