diff options
author | Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com> | 2022-08-23 20:35:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-23 20:35:28 +0300 |
commit | abc9acdd6d4f0b6a0abda55bb20b50190306bce0 (patch) | |
tree | 51ed6006e15a82dbc27d1447f07d4d186c3222ae | |
parent | ef077d0b58ffddcf54fa73bd85dace6b999b8992 (diff) | |
parent | 0bc5fa888a77e00329061f2cb4e2aa190bd1944d (diff) |
Merge pull request #74350 from dotnet-maestro-bot/merge/release/7.0-rc1-to-release/7.0
[automated] Merge branch 'release/7.0-rc1' => 'release/7.0'
72 files changed, 1456 insertions, 572 deletions
diff --git a/docs/workflow/testing/testing-workloads.md b/docs/workflow/testing/testing-workloads.md index 4bb29e96ec6..481020d3135 100644 --- a/docs/workflow/testing/testing-workloads.md +++ b/docs/workflow/testing/testing-workloads.md @@ -2,7 +2,7 @@ Workloads based on packages in `artifacts` can be installed, and used for testing. -- This is done by installing a specified SDK version (`$(SdkVersionForWorkloadTesting)`) in `artifacts/bin/dotnet-workload`. +- This is done by installing a specified SDK version (`$(SdkVersionForWorkloadTesting)`) in `artifacts/bin/dotnet-net7`. - Then the manifest for the workload in `@(WorkloadIdForTesting)` is installed - Then workload packs are installed - packs, or manifests not generated by `runtime`, are restored from nuget diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index bf5e0bcf436..7cf722a6ef3 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,17 +1,13 @@ <Dependencies> <ProductDependencies> - <Dependency Name="Microsoft.NETCore.Runtime.ICU.Transport" Version="7.0.0-rc.1.22408.1"> + <Dependency Name="Microsoft.NETCore.Runtime.ICU.Transport" Version="7.0.0-rc.1.22419.2"> <Uri>https://github.com/dotnet/icu</Uri> - <Sha>c04d1340510269c5cd07a285abb097f587924d5b</Sha> + <Sha>e269add83f4fe1b4ce3b7fbce0575728239f801b</Sha> </Dependency> <Dependency Name="System.Net.MsQuic.Transport" Version="7.0.0-alpha.1.22406.1"> <Uri>https://github.com/dotnet/msquic</Uri> <Sha>dc012a715ceb9b5d5258f2fda77520586af5a36a</Sha> </Dependency> - <Dependency Name="Microsoft.NET.Workload.Emscripten.Manifest-7.0.100" Version="7.0.0-rc.1.22411.1"> - <Uri>https://github.com/dotnet/emsdk</Uri> - <Sha>216093204c415b6e37dfadfcbcf183881b443636</Sha> - </Dependency> <Dependency Name="System.ServiceModel.Primitives" Version="4.9.0-rc2.21473.1"> <Uri>https://github.com/dotnet/wcf</Uri> <Sha>7f504aabb1988e9a093c1e74d8040bd52feb2f01</Sha> @@ -52,6 +48,14 @@ <Uri>https://github.com/dotnet/command-line-api</Uri> <Sha>5618b2d243ccdeb5c7e50a298b33b13036b4351b</Sha> </Dependency> + <Dependency Name="Microsoft.NET.Workload.Emscripten.net6.Manifest-7.0.100" Version="7.0.0-rc.1.22418.6"> + <Uri>https://github.com/dotnet/emsdk</Uri> + <Sha>eb3232eb90aac35a31134464fc498a5f1ddb239f</Sha> + </Dependency> + <Dependency Name="Microsoft.NET.Workload.Emscripten.net7.Manifest-7.0.100" Version="7.0.0-rc.1.22418.6"> + <Uri>https://github.com/dotnet/emsdk</Uri> + <Sha>eb3232eb90aac35a31134464fc498a5f1ddb239f</Sha> + </Dependency> </ProductDependencies> <ToolsetDependencies> <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="7.0.0-beta.22418.4"> diff --git a/eng/Versions.props b/eng/Versions.props index e9e6ece7b74..1be7d663638 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -7,6 +7,7 @@ <MinorVersion>0</MinorVersion> <PatchVersion>0</PatchVersion> <SdkBandVersion>7.0.100</SdkBandVersion> + <PackageVersionNet6>6.0.8</PackageVersionNet6> <PreReleaseVersionLabel>rc</PreReleaseVersionLabel> <PreReleaseVersionIteration>1</PreReleaseVersionIteration> <!-- Set assembly version to align with major and minor version, @@ -21,6 +22,8 @@ <UsingToolXliff>false</UsingToolXliff> <LastReleasedStableAssemblyVersion>$(AssemblyVersion)</LastReleasedStableAssemblyVersion> <UsingToolMicrosoftNetCompilers>true</UsingToolMicrosoftNetCompilers> + <MicrosoftNETWorkloadEmscriptennet6Manifest70100Version>7.0.0-rc.1.22418.6</MicrosoftNETWorkloadEmscriptennet6Manifest70100Version> + <MicrosoftNETWorkloadEmscriptennet7Manifest70100Version>7.0.0-rc.1.22418.6</MicrosoftNETWorkloadEmscriptennet7Manifest70100Version> </PropertyGroup> <!-- For source generator support we need to target multiple versions of Roslyn in order to be able to run on older versions of Roslyn. @@ -176,7 +179,7 @@ <MicrosoftNETILLinkTasksVersion>7.0.100-1.22412.4</MicrosoftNETILLinkTasksVersion> <MicrosoftNETILLinkAnalyzerPackageVersion>$(MicrosoftNETILLinkTasksVersion)</MicrosoftNETILLinkAnalyzerPackageVersion> <!-- ICU --> - <MicrosoftNETCoreRuntimeICUTransportVersion>7.0.0-rc.1.22408.1</MicrosoftNETCoreRuntimeICUTransportVersion> + <MicrosoftNETCoreRuntimeICUTransportVersion>7.0.0-rc.1.22419.2</MicrosoftNETCoreRuntimeICUTransportVersion> <!-- MsQuic --> <MicrosoftNativeQuicMsQuicVersion>2.1</MicrosoftNativeQuicMsQuicVersion> <SystemNetMsQuicTransportVersion>7.0.0-alpha.1.22406.1</SystemNetMsQuicTransportVersion> @@ -190,8 +193,7 @@ <runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22419.2</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion> <runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22419.2</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion> <!-- emscripten / Node --> - <MicrosoftNETWorkloadEmscriptenManifest70100Version>7.0.0-rc.1.22411.1</MicrosoftNETWorkloadEmscriptenManifest70100Version> - <MicrosoftNETRuntimeEmscriptenVersion>$(MicrosoftNETWorkloadEmscriptenManifest70100Version)</MicrosoftNETRuntimeEmscriptenVersion> + <MicrosoftNETRuntimeEmscriptenVersion>$(MicrosoftNETWorkloadEmscriptennet7Manifest70100Version)</MicrosoftNETRuntimeEmscriptenVersion> <!-- workloads --> <SwixPackageVersion>1.1.87-gba258badda</SwixPackageVersion> <WixPackageVersion>1.0.0-v3.14.0.5722</WixPackageVersion> diff --git a/eng/pipelines/coreclr/perf-wasm-prepare-artifacts-steps.yml b/eng/pipelines/coreclr/perf-wasm-prepare-artifacts-steps.yml index 54c4baf70a3..d9bb50d068a 100644 --- a/eng/pipelines/coreclr/perf-wasm-prepare-artifacts-steps.yml +++ b/eng/pipelines/coreclr/perf-wasm-prepare-artifacts-steps.yml @@ -12,7 +12,7 @@ steps: - script: >- mkdir -p $(Build.SourcesDirectory)/artifacts/staging && - cp -r $(Build.SourcesDirectory)/artifacts/bin/dotnet-workload $(Build.SourcesDirectory)/artifacts/staging && + cp -r $(Build.SourcesDirectory)/artifacts/bin/dotnet-net7 $(Build.SourcesDirectory)/artifacts/staging && cp -r $(Build.SourcesDirectory)/artifacts/bin/microsoft.netcore.app.runtime.browser-wasm $(Build.SourcesDirectory)/artifacts/staging && cp -r $(Build.SourcesDirectory)/artifacts/bin/microsoft.netcore.app.ref $(Build.SourcesDirectory)/artifacts/staging displayName: "Prepare artifacts staging directory" diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml index 60f603de796..9ad28b5f94a 100644 --- a/eng/pipelines/coreclr/templates/perf-job.yml +++ b/eng/pipelines/coreclr/templates/perf-job.yml @@ -184,7 +184,7 @@ jobs: - script: >- mkdir -p $(librariesDownloadDir)/bin/wasm/wasm-data && mkdir -p $(librariesDownloadDir)/bin/wasm/dotnet && - cp -r $(librariesDownloadDir)/BrowserWasm/staging/dotnet-workload/* $(librariesDownloadDir)/bin/wasm/dotnet && + cp -r $(librariesDownloadDir)/BrowserWasm/staging/dotnet-net7/* $(librariesDownloadDir)/bin/wasm/dotnet && cp src/mono/wasm/test-main.js $(librariesDownloadDir)/bin/wasm/wasm-data/test-main.js && find $(librariesDownloadDir)/bin/wasm -type d && find $(librariesDownloadDir)/bin/wasm -type f -exec chmod 664 {} \; diff --git a/eng/pipelines/coreclr/templates/run-scenarios-job.yml b/eng/pipelines/coreclr/templates/run-scenarios-job.yml index f22aa119d0d..8767e90fbe9 100644 --- a/eng/pipelines/coreclr/templates/run-scenarios-job.yml +++ b/eng/pipelines/coreclr/templates/run-scenarios-job.yml @@ -144,7 +144,7 @@ jobs: # copy wasm packs if running on wasm - script: >- mkdir -p $(librariesDownloadDir)/bin/wasm/data && - cp -r $(librariesDownloadDir)/BrowserWasm/staging/dotnet-workload $(librariesDownloadDir)/bin/wasm && + cp -r $(librariesDownloadDir)/BrowserWasm/staging/dotnet-net7 $(librariesDownloadDir)/bin/wasm && cp src/mono/wasm/test-main.js $(librariesDownloadDir)/bin/wasm/data/test-main.js && find $(librariesDownloadDir)/bin/wasm -type f -exec chmod 664 {} \; displayName: "Create wasm directory (Linux)" diff --git a/eng/testing/tests.wasm.targets b/eng/testing/tests.wasm.targets index 02af8e04189..7df09a51810 100644 --- a/eng/testing/tests.wasm.targets +++ b/eng/testing/tests.wasm.targets @@ -27,6 +27,8 @@ <_WasmStrictVersionMatch Condition="'$(ContinuousIntegrationBuild)' == 'true'">true</_WasmStrictVersionMatch> <XUnitUseRandomizedTestOrderer Condition="'$(XUnitUseRandomizedTestOrderer)' == '' and '$(IsTestProject)' == 'true'">true</XUnitUseRandomizedTestOrderer> <_UseWasmSymbolicator Condition="'$(TestTrimming)' != 'true'">true</_UseWasmSymbolicator> + <WasmIgnoreNet6WorkloadInstallErrors Condition="'$(WasmIgnoreNet6WorkloadInstallErrors)' == ''">true</WasmIgnoreNet6WorkloadInstallErrors> + <WasmIgnoreNet6WorkloadInstallErrors Condition="'$(WasmIgnoreNet6WorkloadInstallErrors)' != 'true'">false</WasmIgnoreNet6WorkloadInstallErrors> </PropertyGroup> <PropertyGroup Condition="'$(EnableAggressiveTrimming)' == 'true'"> @@ -138,14 +140,24 @@ </PropertyGroup> <ItemGroup> - <WorkloadIdForTesting Include="wasm-tools" - ManifestName="Microsoft.NET.Workload.Mono.ToolChain" + <WorkloadIdForTesting Include="wasm-tools;wasm-experimental" + ManifestName="Microsoft.NET.Workload.Mono.ToolChain.net7" + Variant="net7" Version="$(PackageVersion)" VersionBand="$(SdkBandVersion)" /> - <WorkloadIdForTesting Include="wasm-experimental" - ManifestName="Microsoft.NET.Workload.Mono.ToolChain" + + <WorkloadIdForTesting Include="wasm-tools-net6" + ManifestName="Microsoft.NET.Workload.Mono.ToolChain.net6" + Variant="net6" Version="$(PackageVersion)" - VersionBand="$(SdkBandVersion)" /> + VersionBand="$(SdkBandVersion)" + IgnoreErrors="$(WasmIgnoreNet6WorkloadInstallErrors)" + /> + + <WorkloadCombinationsToInstall Include="net7" Variants="net7" /> + <WorkloadCombinationsToInstall Include="net6" Variants="net6" /> + <WorkloadCombinationsToInstall Include="net6+7" Variants="net6;net7" /> + <!--<WorkloadCombinationsToInstall Include="none" />--> <WasmExtraFilesToDeploy Condition="'$(_UseWasmSymbolicator)' == 'true'" Include="$(MonoProjectRoot)wasm\data\wasm-symbol-patterns.txt" /> <WasmExtraFilesToDeploy Condition="'$(_UseWasmSymbolicator)' == 'true'" Include="$(ArtifactsBinDir)WasmSymbolicator\$(Configuration)\$(NetCoreAppToolCurrent)\WasmSymbolicator.dll" /> diff --git a/eng/testing/workloads-testing.targets b/eng/testing/workloads-testing.targets index 5da047758f8..0c41fc2bb5c 100644 --- a/eng/testing/workloads-testing.targets +++ b/eng/testing/workloads-testing.targets @@ -3,6 +3,10 @@ <PropertyGroup Condition="'$(TestUsingWorkloads)' == 'true'"> <!-- for non-ci builds, we install the sdk when tests are run --> <InstallWorkloadForTesting Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(ArchiveTests)' == 'true'">true</InstallWorkloadForTesting> + + <_SdkForWorkloadTestingBasePath>$(ArtifactsBinDir)</_SdkForWorkloadTestingBasePath> + <_SdkWithNoWorkloadPath>$([MSBuild]::NormalizeDirectory($(_SdkForWorkloadTestingBasePath), 'dotnet-none'))</_SdkWithNoWorkloadPath> + <_SdkWithNoWorkloadStampPath>$([MSBuild]::NormalizePath($(_SdkWithNoWorkloadPath), '.version-$(SdkVersionForWorkloadTesting).stamp'))</_SdkWithNoWorkloadStampPath> </PropertyGroup> <ItemGroup> @@ -12,43 +16,21 @@ <_DefaultPropsForNuGetBuild Include="ContinuousIntegrationBuild=$(ContinuousIntegrationBuild)" /> </ItemGroup> - <Target Name="ProvisionSdkForWorkloadTesting" - DependsOnTargets="_ProvisionSdkWithNoWorkload" - Condition="!Exists($(SdkWithNoWorkloadStampPath)) or !Exists($(SdkWithWorkloadStampPath))"> - - <Error Text="%24(SdkWithWorkloadForTestingPath) is not set" Condition="'$(SdkWithWorkloadForTestingPath)' == ''" /> + <Target Name="_ProvisionDotNetForWorkloadTesting" Condition="!Exists($(_SdkWithNoWorkloadStampPath))"> + <Error Text="%24(_SdkWithNoWorkloadPath) is not set" Condition="'$(_SdkWithNoWorkloadPath)' == ''" /> - <Message Text="** Installing sdk $(SdkVersionForWorkloadTesting) for workload based tests into $(SdkWithWorkloadForTestingPath)" + <Message Text="** Installing sdk $(SdkVersionForWorkloadTesting) for workload based tests into $(_SdkWithNoWorkloadPath)" Condition="'$(SdkVersionForWorkloadTesting)' != ''" Importance="High" /> - <Message Text="** Installing latest sdk for workload based tests into $(SdkWithWorkloadForTestingPath)" + <Message Text="** Installing latest sdk for workload based tests into $(_SdkWithNoWorkloadPath)" Condition="'$(SdkVersionForWorkloadTesting)' == ''" Importance="High" /> - <RemoveDir Directories="$(SdkWithWorkloadForTestingPath)" /> - <MakeDir Directories="$(SdkWithWorkloadForTestingPath)" /> - <ItemGroup> - <_SourceFiles Include="$(SdkWithNoWorkloadForTestingPath)\**" /> + <_SdkWithNoWorkloadTarget Include="none" InstallPath="$(_SdkWithNoWorkloadPath)" /> </ItemGroup> - - <Copy SourceFiles="@(_SourceFiles)" DestinationFolder="$(SdkWithWorkloadForTestingPath)\%(_SourceFiles.RecursiveDir)" /> - - <WriteLinesToFile File="$(SdkWithWorkloadStampPath)" Lines="" Overwrite="true" /> - </Target> - - <Target Name="_ProvisionSdkWithNoWorkload" Condition="!Exists($(SdkWithNoWorkloadStampPath))"> - <Error Text="%24(SdkWithNoWorkloadForTestingPath) is not set" Condition="'$(SdkWithNoWorkloadForTestingPath)' == ''" /> - - <Message Text="** Installing sdk $(SdkVersionForWorkloadTesting) for workload based tests into $(SdkWithNoWorkloadForTestingPath)" - Condition="'$(SdkVersionForWorkloadTesting)' != ''" - Importance="High" /> - <Message Text="** Installing latest sdk for workload based tests into $(SdkWithNoWorkloadForTestingPath)" - Condition="'$(SdkVersionForWorkloadTesting)' == ''" - Importance="High" /> - - <RemoveDir Directories="$(SdkWithNoWorkloadForTestingPath)" /> - <MakeDir Directories="$(SdkWithNoWorkloadForTestingPath)" /> + <RemoveDir Directories="$(_SdkWithNoWorkloadPath)" /> + <MakeDir Directories="$(_SdkWithNoWorkloadPath)" /> <PropertyGroup> <_DotNetInstallScriptName Condition="!$([MSBuild]::IsOSPlatform('windows'))">dotnet-install.sh</_DotNetInstallScriptName> @@ -59,16 +41,16 @@ <PropertyGroup Condition="'$(SdkVersionForWorkloadTesting)' != ''"> <_DotNetInstallCommand Condition="!$([MSBuild]::IsOSPlatform('windows'))" - >$(_DotNetInstallScriptPath) -i $(SdkWithNoWorkloadForTestingPath) -v $(SdkVersionForWorkloadTesting)</_DotNetInstallCommand> + >$(_DotNetInstallScriptPath) -i $(_SdkWithNoWorkloadPath) -v $(SdkVersionForWorkloadTesting)</_DotNetInstallCommand> <_DotNetInstallCommand Condition="$([MSBuild]::IsOSPlatform('windows'))" - >$(_DotNetInstallScriptPath) -InstallDir $(SdkWithNoWorkloadForTestingPath) -Version $(SdkVersionForWorkloadTesting)</_DotNetInstallCommand> + >$(_DotNetInstallScriptPath) -InstallDir $(_SdkWithNoWorkloadPath) -Version $(SdkVersionForWorkloadTesting)</_DotNetInstallCommand> </PropertyGroup> <PropertyGroup Condition="'$(SdkVersionForWorkloadTesting)' == ''"> <_DotNetInstallCommand Condition="!$([MSBuild]::IsOSPlatform('windows'))" - >$(_DotNetInstallScriptPath) -i $(SdkWithNoWorkloadForTestingPath) -v latest -q daily --channel 7.0</_DotNetInstallCommand> + >$(_DotNetInstallScriptPath) -i $(_SdkWithNoWorkloadPath) -v latest -q daily --channel 7.0</_DotNetInstallCommand> <_DotNetInstallCommand Condition="$([MSBuild]::IsOSPlatform('windows'))" - >$(_DotNetInstallScriptPath) -InstallDir $(SdkWithNoWorkloadForTestingPath) -Quality daily -Channel 7.0</_DotNetInstallCommand> + >$(_DotNetInstallScriptPath) -InstallDir $(_SdkWithNoWorkloadPath) -Quality daily -Channel 7.0</_DotNetInstallCommand> </PropertyGroup> <DownloadFile SourceUrl="https://dot.net/v1/$(_DotNetInstallScriptName)" @@ -82,13 +64,17 @@ <Exec Condition="$([MSBuild]::IsOSPlatform('windows'))" Command='powershell -ExecutionPolicy ByPass -NoProfile -command "& $(_DotNetInstallCommand)"' /> - - <WriteLinesToFile File="$(SdkWithNoWorkloadStampPath)" Lines="" Overwrite="true" /> </Target> <Target Name="GetWorkloadInputs"> <ItemGroup> <AvailableNuGetsInArtifacts Include="$(LibrariesShippingPackagesDir)\*.nupkg" /> + + <!--<_SdkWithWorkloadToInstall Include="none" Version="none" />--> + <_SdkWithWorkloadToInstall Include="@(WorkloadCombinationsToInstall)" /> + <_SdkWithWorkloadToInstall InstallPath="$(_SdkForWorkloadTestingBasePath)\dotnet-%(Identity)" /> + <!--<_SdkWithWorkloadToInstall StampPath="%(InstallPath)\version-%(Version).stamp" Condition="'%(Version)' != ''" />--> + <_SdkWithWorkloadToInstall StampPath="%(InstallPath)\version.stamp" /> </ItemGroup> <Error Text="Cannot find any nupkg files in $(LibrariesShippingPackagesDir), needed for workloads" Condition="@(AvailableNuGetsInArtifacts->Count()) == 0" /> @@ -104,7 +90,7 @@ <Target Name="InstallWorkloadUsingArtifacts" AfterTargets="ArchiveTests" - DependsOnTargets="_GetNuGetsToBuild;_PreparePackagesForWorkloadInstall;ProvisionSdkForWorkloadTesting;GetWorkloadInputs;_InstallWorkload;_UpdateManifestsForSdkWithNoWorkload" + DependsOnTargets="_GetNuGetsToBuild;_PreparePackagesForWorkloadInstall;GetWorkloadInputs;_ProvisionDotNetForWorkloadTesting;_InstallWorkloads" Condition="'$(InstallWorkloadForTesting)' == 'true'" /> <Target Name="_GetNuGetsToBuild" Returns="@(_NuGetsToBuild)" DependsOnTargets="_GetRuntimePackNuGetsToBuild"> @@ -168,7 +154,7 @@ </ItemGroup> <Error Condition="@(_RuntimePackNugetAvailable -> Count()) != 3 and @(_RuntimePackNugetAvailable -> Count()) != 1" - Text="Multiple runtime pack nugets found. Expected to find either one or three in $(LibrariesShippingPackagesDir): @(_RuntimePackNugetAvailable->'%(FileName)%(Extension)')" /> + Text="Expected to find either one or three in $(LibrariesShippingPackagesDir): @(_RuntimePackNugetAvailable->'%(FileName)%(Extension)')" /> <ItemGroup> <_BuildVariants Include="multithread" Condition="'$(_DefaultBuildVariant)' != '.multithread.'" /> @@ -202,42 +188,22 @@ *******************" /> </Target> - <Target Name="_InstallWorkload" + <Target Name="_InstallWorkloads" Inputs="@(AvailableNuGetsInArtifacts)" - Outputs="$(SdkWithWorkload_WorkloadStampPath)"> + Outputs="@(_SdkWithWorkloadToInstall->'%(StampPath)')"> <ItemGroup> <_BuiltNuGets Include="$(LibrariesShippingPackagesDir)\*.nupkg" /> </ItemGroup> - <PropertyGroup> - </PropertyGroup> - - <Error Text="Could not find cross compiler nupkg at $(_AOTCrossNuGetPath). Found packages: @(_BuiltNuGets)" - Condition="!Exists($(_AOTCrossNuGetPath))" /> - <Message Text="Packages found in $(LibrariesShippingPackagesDir): @(_BuiltNuGets)" Importance="Low" /> <InstallWorkloadFromArtifacts WorkloadIds="@(WorkloadIdForTesting)" + InstallTargets="@(_SdkWithWorkloadToInstall)" VersionBand="$(SdkBandVersion)" LocalNuGetsPath="$(LibrariesShippingPackagesDir)" TemplateNuGetConfigPath="$(RepoRoot)NuGet.config" - SdkDir="$(SdkWithWorkloadForTestingPath)" /> - <WriteLinesToFile File="$(SdkWithWorkload_WorkloadStampPath)" Lines="" Overwrite="true" /> - </Target> - - <Target Name="_UpdateManifestsForSdkWithNoWorkload" - Inputs="@(AvailableNuGetsInArtifacts)" - Outputs="$(SdkWithNoWorkload_WorkloadStampPath)"> - - <InstallWorkloadFromArtifacts - WorkloadIds="@(WorkloadIdForTesting)" - VersionBand="$(SdkBandVersion)" - LocalNuGetsPath="$(LibrariesShippingPackagesDir)" - TemplateNuGetConfigPath="$(RepoRoot)NuGet.config" - SdkDir="$(SdkWithNoWorkloadForTestingPath)" - OnlyUpdateManifests="true"/> - - <WriteLinesToFile File="$(SdkWithNoWorkload_WorkloadStampPath)" Lines="" Overwrite="true" /> + SdkWithNoWorkloadInstalledPath="$(_SdkWithNoWorkloadPath)" + /> </Target> </Project> diff --git a/src/coreclr/tools/Common/TypeSystem/Common/MetadataFieldLayoutAlgorithm.cs b/src/coreclr/tools/Common/TypeSystem/Common/MetadataFieldLayoutAlgorithm.cs index 9d291d8c372..5ff6417e52e 100644 --- a/src/coreclr/tools/Common/TypeSystem/Common/MetadataFieldLayoutAlgorithm.cs +++ b/src/coreclr/tools/Common/TypeSystem/Common/MetadataFieldLayoutAlgorithm.cs @@ -580,7 +580,16 @@ namespace Internal.TypeSystem // between base type and the current type. LayoutInt cumulativeInstanceFieldPos = CalculateFieldBaseOffset(type, requiresAlign8, requiresAlignedBase: false); LayoutInt offsetBias = LayoutInt.Zero; - if (!type.IsValueType && cumulativeInstanceFieldPos != LayoutInt.Zero && type.Context.Target.Architecture == TargetArchitecture.X86) + + // The following conditional statement mimics the behavior of MethodTableBuilder::PlaceInstanceFields; + // the fundamental difference between CoreCLR native runtime and Crossgen2 regarding field placement is + // that the native runtime doesn't count the method table pointer at the beginning of reference types as a 'field' + // so that the first field in a class has offset 0 while its 'real' offset from the 'this' pointer is LayoutPointerSize. + // On ARM32, native runtime employs a special logic internally calculating the field offsets relative to the 'this' + // pointer (the Crossgen2 way) to ensure 8-alignment for longs and doubles as required by the ARM32 ISA. Please note + // that for 16-alignment used by Vector128 this logic actually ensures that the fields are 16-misaligned + // (they are 16-aligned after the 4-byte or 8-byte method table pointer). + if (!type.IsValueType && cumulativeInstanceFieldPos != LayoutInt.Zero && type.Context.Target.Architecture != TargetArchitecture.ARM) { offsetBias = type.Context.Target.LayoutPointerSize; cumulativeInstanceFieldPos -= offsetBias; diff --git a/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/CoreTestAssembly/InstanceFieldLayout.cs b/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/CoreTestAssembly/InstanceFieldLayout.cs index 92446b5770e..249090e38ea 100644 --- a/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/CoreTestAssembly/InstanceFieldLayout.cs +++ b/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/CoreTestAssembly/InstanceFieldLayout.cs @@ -224,6 +224,12 @@ namespace Sequential public StructByte fld1; public Auto.UInt128Struct fld2; } + + [StructLayout(LayoutKind.Sequential)] + public class Class16Align + { + Vector128<byte> vector16Align; + } } namespace Auto @@ -441,6 +447,12 @@ namespace Auto { Int128 fld1; } + + [StructLayout(LayoutKind.Sequential)] + public class Class16Align + { + Vector128<byte> vector16Align; + } } namespace IsByRefLike diff --git a/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/InstanceFieldLayoutTests.cs b/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/InstanceFieldLayoutTests.cs index 4b02f805f35..083a4e65af3 100644 --- a/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/InstanceFieldLayoutTests.cs +++ b/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/InstanceFieldLayoutTests.cs @@ -282,6 +282,28 @@ namespace TypeSystemTests } [Fact] + public void TestSequentialTypeLayoutClass16Align() + { + MetadataType classType = _testModule.GetType("Sequential", "Class16Align"); + Assert.Equal(0x18, classType.InstanceByteCount.AsInt); + foreach (var f in classType.GetFields()) + { + if (f.IsStatic) + continue; + + switch (f.Name) + { + case "vector16Align": + Assert.Equal(0x8, f.Offset.AsInt); + break; + default: + Assert.True(false); + break; + } + } + } + + [Fact] public void TestAutoLayoutStruct() { MetadataType structWithIntCharType = _testModule.GetType("Auto", "StructWithIntChar"); @@ -783,6 +805,28 @@ namespace TypeSystemTests } [Fact] + public void TestAutoTypeLayoutClass16Align() + { + MetadataType classType = _testModule.GetType("Auto", "Class16Align"); + Assert.Equal(0x18, classType.InstanceByteCount.AsInt); + foreach (var f in classType.GetFields()) + { + if (f.IsStatic) + continue; + + switch (f.Name) + { + case "vector16Align": + Assert.Equal(0x8, f.Offset.AsInt); + break; + default: + Assert.True(false); + break; + } + } + } + + [Fact] public void TestTypeContainsGCPointers() { MetadataType type = _testModule.GetType("ContainsGCPointers", "NoPointers"); diff --git a/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/UniversalGenericFieldLayoutTests.cs b/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/UniversalGenericFieldLayoutTests.cs index 541361160f2..6b81314b9f9 100644 --- a/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/UniversalGenericFieldLayoutTests.cs +++ b/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/UniversalGenericFieldLayoutTests.cs @@ -372,6 +372,7 @@ namespace TypeSystemTests AssertClassIndeterminateSize(context, genOfUL, expectedIndeterminateByteAlignment); } + /* This test exercises universal shared generic layout that is currently unsupported and known to be buggy. [Fact] public void TestClassLayout() { @@ -511,5 +512,6 @@ namespace TypeSystemTests Assert.Equal(LayoutInt.Indeterminate, genOfUI.GetFields().First().Offset); Assert.Equal(LayoutInt.Indeterminate, genOfUL.GetFields().First().Offset); } + */ } } diff --git a/src/coreclr/vm/peimagelayout.cpp b/src/coreclr/vm/peimagelayout.cpp index 2cf519425da..792a3176eb1 100644 --- a/src/coreclr/vm/peimagelayout.cpp +++ b/src/coreclr/vm/peimagelayout.cpp @@ -85,16 +85,18 @@ PEImageLayout* PEImageLayout::LoadConverted(PEImage* pOwner) // ConvertedImageLayout may be able to handle them, but the fact that we were unable to // load directly implies that MAPMapPEFile could not consume what crossgen produced. // that is suspicious, one or another might have a bug. - _ASSERTE(!pFlat->HasReadyToRunHeader()); + _ASSERTE(!pOwner->IsFile() || !pFlat->HasReadyToRunHeader()); #endif - if (!pFlat->HasReadyToRunHeader() && !pFlat->HasWriteableSections()) + // ignore R2R if the image is not a file. + if ((pFlat->HasReadyToRunHeader() && pOwner->IsFile()) || + pFlat->HasWriteableSections()) { - // we can use flat layout for this - return pFlat.Extract(); + return new ConvertedImageLayout(pFlat); } - return new ConvertedImageLayout(pFlat); + // we can use flat layout for this + return pFlat.Extract(); } PEImageLayout* PEImageLayout::Load(PEImage* pOwner, HRESULT* loadFailure) @@ -448,7 +450,7 @@ ConvertedImageLayout::ConvertedImageLayout(FlatImageLayout* source) IfFailThrow(Init(loadedImage)); - if (IsNativeMachineFormat() && g_fAllowNativeImages) + if (m_pOwner->IsFile() && IsNativeMachineFormat() && g_fAllowNativeImages) { // Do base relocation and exception hookup, if necessary. // otherwise R2R will be disabled for this image. diff --git a/src/libraries/Directory.Build.props b/src/libraries/Directory.Build.props index 2e361335686..2b1c22a5cf4 100644 --- a/src/libraries/Directory.Build.props +++ b/src/libraries/Directory.Build.props @@ -131,13 +131,13 @@ </PropertyGroup> <PropertyGroup Condition="'$(TargetsMobile)' == 'true'"> - <SdkWithNoWorkloadForTestingPath>$(ArtifactsBinDir)sdk-no-workload\</SdkWithNoWorkloadForTestingPath> + <SdkWithNoWorkloadForTestingPath>$(ArtifactsBinDir)dotnet-none\</SdkWithNoWorkloadForTestingPath> <SdkWithNoWorkloadForTestingPath>$([MSBuild]::NormalizeDirectory($(SdkWithNoWorkloadForTestingPath)))</SdkWithNoWorkloadForTestingPath> <SdkWithNoWorkloadStampPath>$(SdkWithNoWorkloadForTestingPath)version-$(SdkVersionForWorkloadTesting).stamp</SdkWithNoWorkloadStampPath> <SdkWithNoWorkload_WorkloadStampPath>$(SdkWithNoWorkloadForTestingPath)workload.stamp</SdkWithNoWorkload_WorkloadStampPath> - <SdkWithWorkloadForTestingPath>$(ArtifactsBinDir)dotnet-workload\</SdkWithWorkloadForTestingPath> + <SdkWithWorkloadForTestingPath>$(ArtifactsBinDir)dotnet-net7\</SdkWithWorkloadForTestingPath> <SdkWithWorkloadForTestingPath>$([MSBuild]::NormalizeDirectory($(SdkWithWorkloadForTestingPath)))</SdkWithWorkloadForTestingPath> <SdkWithWorkloadStampPath>$(SdkWithWorkloadForTestingPath)version-$(SdkVersionForWorkloadTesting).stamp</SdkWithWorkloadStampPath> diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs b/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs index ccca155d4bc..c140c2ccb9e 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs @@ -133,9 +133,6 @@ namespace System.Net.Http int headerCount = request.Headers.Count + request.Content?.Headers.Count ?? 0; List<string> headerNames = new List<string>(headerCount); List<string> headerValues = new List<string>(headerCount); - List<string> optionNames = new List<string>(); - List<object?> optionValues = new List<object?>(); - JSObject abortController = BrowserHttpInterop.CreateAbortController(); CancellationTokenRegistration? abortRegistration = cancellationToken.Register(() => { @@ -147,12 +144,27 @@ namespace System.Net.Http }); try { - optionNames.Add("method"); - optionValues.Add(request.Method.Method); + if (request.RequestUri == null) + { + throw new ArgumentNullException(nameof(request.RequestUri)); + } + + string uri = request.RequestUri.IsAbsoluteUri ? request.RequestUri.AbsoluteUri : request.RequestUri.ToString(); + + bool hasFetchOptions = request.Options.TryGetValue(FetchOptions, out IDictionary<string, object>? fetchOptions); + int optionCount = 1 + (allowAutoRedirect.HasValue ? 1 : 0) + (hasFetchOptions && fetchOptions != null ? fetchOptions.Count : 0); + int optionIndex = 0; + string[] optionNames = new string[optionCount]; + object?[] optionValues = new object?[optionCount]; + + optionNames[optionIndex] = "method"; + optionValues[optionIndex] = request.Method.Method; + optionIndex++; if (allowAutoRedirect.HasValue) { - optionNames.Add("redirect"); - optionValues.Add(allowAutoRedirect.Value ? "follow" : "manual"); + optionNames[optionIndex] = "redirect"; + optionValues[optionIndex] = allowAutoRedirect.Value ? "follow" : "manual"; + optionIndex++; } foreach (KeyValuePair<string, IEnumerable<string>> header in request.Headers) @@ -176,21 +188,16 @@ namespace System.Net.Http } } - if (request.Options.TryGetValue(FetchOptions, out IDictionary<string, object>? fetchOptions)) + if (hasFetchOptions && fetchOptions != null) { foreach (KeyValuePair<string, object> item in fetchOptions) { - optionNames.Add(item.Key); - optionValues.Add(item.Value); + optionNames[optionIndex] = item.Key; + optionValues[optionIndex] = item.Value; + optionIndex++; } } - if (request.RequestUri == null) - { - throw new ArgumentNullException(nameof(request.RequestUri)); - } - - string uri = request.RequestUri.IsAbsoluteUri ? request.RequestUri.AbsoluteUri : request.RequestUri.ToString(); Task<JSObject>? promise; cancellationToken.ThrowIfCancellationRequested(); if (request.Content != null) @@ -201,7 +208,7 @@ namespace System.Net.Http .ConfigureAwait(true); cancellationToken.ThrowIfCancellationRequested(); - promise = BrowserHttpInterop.Fetch(uri, headerNames.ToArray(), headerValues.ToArray(), optionNames.ToArray(), optionValues.ToArray(), abortController, body); + promise = BrowserHttpInterop.Fetch(uri, headerNames.ToArray(), headerValues.ToArray(), optionNames, optionValues, abortController, body); } else { @@ -209,13 +216,14 @@ namespace System.Net.Http .ConfigureAwait(true); cancellationToken.ThrowIfCancellationRequested(); - promise = BrowserHttpInterop.Fetch(uri, headerNames.ToArray(), headerValues.ToArray(), optionNames.ToArray(), optionValues.ToArray(), abortController, buffer); + promise = BrowserHttpInterop.Fetch(uri, headerNames.ToArray(), headerValues.ToArray(), optionNames, optionValues, abortController, buffer); } } else { - promise = BrowserHttpInterop.Fetch(uri, headerNames.ToArray(), headerValues.ToArray(), optionNames.ToArray(), optionValues.ToArray(), abortController); + promise = BrowserHttpInterop.Fetch(uri, headerNames.ToArray(), headerValues.ToArray(), optionNames, optionValues, abortController); } + cancellationToken.ThrowIfCancellationRequested(); ValueTask<JSObject> wrappedTask = BrowserHttpInterop.CancelationHelper(promise, cancellationToken, abortController); JSObject fetchResponse = await wrappedTask.ConfigureAwait(true); diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System.Runtime.InteropServices.JavaScript.csproj b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System.Runtime.InteropServices.JavaScript.csproj index 353071ad0c5..e9c286f47aa 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System.Runtime.InteropServices.JavaScript.csproj +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System.Runtime.InteropServices.JavaScript.csproj @@ -5,6 +5,14 @@ <Nullable>enable</Nullable> </PropertyGroup> + <PropertyGroup> + <FeatureWasmThreads Condition="'$(TargetOS)' == 'browser' and '$(WasmEnableThreads)' == 'true'">true</FeatureWasmThreads> + </PropertyGroup> + + <PropertyGroup> + <DefineConstants Condition="'$(FeatureWasmThreads)' == 'true'" >$(DefineConstants);FEATURE_WASM_THREADS</DefineConstants> + </PropertyGroup> + <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. --> <PropertyGroup> <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier> diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Interop/JavaScriptExports.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Interop/JavaScriptExports.cs index 3a884729fed..5b932edb796 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Interop/JavaScriptExports.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Interop/JavaScriptExports.cs @@ -195,6 +195,8 @@ namespace System.Runtime.InteropServices.JavaScript } } +#if FEATURE_WASM_THREADS + [MethodImpl(MethodImplOptions.NoInlining)] // https://github.com/dotnet/runtime/issues/71425 // the marshaled signature is: // void InstallSynchronizationContext() @@ -210,6 +212,8 @@ namespace System.Runtime.InteropServices.JavaScript } } +#endif + [MethodImpl(MethodImplOptions.NoInlining)] // https://github.com/dotnet/runtime/issues/71425 public static void StopProfile() { diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSSynchronizationContext.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSSynchronizationContext.cs index 9c87e4ec351..47d14676d06 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSSynchronizationContext.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSSynchronizationContext.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#if FEATURE_WASM_THREADS + using System; using System.Threading; using System.Threading.Channels; @@ -141,3 +143,5 @@ namespace System.Runtime.InteropServices.JavaScript { } } } + +#endif diff --git a/src/libraries/sendtohelixhelp.proj b/src/libraries/sendtohelixhelp.proj index 59cd95650c1..0f92fdde638 100644 --- a/src/libraries/sendtohelixhelp.proj +++ b/src/libraries/sendtohelixhelp.proj @@ -60,8 +60,8 @@ <FailOnTestFailure Condition="'$(FailOnTestFailure)' == '' and '$(WaitForWorkItemCompletion)' != ''">$(WaitForWorkItemCompletion)</FailOnTestFailure> - <SdkForWorkloadTestingDirName Condition="'$(SdkForWorkloadTestingDirName)' == '' and '$(NeedsWorkload)' == 'true' and '$(TestUsingWorkloads)' == 'true'">dotnet-workload</SdkForWorkloadTestingDirName> - <SdkForWorkloadTestingDirName Condition="'$(SdkForWorkloadTestingDirName)' == '' and '$(NeedsWorkload)' == 'true' and '$(TestUsingWorkloads)' != 'true'">sdk-no-workload</SdkForWorkloadTestingDirName> + <SdkForWorkloadTestingDirName Condition="'$(SdkForWorkloadTestingDirName)' == '' and '$(NeedsWorkload)' == 'true' and '$(TestUsingWorkloads)' == 'true'">dotnet-net7</SdkForWorkloadTestingDirName> + <SdkForWorkloadTestingDirName Condition="'$(SdkForWorkloadTestingDirName)' == '' and '$(NeedsWorkload)' == 'true' and '$(TestUsingWorkloads)' != 'true'">dotnet-none</SdkForWorkloadTestingDirName> </PropertyGroup> <PropertyGroup Condition="'$(HelixType)' == ''"> diff --git a/src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/Sdk/AutoImport.props b/src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/Sdk/AutoImport.props index 98315064186..93712989d41 100644 --- a/src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/Sdk/AutoImport.props +++ b/src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/Sdk/AutoImport.props @@ -1,5 +1,6 @@ <Project> <PropertyGroup> - <WasmNativeWorkload>true</WasmNativeWorkload> + <WasmNativeWorkload Condition="'$(WasmNativeWorkload)' == ''">net7.0</WasmNativeWorkload> + <WasmNativeWorkload7>true</WasmNativeWorkload7> </PropertyGroup> </Project> diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.targets.in b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.targets.in deleted file mode 100644 index a07122acd7b..00000000000 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.targets.in +++ /dev/null @@ -1,120 +0,0 @@ -<Project TreatAsLocalProperty="UsingBrowserRuntimeWorkload;WasmNativeWorkload"> - <PropertyGroup> - <RuntimePackInWorkloadVersion>${PackageVersion}</RuntimePackInWorkloadVersion> - <BrowserWorkloadDisabled Condition="'$(BrowserWorkloadDisabled)' == '' and - '$(RuntimeIdentifier)' == 'browser-wasm' and - '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and - !$([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '6.0'))">true</BrowserWorkloadDisabled> - </PropertyGroup> - - <PropertyGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm' AND '$(UsingBrowserRuntimeWorkload)' == ''"> - <!-- $(WasmBuildNative)==true is needed to enable workloads, when using native references, without AOT --> - <UsingBrowserRuntimeWorkload Condition="'$(RunAOTCompilation)' == 'true' or '$(WasmBuildNative)' == 'true' or '$(WasmGenerateAppBundle)' == 'true' or '$(UsingMicrosoftNETSdkBlazorWebAssembly)' != 'true'" >true</UsingBrowserRuntimeWorkload> - <UsingBrowserRuntimeWorkload Condition="'$(UsingBrowserRuntimeWorkload)' == ''" >$(WasmNativeWorkload)</UsingBrowserRuntimeWorkload> - </PropertyGroup> - - <PropertyGroup Condition="'$(BrowserWorkloadDisabled)' == 'true'"> - <UsingBrowserRuntimeWorkload>false</UsingBrowserRuntimeWorkload> - <WasmNativeWorkload>false</WasmNativeWorkload> - </PropertyGroup> - - <PropertyGroup Condition="'$(UsingMicrosoftNETSdkBlazorWebAssembly)' == 'true' and '$(UsingBrowserRuntimeWorkload)' == 'true'"> - <WasmGenerateAppBundle>false</WasmGenerateAppBundle> - <UsingBlazorAOTWorkloadManifest>true</UsingBlazorAOTWorkloadManifest> - </PropertyGroup> - - <Import Condition="'$(RunAOTCompilation)' == 'true' and '$(BrowserWorkloadDisabled)' != 'true'" Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoAOTCompiler.Task" /> - - <ImportGroup Condition="'$(TargetPlatformIdentifier)' == 'android'"> - <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk" /> - <Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk" /> - </ImportGroup> - <ImportGroup Condition="'$(TargetPlatformIdentifier)' == 'android' and '$(RunAOTCompilation)' == 'true'"> - <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.android-x86" /> - <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.android-x64" /> - <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.android-arm" /> - <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.android-arm64" /> - </ImportGroup> - - <ImportGroup Condition="'$(TargetPlatformIdentifier)' == 'macOS'"> - <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk" /> - <Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk" /> - </ImportGroup> - - <ImportGroup Condition="'$(TargetPlatformIdentifier)' == 'ios'"> - <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk" /> - <Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk" /> - </ImportGroup> - <ImportGroup Condition="'$(TargetPlatformIdentifier)' == 'ios' and $([MSBuild]::IsOSPlatform('osx'))"> - <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.ios-arm" /> - <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.ios-arm64" /> - <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.iossimulator-arm64" /> - <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.iossimulator-x64" /> - <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.iossimulator-x86" /> - </ImportGroup> - - <ImportGroup Condition="'$(TargetPlatformIdentifier)' == 'maccatalyst'"> - <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk" /> - <Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk" /> - </ImportGroup> - <ImportGroup Condition="'$(TargetPlatformIdentifier)' == 'maccatalyst' and $([MSBuild]::IsOSPlatform('osx'))"> - <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.maccatalyst-arm64" /> - <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.maccatalyst-x64" /> - </ImportGroup> - - <ImportGroup Condition="'$(TargetPlatformIdentifier)' == 'tvos'"> - <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk" /> - <Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk" /> - </ImportGroup> - <ImportGroup Condition="'$(TargetPlatformIdentifier)' == 'tvos' and $([MSBuild]::IsOSPlatform('osx'))"> - <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.tvos-arm64" /> - <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.tvossimulator-arm64" /> - <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.tvossimulator-x64" /> - </ImportGroup> - - <ImportGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(UsingBrowserRuntimeWorkload)' == 'true'"> - <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk" /> - <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.WebAssembly.Sdk" /> - <Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.WebAssembly.Sdk" /> - <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.browser-wasm" /> - <Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk" /> - </ImportGroup> - - <PropertyGroup Condition="'$(TargetPlatformIdentifier)' == 'android' or '$(TargetPlatformIdentifier)' == 'macOS' or '$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'maccatalyst' or '$(TargetPlatformIdentifier)' == 'tvos' or ('$(RuntimeIdentifier)' == 'browser-wasm' and '$(UsingBrowserRuntimeWorkload)' == 'true')"> - <_MonoWorkloadTargetsMobile>true</_MonoWorkloadTargetsMobile> - <_MonoWorkloadRuntimePackPackageVersion>$(RuntimePackInWorkloadVersion)</_MonoWorkloadRuntimePackPackageVersion> - </PropertyGroup> - - <ItemGroup Condition="'$(_MonoWorkloadTargetsMobile)' == 'true'"> - <KnownRuntimePack Update="@(KnownRuntimePack)"> - <LatestRuntimeFrameworkVersion Condition="'%(KnownRuntimePack.TargetFramework)' == '${NetCoreAppCurrent}' and '%(KnownRuntimePack.RuntimePackLabels)' == 'Mono'">**FromWorkload**</LatestRuntimeFrameworkVersion> - <!-- Overrides for wasm threading support --> - <RuntimePackNamePatterns Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(WasmEnableThreading)' == 'true'">Microsoft.NETCore.App.Runtime.Mono.multithread.**RID**</RuntimePackNamePatterns> - <RuntimePackNamePatterns Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(WasmEnablePerfTrace)' == 'true'">Microsoft.NETCore.App.Runtime.Mono.perftrace.**RID**</RuntimePackNamePatterns> - </KnownRuntimePack> - </ItemGroup> - - <!-- we can't condition sdk imports on the item @(NativeFileReference). Instead, explicitly check before the build - and emit a warning --> - <Target Name="_CheckBrowserWorkloadNeededButNotAvailable" - Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(BrowserWorkloadDisabled)' != 'true' and '$(WasmNativeWorkload)' != 'true'" - BeforeTargets="Build"> - - <Warning Condition="@(NativeFileReference->Count()) > 0" - Text="%40(NativeFileReference) is not empty, but the native references won't be linked in, because neither %24(WasmBuildNative), nor %24(RunAOTCompilation) are 'true'. NativeFileReference=@(NativeFileReference)" /> - </Target> - - <Target Name="_ErrorDisabledWorkload" Condition="'$(BrowserWorkloadDisabled)' == 'true'" BeforeTargets="Build"> - <Error Condition="'$(RunAOTCompilation)' == 'true'" - Text="WebAssembly workloads, required for AOT, are only supported for projects targeting net6.0+ . Set %24(RunAOTCompilation)=false to disable it." /> - - <Error Condition="@(NativeFileReference->Count()) > 0" - Text="WebAssembly workloads, required for linking native files (from %40(NativeFileReference)), are only supported for projects targeting net6.0+ ." /> - </Target> - - <Target Name="_ErrorDualWasmThreadProps" - Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(BrowserWorkloadDisabled)' != 'true' and '$(WasmEnableThreading)' == 'true' and '$(WasmEnablePerfTrace)' == 'true'" - BeforeTargets="Build"> - <Error Text="WebAssembly workloads can only support one active threading mode at a time. Either set WasmEnableThreading or WasmEnablePerfTrace to true, but not both." /> - </Target> -</Project> diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest.pkgproj b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest.pkgproj new file mode 100644 index 00000000000..7ce452fe622 --- /dev/null +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest.pkgproj @@ -0,0 +1,55 @@ +<Project DefaultTargets="Build"> + <Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" /> + + <PropertyGroup> + <PackageDescription>Internal toolchain package not meant for direct consumption. Please do not reference directly.</PackageDescription> + </PropertyGroup> + + <Target Name="_PrepareForPack" BeforeTargets="GetPackageFiles" Returns="@(PackageFile)"> + <!-- Override the id to include the sdk band as per the workload installer spec --> + <PropertyGroup> + <Id>Microsoft.NET.Workload.Mono.ToolChain.net6.Manifest-$(SdkBandVersion)</Id> + </PropertyGroup> + + <PropertyGroup> + <WorkloadManifestPath>$(IntermediateOutputPath)WorkloadManifest.json</WorkloadManifestPath> + <WorkloadManifestTargetsPath>$(IntermediateOutputPath)WorkloadManifest.targets</WorkloadManifestTargetsPath> + </PropertyGroup> + + <ItemGroup> + <PackageFile Include="$(WorkloadManifestPath)" TargetPath="data" /> + <PackageFile Include="$(WorkloadManifestTargetsPath)" TargetPath="data" /> + </ItemGroup> + + <ItemGroup> + <File Include="localize/**/*"> + <TargetPath>data/localize</TargetPath> + </File> + </ItemGroup> + </Target> + + <!-- Running this target ensures we have the fully evaluated PackageVersion --> + <Target Name="_WriteManifestValues" AfterTargets="CalculatePackageVersion"> + <PropertyGroup> + <PackagePathVersion>PackageVersion=$(PackageVersion);</PackagePathVersion> + </PropertyGroup> + + <ItemGroup> + <_WorkloadManifestValues Include="WorkloadVersion" Value="$(PackageVersion)" /> + <_WorkloadManifestValues Include="PackageVersionNet6" Value="$(PackageVersionNet6)" /> + <_WorkloadManifestValues Include="EmscriptenVersion" Value="$(MicrosoftNETRuntimeEmscriptenVersion)" /> + </ItemGroup> + + <GenerateFileFromTemplate + TemplateFile="WorkloadManifest.json.in" + Properties="@(_WorkloadManifestValues)" + OutputPath="$(WorkloadManifestPath)" /> + + <GenerateFileFromTemplate + TemplateFile="WorkloadManifest.targets.in" + Properties="@(_WorkloadManifestValues)" + OutputPath="$(WorkloadManifestTargetsPath)" /> + </Target> + + <Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" /> +</Project> diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.json.in b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.json.in new file mode 100644 index 00000000000..b5f29300b4d --- /dev/null +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.json.in @@ -0,0 +1,453 @@ +{ + "version": "${WorkloadVersion}", + "depends-on": { + "Microsoft.NET.Workload.Emscripten.net6": "${EmscriptenVersion}" + }, + "workloads": { + "wasm-tools-net6": { + "description": ".NET WebAssembly build tools for net6.0", + "packs": [ + "Microsoft.NET.Runtime.WebAssembly.Sdk.net6", + "Microsoft.NETCore.App.Runtime.Mono.net6.browser-wasm", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.browser-wasm" + ], + "extends": [ "microsoft-net-runtime-mono-tooling-net6", "microsoft-net-sdk-emscripten-net6" ], + "platforms": [ "win-x64", "linux-x64", "osx-x64", "osx-arm64" ] + }, + "microsoft-net-runtime-android-net6": { + "abstract": true, + "description": "Android Mono Runtime", + "packs": [ + "Microsoft.NETCore.App.Runtime.Mono.net6.android-arm", + "Microsoft.NETCore.App.Runtime.Mono.net6.android-arm64", + "Microsoft.NETCore.App.Runtime.Mono.net6.android-x64", + "Microsoft.NETCore.App.Runtime.Mono.net6.android-x86" + ], + "extends": [ "microsoft-net-runtime-mono-tooling-net6" ], + "platforms": [ "win-x64", "linux-x64", "osx-x64", "osx-arm64" ] + }, + "microsoft-net-runtime-android-aot-net6": { + "abstract": true, + "description": "Android Mono AOT Workload", + "packs": [ + "Microsoft.NETCore.App.Runtime.AOT.Cross.android-x86", + "Microsoft.NETCore.App.Runtime.AOT.Cross.android-x64", + "Microsoft.NETCore.App.Runtime.AOT.Cross.android-arm", + "Microsoft.NETCore.App.Runtime.AOT.Cross.android-arm64" + ], + "extends": [ "microsoft-net-runtime-android-net6" ], + "platforms": [ "win-x64", "linux-x64", "osx-x64", "osx-arm64" ] + }, + "microsoft-net-runtime-ios-net6": { + "abstract": true, + "description": "iOS Mono Runtime and AOT Workload", + "packs": [ + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.ios-arm", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.ios-arm64", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.iossimulator-arm64", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.iossimulator-x64", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.iossimulator-x86" + ], + "extends": [ "runtimes-ios-net6" ], + "platforms": [ "win-x64", "osx-arm64", "osx-x64" ] + }, + "runtimes-ios-net6": { + "abstract": true, + "description": "iOS Mono Runtime Packs", + "packs": [ + "Microsoft.NETCore.App.Runtime.Mono.net6.ios-arm", + "Microsoft.NETCore.App.Runtime.Mono.net6.ios-arm64", + "Microsoft.NETCore.App.Runtime.Mono.net6.iossimulator-arm64", + "Microsoft.NETCore.App.Runtime.Mono.net6.iossimulator-x64", + "Microsoft.NETCore.App.Runtime.Mono.net6.iossimulator-x86" + ], + "extends": [ "microsoft-net-runtime-mono-tooling-net6" ], + "platforms": [ "win-x64", "osx-arm64", "osx-x64" ] + }, + "microsoft-net-runtime-maccatalyst-net6": { + "abstract": true, + "description": "MacCatalyst Mono Runtime and AOT Workload", + "packs": [ + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.maccatalyst-arm64", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.maccatalyst-x64" + ], + "extends": [ "runtimes-maccatalyst-net6" ], + "platforms": [ "win-x64", "osx-arm64", "osx-x64" ] + }, + "runtimes-maccatalyst-net6": { + "abstract": true, + "description": "MacCatalyst Mono Runtime Packs", + "packs": [ + "Microsoft.NETCore.App.Runtime.Mono.net6.maccatalyst-arm64", + "Microsoft.NETCore.App.Runtime.Mono.net6.maccatalyst-x64" + ], + "extends": [ "microsoft-net-runtime-mono-tooling-net6" ], + "platforms": [ "win-x64", "osx-arm64", "osx-x64" ] + }, + "microsoft-net-runtime-macos-net6": { + "abstract": true, + "description": "MacOS CoreCLR and Mono Runtime Workload", + "packs": [ + "Microsoft.NETCore.App.Runtime.Mono.net6.osx-arm64", + "Microsoft.NETCore.App.Runtime.Mono.net6.osx-x64", + "Microsoft.NETCore.App.Runtime.osx-arm64", + "Microsoft.NETCore.App.Runtime.osx-x64" + ], + "extends": [ "microsoft-net-runtime-mono-tooling-net6" ], + "platforms": [ "osx-arm64", "osx-x64" ] + }, + "microsoft-net-runtime-tvos-net6": { + "abstract": true, + "description": "tvOS Mono Runtime and AOT Workload", + "packs": [ + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.tvos-arm64", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.tvossimulator-arm64", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.tvossimulator-x64" + ], + "extends": [ "runtimes-tvos-net6" ], + "platforms": [ "win-x64", "osx-arm64", "osx-x64" ] + }, + "runtimes-tvos-net6": { + "abstract": true, + "description": "tvOS Mono Runtime Packs", + "packs": [ + "Microsoft.NETCore.App.Runtime.Mono.net6.tvos-arm64", + "Microsoft.NETCore.App.Runtime.Mono.net6.tvossimulator-arm64", + "Microsoft.NETCore.App.Runtime.Mono.net6.tvossimulator-x64" + ], + "extends": [ "microsoft-net-runtime-mono-tooling-net6" ], + "platforms": [ "win-x64", "osx-arm64", "osx-x64" ] + }, + "runtimes-windows-net6": { + "description": "Windows Runtime Packs", + "packs": [ + "Microsoft.NETCore.App.Runtime.net6.win-x64", + "Microsoft.NETCore.App.Runtime.net6.win-x86", + "Microsoft.NETCore.App.Runtime.net6.win-arm", + "Microsoft.NETCore.App.Runtime.net6.win-arm64" + ] + }, + "microsoft-net-runtime-mono-tooling-net6": { + "abstract": true, + "description": "Shared native build tooling for Mono runtime", + "packs": [ + "Microsoft.NET.Runtime.MonoAOTCompiler.Task.net6", + "Microsoft.NET.Runtime.MonoTargets.Sdk.net6" + ] + } + }, + "packs": { + "Microsoft.NET.Runtime.MonoAOTCompiler.Task.net6": { + "kind": "Sdk", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NET.Runtime.MonoAOTCompiler.Task" + } + }, + "Microsoft.NET.Runtime.MonoTargets.Sdk.net6": { + "kind": "Sdk", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NET.Runtime.MonoTargets.Sdk" + } + }, + "Microsoft.NET.Runtime.WebAssembly.Sdk.net6": { + "kind": "Sdk", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NET.Runtime.WebAssembly.Sdk" + } + }, + "Microsoft.NETCore.App.Runtime.Mono.net6.android-arm": { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.android-arm" + } + }, + "Microsoft.NETCore.App.Runtime.Mono.net6.android-arm64": { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.android-arm" + } + }, + "Microsoft.NETCore.App.Runtime.Mono.net6.android-x64": { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.android-x64" + } + }, + "Microsoft.NETCore.App.Runtime.Mono.net6.android-x86": { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.android-x86" + } + }, + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-x86": { + "kind": "Sdk", + "version": "${PackageVersionNet6}", + "alias-to": { + "win-x64": "Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-x86", + "linux-x64": "Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-x86", + "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-x86", + "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-x86" + } + }, + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-x64": { + "kind": "Sdk", + "version": "${PackageVersionNet6}", + "alias-to": { + "win-x64": "Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-x64", + "linux-x64": "Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-x64", + "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-x64", + "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-x64" + } + }, + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-arm": { + "kind": "Sdk", + "version": "${PackageVersionNet6}", + "alias-to": { + "win-x64": "Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-arm", + "linux-x64": "Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-arm", + "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-arm", + "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-arm" + } + }, + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-arm64": { + "kind": "Sdk", + "version": "${PackageVersionNet6}", + "alias-to": { + "win-x64": "Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-arm64", + "linux-x64": "Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-arm64", + "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-arm64", + "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-arm64" + } + }, + "Microsoft.NETCore.App.Runtime.Mono.net6.maccatalyst-arm64": { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-arm64" + } + }, + "Microsoft.NETCore.App.Runtime.Mono.net6.maccatalyst-x64": { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-x64" + } + }, + "Microsoft.NETCore.App.Runtime.Mono.net6.osx-arm64": { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" + } + }, + "Microsoft.NETCore.App.Runtime.Mono.net6.osx-x64": { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.osx-x64" + } + }, + "Microsoft.NETCore.App.Runtime.net6.osx-arm64": { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" + } + }, + "Microsoft.NETCore.App.Runtime.net6.osx-x64": { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.osx-x64" + } + }, + "Microsoft.NETCore.App.Runtime.Mono.net6.ios-arm" : { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.ios-arm" + } + }, + "Microsoft.NETCore.App.Runtime.Mono.net6.ios-arm64" : { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.ios-arm64" + } + }, + "Microsoft.NETCore.App.Runtime.Mono.net6.iossimulator-arm64" : { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-arm64" + } + }, + "Microsoft.NETCore.App.Runtime.Mono.net6.iossimulator-x64" : { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-x64" + } + }, + "Microsoft.NETCore.App.Runtime.Mono.net6.iossimulator-x86" : { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-x86" + } + }, + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.tvos-arm64": { + "kind": "Sdk", + "version": "${PackageVersionNet6}", + "alias-to": { + "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.tvos-arm64", + "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.tvos-arm64" + } + }, + "Microsoft.NETCore.App.Runtime.Mono.net6.tvos-arm64" : { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.tvos-arm64" + } + }, + "Microsoft.NETCore.App.Runtime.Mono.net6.tvossimulator-arm64" : { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-arm64" + } + }, + "Microsoft.NETCore.App.Runtime.Mono.net6.tvossimulator-x64" : { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-x64" + } + }, + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.maccatalyst-arm64": { + "kind": "Sdk", + "version": "${PackageVersionNet6}", + "alias-to": { + "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.maccatalyst-arm64", + "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.maccatalyst-arm64" + } + }, + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.maccatalyst-x64": { + "kind": "Sdk", + "version": "${PackageVersionNet6}", + "alias-to": { + "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.maccatalyst-x64", + "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.maccatalyst-x64" + } + }, + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.tvossimulator-arm64": { + "kind": "Sdk", + "version": "${PackageVersionNet6}", + "alias-to": { + "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.tvossimulator-arm64", + "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.tvossimulator-arm64" + } + }, + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.tvossimulator-x64": { + "kind": "Sdk", + "version": "${PackageVersionNet6}", + "alias-to": { + "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.tvossimulator-x64", + "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.tvossimulator-x64" + } + }, + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.ios-arm": { + "kind": "Sdk", + "version": "${PackageVersionNet6}", + "alias-to": { + "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.ios-arm", + "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.ios-arm" + } + }, + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.ios-arm64": { + "kind": "Sdk", + "version": "${PackageVersionNet6}", + "alias-to": { + "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.ios-arm64", + "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.ios-arm64" + } + }, + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.iossimulator-arm64": { + "kind": "Sdk", + "version": "${PackageVersionNet6}", + "alias-to": { + "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.iossimulator-arm64", + "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.iossimulator-arm64" + } + }, + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.iossimulator-x64": { + "kind": "Sdk", + "version": "${PackageVersionNet6}", + "alias-to": { + "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.iossimulator-x64", + "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.iossimulator-x64" + } + }, + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.iossimulator-x86": { + "kind": "Sdk", + "version": "${PackageVersionNet6}", + "alias-to": { + "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.iossimulator-x86", + "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.iossimulator-x86" + } + }, + "Microsoft.NETCore.App.Runtime.AOT.Cross.net6.browser-wasm": { + "kind": "Sdk", + "version": "${PackageVersionNet6}", + "alias-to": { + "win-x64": "Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm", + "linux-x64": "Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.browser-wasm", + "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm", + "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm" + } + }, + "Microsoft.NETCore.App.Runtime.Mono.net6.browser-wasm" : { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.browser-wasm" + } + }, + "Microsoft.NETCore.App.Runtime.net6.win-x64" : { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.win-x64" + } + }, + "Microsoft.NETCore.App.Runtime.net6.win-x86" : { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.win-x86" + } + }, + "Microsoft.NETCore.App.Runtime.net6.win-arm" : { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.win-arm" + } + }, + "Microsoft.NETCore.App.Runtime.net6.win-arm64" : { + "kind": "framework", + "version": "${PackageVersionNet6}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.win-arm64" + } + } + } +} diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.targets.in b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.targets.in new file mode 100644 index 00000000000..2a6fb0ae431 --- /dev/null +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/WorkloadManifest.targets.in @@ -0,0 +1,136 @@ +<Project TreatAsLocalProperty="WasmNativeWorkload"> + <PropertyGroup> + <_RuntimePackInWorkloadVersion6>${PackageVersionNet6}</_RuntimePackInWorkloadVersion6> + <BrowserWorkloadDisabled Condition="'$(BrowserWorkloadDisabled)' == '' and + '$(RuntimeIdentifier)' == 'browser-wasm' and + '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and + !$([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '6.0'))">true</BrowserWorkloadDisabled> + <TargetsNet6 Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionEquals('$(TargetFrameworkVersion)', '6.0'))">true</TargetsNet6> + </PropertyGroup> + + <!-- + Make sure to set these properties only under TargetsNet* condition, as they are + used outside the workload, but are set by more than one mono.toolchain manifests. + + - UsingBrowserRuntimeWorkload + - UsingBlazorAOTWorkloadManifest + --> + <PropertyGroup Condition="'$(TargetsNet6)' == 'true' and '$(RuntimeIdentifier)' == 'browser-wasm'"> + <WasmNativeWorkload Condition="'$(WasmNativeWorkload)' != 'true'">false</WasmNativeWorkload> + </PropertyGroup> + + <PropertyGroup Condition="'$(TargetsNet6)' == 'true' and '$(RuntimeIdentifier)' == 'browser-wasm' AND '$(UsingBrowserRuntimeWorkload)' == ''"> + <!-- $(WasmBuildNative)==true is needed to enable workloads, when using native references, without AOT --> + <UsingBrowserRuntimeWorkload Condition="'$(RunAOTCompilation)' == 'true' or '$(WasmBuildNative)' == 'true' or '$(UsingMicrosoftNETSdkBlazorWebAssembly)' != 'true'" >true</UsingBrowserRuntimeWorkload> + <UsingBrowserRuntimeWorkload Condition="'$(UsingBrowserRuntimeWorkload)' == ''" >$(WasmNativeWorkload)</UsingBrowserRuntimeWorkload> + </PropertyGroup> + + <PropertyGroup Condition="'$(TargetsNet6)' == 'true' and '$(BrowserWorkloadDisabled)' == 'true'"> + <UsingBrowserRuntimeWorkload>false</UsingBrowserRuntimeWorkload> + <WasmNativeWorkload>false</WasmNativeWorkload> + </PropertyGroup> + + <PropertyGroup Condition="'$(TargetsNet6)' == 'true' and '$(UsingMicrosoftNETSdkBlazorWebAssembly)' == 'true' and '$(UsingBrowserRuntimeWorkload)' == 'true'"> + <WasmGenerateAppBundle>false</WasmGenerateAppBundle> + <UsingBlazorAOTWorkloadManifest>true</UsingBlazorAOTWorkloadManifest> + </PropertyGroup> + + <Import Condition="'$(TargetsNet6)' == 'true' and '$(RunAOTCompilation)' == 'true' and '$(BrowserWorkloadDisabled)' != 'true'" Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoAOTCompiler.Task.net6" /> + + <ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(TargetPlatformIdentifier)' == 'android'"> + <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" /> + <Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" /> + </ImportGroup> + <ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(TargetPlatformIdentifier)' == 'android' and '$(RunAOTCompilation)' == 'true'"> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-x86" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-x64" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-arm" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.android-arm64" /> + </ImportGroup> + + <ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(TargetPlatformIdentifier)' == 'macOS'"> + <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" /> + <Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" /> + </ImportGroup> + <!-- + <ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(TargetPlatformIdentifier)' == 'macOS' and $([MSBuild]::IsOSPlatform('osx'))"> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.osx-arm64" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.osx-x64" /> + </ImportGroup> + --> + + <ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(TargetPlatformIdentifier)' == 'ios'"> + <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" /> + <Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" /> + </ImportGroup> + <ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(TargetPlatformIdentifier)' == 'ios' and $([MSBuild]::IsOSPlatform('osx'))"> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.ios-arm" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.ios-arm64" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.iossimulator-arm64" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.iossimulator-x64" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.iossimulator-x86" /> + </ImportGroup> + + <ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(TargetPlatformIdentifier)' == 'maccatalyst'"> + <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" /> + <Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" /> + </ImportGroup> + <ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(TargetPlatformIdentifier)' == 'maccatalyst' and $([MSBuild]::IsOSPlatform('osx'))"> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.maccatalyst-arm64" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.maccatalyst-x64" /> + </ImportGroup> + + <ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(TargetPlatformIdentifier)' == 'tvos'"> + <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" /> + <Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" /> + </ImportGroup> + <ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(TargetPlatformIdentifier)' == 'tvos' and $([MSBuild]::IsOSPlatform('osx'))"> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.tvos-arm64" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.tvossimulator-arm64" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.tvossimulator-x64" /> + </ImportGroup> + + <ImportGroup Condition="'$(TargetsNet6)' == 'true' and '$(RuntimeIdentifier)' == 'browser-wasm' and '$(UsingBrowserRuntimeWorkload)' == 'true'"> + <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" /> + <Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.WebAssembly.Sdk.net6" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net6.browser-wasm" /> + <Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net6" /> + </ImportGroup> + + <!-- HACK: --> + <ImportGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(UsingBrowserRuntimeWorkload)' == 'true' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionEquals('$(TargetFrameworkVersion)', '6.0'))"> + <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Python.net6" Condition="!$([MSBuild]::IsOsPlatform('Linux'))" /> + <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Node.net6" /> + <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Sdk.net6" /> + </ImportGroup> + + <PropertyGroup Condition="'$(TargetsNet6)' == 'true' and ('$(TargetPlatformIdentifier)' == 'android' or '$(TargetPlatformIdentifier)' == 'macOS' or '$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'maccatalyst' or '$(TargetPlatformIdentifier)' == 'tvos' or ('$(RuntimeIdentifier)' == 'browser-wasm' and '$(UsingBrowserRuntimeWorkload)' == 'true'))"> + <_MonoWorkloadTargetsMobile>true</_MonoWorkloadTargetsMobile> + <_MonoWorkloadRuntimePackPackageVersion>$(_RuntimePackInWorkloadVersion6)</_MonoWorkloadRuntimePackPackageVersion> + </PropertyGroup> + + <ItemGroup Condition="'$(TargetsNet6)' == 'true' and '$(_MonoWorkloadTargetsMobile)' == 'true'"> + <KnownRuntimePack Update="@(KnownRuntimePack)"> + <LatestRuntimeFrameworkVersion Condition="'%(KnownRuntimePack.TargetFramework)' == 'net6.0' and '%(KnownRuntimePack.RuntimePackLabels)' == 'Mono'">$(_MonoWorkloadRuntimePackPackageVersion)</LatestRuntimeFrameworkVersion> + </KnownRuntimePack> + </ItemGroup> + + <!-- we can't condition sdk imports on the item @(NativeFileReference). Instead, explicitly check before the build + and emit a warning --> + <Target Name="_CheckBrowserWorkloadNeededButNotAvailable" + Condition="'$(TargetsNet6)' == 'true' and '$(RuntimeIdentifier)' == 'browser-wasm' and '$(BrowserWorkloadDisabled)' != 'true' and '$(WasmNativeWorkload)' != 'true'" + BeforeTargets="Build"> + + <Warning Condition="@(NativeFileReference->Count()) > 0" + Text="%40(NativeFileReference) is not empty, but the native references won't be linked in, because neither %24(WasmBuildNative), nor %24(RunAOTCompilation) are 'true'. NativeFileReference=@(NativeFileReference)" /> + </Target> + + <!-- not checking TargetsNet7 here since this essentially checks for net5.0 --> + <Target Name="_ErrorDisabledWorkload" Condition="'$(BrowserWorkloadDisabled)' == 'true'" BeforeTargets="Build"> + <Error Condition="'$(RunAOTCompilation)' == 'true'" + Text="WebAssembly workloads, required for AOT, are only supported for projects targeting net6.0+ . Set %24(RunAOTCompilation)=false to disable it." /> + + <Error Condition="@(NativeFileReference->Count()) > 0" + Text="WebAssembly workloads, required for linking native files (from %40(NativeFileReference)), are only supported for projects targeting net6.0+ ." /> + </Target> +</Project> diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.cs.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.cs.json new file mode 100644 index 00000000000..63f42875d04 --- /dev/null +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.cs.json @@ -0,0 +1,3 @@ +{ + "workloads/wasm-tools-net6/description": "Nástroje pro sestavení .NET WebAssembly" +}
\ No newline at end of file diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.de.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.de.json new file mode 100644 index 00000000000..8e47a8ed518 --- /dev/null +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.de.json @@ -0,0 +1,3 @@ +{ + "workloads/wasm-tools-net6/description": ".NET WebAssembly-Buildtools" +}
\ No newline at end of file diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.en.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.en.json new file mode 100644 index 00000000000..2b693d54c3f --- /dev/null +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.en.json @@ -0,0 +1,3 @@ +{ + "workloads/wasm-tools-net6/description": ".NET WebAssembly build tools" +}
\ No newline at end of file diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.es.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.es.json new file mode 100644 index 00000000000..5244945464f --- /dev/null +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.es.json @@ -0,0 +1,3 @@ +{ + "workloads/wasm-tools-net6/description": "Herramientas de compilación de WebAssembly de .NET" +}
\ No newline at end of file diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.fr.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.fr.json new file mode 100644 index 00000000000..7492e913330 --- /dev/null +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.fr.json @@ -0,0 +1,3 @@ +{ + "workloads/wasm-tools-net6/description": "Outils de construction .NET WebAssembly" +}
\ No newline at end of file diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.it.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.it.json new file mode 100644 index 00000000000..fbf5627f4c5 --- /dev/null +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.it.json @@ -0,0 +1,3 @@ +{ + "workloads/wasm-tools-net6/description": "Strumenti di compilazione WebAssembly .NET" +}
\ No newline at end of file diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.ja.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.ja.json new file mode 100644 index 00000000000..e9e8b38a9eb --- /dev/null +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.ja.json @@ -0,0 +1,3 @@ +{ + "workloads/wasm-tools-net6/description": ".NET WebAssembly ビルド ツール" +}
\ No newline at end of file diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.ko.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.ko.json new file mode 100644 index 00000000000..788574ae853 --- /dev/null +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.ko.json @@ -0,0 +1,3 @@ +{ + "workloads/wasm-tools-net6/description": ".NET WebAssembly 빌드 도구" +}
\ No newline at end of file diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.pl.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.pl.json new file mode 100644 index 00000000000..90a04e1e219 --- /dev/null +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.pl.json @@ -0,0 +1,3 @@ +{ + "workloads/wasm-tools-net6/description": "Narzędzia kompilacji zestawu WebAssembly platformy .NET" +}
\ No newline at end of file diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.pt-BR.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.pt-BR.json new file mode 100644 index 00000000000..9869a7e8248 --- /dev/null +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.pt-BR.json @@ -0,0 +1,3 @@ +{ + "workloads/wasm-tools-net6/description": "Ferramentas de build do .NET WebAssembly" +}
\ No newline at end of file diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.ru.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.ru.json new file mode 100644 index 00000000000..dae1bab0be6 --- /dev/null +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.ru.json @@ -0,0 +1,3 @@ +{ + "workloads/wasm-tools-net6/description": "Средства сборки WebAssembly .NET" +}
\ No newline at end of file diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.tr.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.tr.json new file mode 100644 index 00000000000..ec5dbdf0f5e --- /dev/null +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.tr.json @@ -0,0 +1,3 @@ +{ + "workloads/wasm-tools-net6/description": ".NET WebAssembly derleme araçları" +}
\ No newline at end of file diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.zh-Hans.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.zh-Hans.json new file mode 100644 index 00000000000..849ab454aca --- /dev/null +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.zh-Hans.json @@ -0,0 +1,3 @@ +{ + "workloads/wasm-tools-net6/description": ".NET WebAssembly 生成工具" +}
\ No newline at end of file diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.zh-Hant.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.zh-Hant.json new file mode 100644 index 00000000000..da192170661 --- /dev/null +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest/localize/WorkloadManifest.zh-Hant.json @@ -0,0 +1,3 @@ +{ + "workloads/wasm-tools-net6/description": ".NET WebAssembly 組建工具" +}
\ No newline at end of file diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/Microsoft.NET.Workload.Mono.Toolchain.Manifest.pkgproj b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest.pkgproj index 940dd5cd4f3..55d801786d5 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/Microsoft.NET.Workload.Mono.Toolchain.Manifest.pkgproj +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest.pkgproj @@ -8,7 +8,7 @@ <Target Name="_PrepareForPack" BeforeTargets="GetPackageFiles" Returns="@(PackageFile)"> <!-- Override the id to include the sdk band as per the workload installer spec --> <PropertyGroup> - <Id>Microsoft.NET.Workload.Mono.ToolChain.Manifest-$(SdkBandVersion)</Id> + <Id>Microsoft.NET.Workload.Mono.ToolChain.net7.Manifest-$(SdkBandVersion)</Id> </PropertyGroup> <PropertyGroup> diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.json.in b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.json.in index 64d946adca3..5575ebc9f4e 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.json.in +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.json.in @@ -1,21 +1,21 @@ { "version": "${WorkloadVersion}", "depends-on": { - "Microsoft.NET.Workload.Emscripten": "${EmscriptenVersion}" + "Microsoft.NET.Workload.Emscripten.net7": "${EmscriptenVersion}" }, "workloads": { "wasm-tools": { "description": ".NET WebAssembly build tools", "packs": [ - "Microsoft.NET.Runtime.WebAssembly.Sdk", - "Microsoft.NETCore.App.Runtime.Mono.browser-wasm", - "Microsoft.NETCore.App.Runtime.AOT.Cross.browser-wasm" + "Microsoft.NET.Runtime.WebAssembly.Sdk.net7", + "Microsoft.NETCore.App.Runtime.Mono.net7.browser-wasm", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.browser-wasm" ], - "extends": [ "microsoft-net-runtime-mono-tooling", "microsoft-net-sdk-emscripten" ], + "extends": [ "microsoft-net-runtime-mono-tooling", "microsoft-net-sdk-emscripten-net7" ], "platforms": [ "win-x64", "linux-x64", "osx-x64", "osx-arm64" ] }, "wasm-experimental": { - "description": ".NET WebAssembly experimental", + "description": ".NET WebAssembly experimental tooling", "packs": [ "Microsoft.NET.Runtime.WebAssembly.Templates", "Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm", @@ -28,10 +28,10 @@ "abstract": true, "description": "Android Mono Runtime", "packs": [ - "Microsoft.NETCore.App.Runtime.Mono.android-arm", - "Microsoft.NETCore.App.Runtime.Mono.android-arm64", - "Microsoft.NETCore.App.Runtime.Mono.android-x64", - "Microsoft.NETCore.App.Runtime.Mono.android-x86" + "Microsoft.NETCore.App.Runtime.Mono.net7.android-arm", + "Microsoft.NETCore.App.Runtime.Mono.net7.android-arm64", + "Microsoft.NETCore.App.Runtime.Mono.net7.android-x64", + "Microsoft.NETCore.App.Runtime.Mono.net7.android-x86" ], "extends": [ "microsoft-net-runtime-mono-tooling" ], "platforms": [ "win-x64", "linux-x64", "osx-x64", "osx-arm64" ] @@ -40,10 +40,10 @@ "abstract": true, "description": "Android Mono AOT Workload", "packs": [ - "Microsoft.NETCore.App.Runtime.AOT.Cross.android-x86", - "Microsoft.NETCore.App.Runtime.AOT.Cross.android-x64", - "Microsoft.NETCore.App.Runtime.AOT.Cross.android-arm", - "Microsoft.NETCore.App.Runtime.AOT.Cross.android-arm64" + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-x86", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-x64", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-arm", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-arm64" ], "extends": [ "microsoft-net-runtime-android" ], "platforms": [ "win-x64", "linux-x64", "osx-x64", "osx-arm64" ] @@ -52,11 +52,11 @@ "abstract": true, "description": "iOS Mono Runtime and AOT Workload", "packs": [ - "Microsoft.NETCore.App.Runtime.AOT.Cross.ios-arm", - "Microsoft.NETCore.App.Runtime.AOT.Cross.ios-arm64", - "Microsoft.NETCore.App.Runtime.AOT.Cross.iossimulator-arm64", - "Microsoft.NETCore.App.Runtime.AOT.Cross.iossimulator-x64", - "Microsoft.NETCore.App.Runtime.AOT.Cross.iossimulator-x86" + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.ios-arm", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.ios-arm64", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.iossimulator-arm64", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.iossimulator-x64", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.iossimulator-x86" ], "extends": [ "runtimes-ios" ], "platforms": [ "win-x64", "osx-arm64", "osx-x64" ] @@ -65,11 +65,11 @@ "abstract": true, "description": "iOS Mono Runtime Packs", "packs": [ - "Microsoft.NETCore.App.Runtime.Mono.ios-arm", - "Microsoft.NETCore.App.Runtime.Mono.ios-arm64", - "Microsoft.NETCore.App.Runtime.Mono.iossimulator-arm64", - "Microsoft.NETCore.App.Runtime.Mono.iossimulator-x64", - "Microsoft.NETCore.App.Runtime.Mono.iossimulator-x86" + "Microsoft.NETCore.App.Runtime.Mono.net7.ios-arm", + "Microsoft.NETCore.App.Runtime.Mono.net7.ios-arm64", + "Microsoft.NETCore.App.Runtime.Mono.net7.iossimulator-arm64", + "Microsoft.NETCore.App.Runtime.Mono.net7.iossimulator-x64", + "Microsoft.NETCore.App.Runtime.Mono.net7.iossimulator-x86" ], "extends": [ "microsoft-net-runtime-mono-tooling" ], "platforms": [ "win-x64", "osx-arm64", "osx-x64" ] @@ -78,8 +78,8 @@ "abstract": true, "description": "MacCatalyst Mono Runtime and AOT Workload", "packs": [ - "Microsoft.NETCore.App.Runtime.AOT.Cross.maccatalyst-arm64", - "Microsoft.NETCore.App.Runtime.AOT.Cross.maccatalyst-x64" + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.maccatalyst-arm64", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.maccatalyst-x64" ], "extends": [ "runtimes-maccatalyst" ], "platforms": [ "win-x64", "osx-arm64", "osx-x64" ] @@ -88,8 +88,8 @@ "abstract": true, "description": "MacCatalyst Mono Runtime Packs", "packs": [ - "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-arm64", - "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-x64" + "Microsoft.NETCore.App.Runtime.Mono.net7.maccatalyst-arm64", + "Microsoft.NETCore.App.Runtime.Mono.net7.maccatalyst-x64" ], "extends": [ "microsoft-net-runtime-mono-tooling" ], "platforms": [ "win-x64", "osx-arm64", "osx-x64" ] @@ -98,8 +98,8 @@ "abstract": true, "description": "MacOS CoreCLR and Mono Runtime Workload", "packs": [ - "Microsoft.NETCore.App.Runtime.Mono.osx-arm64", - "Microsoft.NETCore.App.Runtime.Mono.osx-x64", + "Microsoft.NETCore.App.Runtime.Mono.net7.osx-arm64", + "Microsoft.NETCore.App.Runtime.Mono.net7.osx-x64", "Microsoft.NETCore.App.Runtime.osx-arm64", "Microsoft.NETCore.App.Runtime.osx-x64" ], @@ -110,9 +110,9 @@ "abstract": true, "description": "tvOS Mono Runtime and AOT Workload", "packs": [ - "Microsoft.NETCore.App.Runtime.AOT.Cross.tvos-arm64", - "Microsoft.NETCore.App.Runtime.AOT.Cross.tvossimulator-arm64", - "Microsoft.NETCore.App.Runtime.AOT.Cross.tvossimulator-x64" + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.tvos-arm64", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.tvossimulator-arm64", + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.tvossimulator-x64" ], "extends": [ "runtimes-tvos" ], "platforms": [ "win-x64", "osx-arm64", "osx-x64" ] @@ -121,9 +121,9 @@ "abstract": true, "description": "tvOS Mono Runtime Packs", "packs": [ - "Microsoft.NETCore.App.Runtime.Mono.tvos-arm64", - "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-arm64", - "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-x64" + "Microsoft.NETCore.App.Runtime.Mono.net7.tvos-arm64", + "Microsoft.NETCore.App.Runtime.Mono.net7.tvossimulator-arm64", + "Microsoft.NETCore.App.Runtime.Mono.net7.tvossimulator-x64" ], "extends": [ "microsoft-net-runtime-mono-tooling" ], "platforms": [ "win-x64", "osx-arm64", "osx-x64" ] @@ -131,55 +131,76 @@ "runtimes-windows": { "description": "Windows Runtime Packs", "packs": [ - "Microsoft.NETCore.App.Runtime.win-x64", - "Microsoft.NETCore.App.Runtime.win-x86", - "Microsoft.NETCore.App.Runtime.win-arm", - "Microsoft.NETCore.App.Runtime.win-arm64" + "Microsoft.NETCore.App.Runtime.net7.win-x64", + "Microsoft.NETCore.App.Runtime.net7.win-x86", + "Microsoft.NETCore.App.Runtime.net7.win-arm", + "Microsoft.NETCore.App.Runtime.net7.win-arm64" ] }, "microsoft-net-runtime-mono-tooling": { "abstract": true, "description": "Shared native build tooling for Mono runtime", "packs": [ - "Microsoft.NET.Runtime.MonoAOTCompiler.Task", - "Microsoft.NET.Runtime.MonoTargets.Sdk", - ], + "Microsoft.NET.Runtime.MonoAOTCompiler.Task.net7", + "Microsoft.NET.Runtime.MonoTargets.Sdk.net7" + ] } }, "packs": { - "Microsoft.NET.Runtime.MonoAOTCompiler.Task": { + "Microsoft.NET.Runtime.MonoAOTCompiler.Task.net7": { "kind": "Sdk", - "version": "${PackageVersion}" + "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NET.Runtime.MonoAOTCompiler.Task" + } }, - "Microsoft.NET.Runtime.MonoTargets.Sdk": { + "Microsoft.NET.Runtime.MonoTargets.Sdk.net7": { "kind": "Sdk", - "version": "${PackageVersion}" + "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NET.Runtime.MonoTargets.Sdk" + } }, - "Microsoft.NET.Runtime.WebAssembly.Sdk": { + "Microsoft.NET.Runtime.WebAssembly.Sdk.net7": { "kind": "Sdk", - "version": "${PackageVersion}" + "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NET.Runtime.WebAssembly.Sdk" + } }, "Microsoft.NET.Runtime.WebAssembly.Templates": { "kind": "template", "version": "${PackageVersion}" }, - "Microsoft.NETCore.App.Runtime.Mono.android-arm": { + "Microsoft.NETCore.App.Runtime.Mono.net7.android-arm": { "kind": "framework", - "version": "${PackageVersion}" + "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.android-arm" + } }, - "Microsoft.NETCore.App.Runtime.Mono.android-arm64": { + "Microsoft.NETCore.App.Runtime.Mono.net7.android-arm64": { "kind": "framework", - "version": "${PackageVersion}" + "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.android-arm64" + } }, - "Microsoft.NETCore.App.Runtime.Mono.android-x64": { + "Microsoft.NETCore.App.Runtime.Mono.net7.android-x64": { "kind": "framework", - "version": "${PackageVersion}" + "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.android-x64" + } }, - "Microsoft.NETCore.App.Runtime.Mono.android-x86": { + "Microsoft.NETCore.App.Runtime.Mono.net7.android-x86": { "kind": "framework", - "version": "${PackageVersion}" + "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.android-x86" + } }, - "Microsoft.NETCore.App.Runtime.AOT.Cross.android-x86": { + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-x86": { "kind": "Sdk", "version": "${PackageVersion}", "alias-to": { @@ -189,7 +210,7 @@ "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-x86" } }, - "Microsoft.NETCore.App.Runtime.AOT.Cross.android-x64": { + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-x64": { "kind": "Sdk", "version": "${PackageVersion}", "alias-to": { @@ -199,7 +220,7 @@ "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-x64" } }, - "Microsoft.NETCore.App.Runtime.AOT.Cross.android-arm": { + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-arm": { "kind": "Sdk", "version": "${PackageVersion}", "alias-to": { @@ -209,7 +230,7 @@ "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-arm" } }, - "Microsoft.NETCore.App.Runtime.AOT.Cross.android-arm64": { + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-arm64": { "kind": "Sdk", "version": "${PackageVersion}", "alias-to": { @@ -219,71 +240,113 @@ "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-arm64" } }, - "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-arm64": { + "Microsoft.NETCore.App.Runtime.Mono.net7.maccatalyst-arm64": { "kind": "framework", "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-arm64" + } }, - "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-x64": { + "Microsoft.NETCore.App.Runtime.Mono.net7.maccatalyst-x64": { "kind": "framework", "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.maccatalyst-x64" + } }, - "Microsoft.NETCore.App.Runtime.Mono.osx-arm64": { + "Microsoft.NETCore.App.Runtime.Mono.net7.osx-arm64": { "kind": "framework", "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" + } }, - "Microsoft.NETCore.App.Runtime.Mono.osx-x64": { + "Microsoft.NETCore.App.Runtime.Mono.net7.osx-x64": { "kind": "framework", "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.osx-x64" + } }, - "Microsoft.NETCore.App.Runtime.osx-arm64": { + "Microsoft.NETCore.App.Runtime.net7.osx-arm64": { "kind": "framework", "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" + } }, - "Microsoft.NETCore.App.Runtime.osx-x64": { + "Microsoft.NETCore.App.Runtime.net7.osx-x64": { "kind": "framework", "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.osx-x64" + } }, - "Microsoft.NETCore.App.Runtime.Mono.ios-arm" : { + "Microsoft.NETCore.App.Runtime.Mono.net7.ios-arm" : { "kind": "framework", - "version": "${PackageVersion}" + "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.ios-arm" + } }, - "Microsoft.NETCore.App.Runtime.Mono.ios-arm64" : { + "Microsoft.NETCore.App.Runtime.Mono.net7.ios-arm64" : { "kind": "framework", - "version": "${PackageVersion}" + "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.ios-arm64" + } }, - "Microsoft.NETCore.App.Runtime.Mono.iossimulator-arm64" : { + "Microsoft.NETCore.App.Runtime.Mono.net7.iossimulator-arm64" : { "kind": "framework", "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-arm64" + } }, - "Microsoft.NETCore.App.Runtime.Mono.iossimulator-x64" : { + "Microsoft.NETCore.App.Runtime.Mono.net7.iossimulator-x64" : { "kind": "framework", "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-x64" + } }, - "Microsoft.NETCore.App.Runtime.Mono.iossimulator-x86" : { + "Microsoft.NETCore.App.Runtime.Mono.net7.iossimulator-x86" : { "kind": "framework", "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.iossimulator-x86" + } }, - "Microsoft.NETCore.App.Runtime.AOT.Cross.tvos-arm64": { + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.tvos-arm64": { "kind": "Sdk", "version": "${PackageVersion}", "alias-to": { "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.tvos-arm64", - "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.tvos-arm64", + "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.tvos-arm64" } }, - "Microsoft.NETCore.App.Runtime.Mono.tvos-arm64" : { + "Microsoft.NETCore.App.Runtime.Mono.net7.tvos-arm64" : { "kind": "framework", - "version": "${PackageVersion}" + "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.tvos-arm64" + } }, - "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-arm64" : { + "Microsoft.NETCore.App.Runtime.Mono.net7.tvossimulator-arm64" : { "kind": "framework", "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-arm64" + } }, - "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-x64" : { + "Microsoft.NETCore.App.Runtime.Mono.net7.tvossimulator-x64" : { "kind": "framework", "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.tvossimulator-x64" + } }, - "Microsoft.NETCore.App.Runtime.AOT.Cross.maccatalyst-arm64": { + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.maccatalyst-arm64": { "kind": "Sdk", "version": "${PackageVersion}", "alias-to": { @@ -291,7 +354,7 @@ "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.maccatalyst-arm64" } }, - "Microsoft.NETCore.App.Runtime.AOT.Cross.maccatalyst-x64": { + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.maccatalyst-x64": { "kind": "Sdk", "version": "${PackageVersion}", "alias-to": { @@ -299,7 +362,7 @@ "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.maccatalyst-x64" } }, - "Microsoft.NETCore.App.Runtime.AOT.Cross.tvossimulator-arm64": { + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.tvossimulator-arm64": { "kind": "Sdk", "version": "${PackageVersion}", "alias-to": { @@ -307,7 +370,7 @@ "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.tvossimulator-arm64" } }, - "Microsoft.NETCore.App.Runtime.AOT.Cross.tvossimulator-x64": { + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.tvossimulator-x64": { "kind": "Sdk", "version": "${PackageVersion}", "alias-to": { @@ -315,23 +378,23 @@ "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.tvossimulator-x64" } }, - "Microsoft.NETCore.App.Runtime.AOT.Cross.ios-arm": { + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.ios-arm": { "kind": "Sdk", "version": "${PackageVersion}", "alias-to": { "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.ios-arm", - "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.ios-arm", + "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.ios-arm" } }, - "Microsoft.NETCore.App.Runtime.AOT.Cross.ios-arm64": { + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.ios-arm64": { "kind": "Sdk", "version": "${PackageVersion}", "alias-to": { "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.ios-arm64", - "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.ios-arm64", + "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.ios-arm64" } }, - "Microsoft.NETCore.App.Runtime.AOT.Cross.iossimulator-arm64": { + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.iossimulator-arm64": { "kind": "Sdk", "version": "${PackageVersion}", "alias-to": { @@ -339,7 +402,7 @@ "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.iossimulator-arm64" } }, - "Microsoft.NETCore.App.Runtime.AOT.Cross.iossimulator-x64": { + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.iossimulator-x64": { "kind": "Sdk", "version": "${PackageVersion}", "alias-to": { @@ -347,7 +410,7 @@ "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.iossimulator-x64" } }, - "Microsoft.NETCore.App.Runtime.AOT.Cross.iossimulator-x86": { + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.iossimulator-x86": { "kind": "Sdk", "version": "${PackageVersion}", "alias-to": { @@ -355,7 +418,7 @@ "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.iossimulator-x86" } }, - "Microsoft.NETCore.App.Runtime.AOT.Cross.browser-wasm": { + "Microsoft.NETCore.App.Runtime.AOT.Cross.net7.browser-wasm": { "kind": "Sdk", "version": "${PackageVersion}", "alias-to": { @@ -365,9 +428,12 @@ "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm" } }, - "Microsoft.NETCore.App.Runtime.Mono.browser-wasm" : { + "Microsoft.NETCore.App.Runtime.Mono.net7.browser-wasm" : { "kind": "framework", - "version": "${PackageVersion}" + "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.Mono.browser-wasm" + } }, "Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm" : { "kind": "framework", @@ -377,21 +443,33 @@ "kind": "framework", "version": "${PackageVersion}" }, - "Microsoft.NETCore.App.Runtime.win-x64" : { + "Microsoft.NETCore.App.Runtime.net7.win-x64" : { "kind": "framework", - "version": "${PackageVersion}" + "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.win-x64" + } }, - "Microsoft.NETCore.App.Runtime.win-x86" : { + "Microsoft.NETCore.App.Runtime.net7.win-x86" : { "kind": "framework", - "version": "${PackageVersion}" + "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.win-x86" + } }, - "Microsoft.NETCore.App.Runtime.win-arm" : { + "Microsoft.NETCore.App.Runtime.net7.win-arm" : { "kind": "framework", - "version": "${PackageVersion}" + "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.win-arm" + } }, - "Microsoft.NETCore.App.Runtime.win-arm64" : { + "Microsoft.NETCore.App.Runtime.net7.win-arm64" : { "kind": "framework", - "version": "${PackageVersion}" + "version": "${PackageVersion}", + "alias-to": { + "any": "Microsoft.NETCore.App.Runtime.win-arm64" + } } } } diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.targets.in b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.targets.in new file mode 100644 index 00000000000..fd8e9cbe658 --- /dev/null +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/WorkloadManifest.targets.in @@ -0,0 +1,142 @@ +<Project> + <PropertyGroup> + <_RuntimePackInWorkloadVersion7>${PackageVersion}</_RuntimePackInWorkloadVersion7> + <_BrowserWorkloadDisabled7>$(BrowserWorkloadDisabled)</_BrowserWorkloadDisabled7> + <_BrowserWorkloadDisabled7 Condition="'$(_BrowserWorkloadDisabled7)' == '' and + '$(RuntimeIdentifier)' == 'browser-wasm' and + '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and + !$([MSBuild]::VersionEquals('$(TargetFrameworkVersion)', '7.0'))">true</_BrowserWorkloadDisabled7> + <TargetsNet7 Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionEquals('$(TargetFrameworkVersion)', '7.0'))">true</TargetsNet7> + </PropertyGroup> + + <!-- + Make sure to set these properties only under TargetsNet* condition, as they are + used outside the workload, but are set by more than one mono.toolchain manifests. + + - UsingBrowserRuntimeWorkload + - UsingBlazorAOTWorkloadManifest + --> + <PropertyGroup Condition="'$(TargetsNet7)' == 'true' and '$(RuntimeIdentifier)' == 'browser-wasm'"> + <WasmNativeWorkload Condition="'$(WasmNativeWorkload7)' == 'true' and '$(WasmNativeWorkload)' != 'false'">true</WasmNativeWorkload> + </PropertyGroup> + + <PropertyGroup Condition="'$(TargetsNet7)' == 'true' and '$(RuntimeIdentifier)' == 'browser-wasm' AND '$(UsingBrowserRuntimeWorkload)' == ''"> + <!-- $(WasmBuildNative)==true is needed to enable workloads, when using native references, without AOT --> + <UsingBrowserRuntimeWorkload Condition="'$(RunAOTCompilation)' == 'true' or '$(WasmBuildNative)' == 'true' or '$(WasmGenerateAppBundle)' == 'true' or '$(UsingMicrosoftNETSdkBlazorWebAssembly)' != 'true'" >true</UsingBrowserRuntimeWorkload> + <UsingBrowserRuntimeWorkload Condition="'$(UsingBrowserRuntimeWorkload)' == ''" >$(WasmNativeWorkload7)</UsingBrowserRuntimeWorkload> + </PropertyGroup> + + <PropertyGroup Condition="'$(TargetsNet7)' == 'true' and '$(_BrowserWorkloadDisabled7)' == 'true'"> + <UsingBrowserRuntimeWorkload>false</UsingBrowserRuntimeWorkload> + <WasmNativeWorkload7>false</WasmNativeWorkload7> + <WasmNativeWorkload>false</WasmNativeWorkload> + </PropertyGroup> + + <PropertyGroup Condition="'$(TargetsNet7)' == 'true' and '$(UsingMicrosoftNETSdkBlazorWebAssembly)' == 'true' and '$(UsingBrowserRuntimeWorkload)' == 'true'"> + <WasmGenerateAppBundle>false</WasmGenerateAppBundle> + <UsingBlazorAOTWorkloadManifest>true</UsingBlazorAOTWorkloadManifest> + </PropertyGroup> + + <Import Condition="'$(TargetsNet7)' == 'true' and '$(RunAOTCompilation)' == 'true' and '$(_BrowserWorkloadDisabled7)' != 'true'" Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoAOTCompiler.Task.net7" /> + + <ImportGroup Condition="'$(TargetsNet7)' == 'true' and '$(TargetPlatformIdentifier)' == 'android'"> + <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" /> + <Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" /> + </ImportGroup> + <ImportGroup Condition="'$(TargetsNet7)' == 'true' and '$(TargetPlatformIdentifier)' == 'android' and '$(RunAOTCompilation)' == 'true'"> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-x86" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-x64" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-arm" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.android-arm64" /> + </ImportGroup> + + <ImportGroup Condition="'$(TargetsNet7)' == 'true' and '$(TargetPlatformIdentifier)' == 'macOS'"> + <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" /> + <Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" /> + </ImportGroup> + + <ImportGroup Condition="'$(TargetsNet7)' == 'true' and '$(TargetPlatformIdentifier)' == 'ios'"> + <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" /> + <Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" /> + </ImportGroup> + <ImportGroup Condition="'$(TargetsNet7)' == 'true' and '$(TargetPlatformIdentifier)' == 'ios' and $([MSBuild]::IsOSPlatform('osx'))"> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.ios-arm" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.ios-arm64" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.iossimulator-arm64" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.iossimulator-x64" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.iossimulator-x86" /> + </ImportGroup> + + <ImportGroup Condition="'$(TargetsNet7)' == 'true' and '$(TargetPlatformIdentifier)' == 'maccatalyst'"> + <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" /> + <Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" /> + </ImportGroup> + <ImportGroup Condition="'$(TargetsNet7)' == 'true' and '$(TargetPlatformIdentifier)' == 'maccatalyst' and $([MSBuild]::IsOSPlatform('osx'))"> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.maccatalyst-arm64" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.maccatalyst-x64" /> + </ImportGroup> + + <ImportGroup Condition="'$(TargetsNet7)' == 'true' and '$(TargetPlatformIdentifier)' == 'tvos'"> + <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" /> + <Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" /> + </ImportGroup> + <ImportGroup Condition="'$(TargetsNet7)' == 'true' and '$(TargetPlatformIdentifier)' == 'tvos' and $([MSBuild]::IsOSPlatform('osx'))"> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.tvos-arm64" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.tvossimulator-arm64" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.tvossimulator-x64" /> + </ImportGroup> + + <ImportGroup Condition="'$(TargetsNet7)' == 'true' and '$(RuntimeIdentifier)' == 'browser-wasm' and '$(UsingBrowserRuntimeWorkload)' == 'true'"> + <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" /> + <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.WebAssembly.Sdk.net7" /> + <Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.WebAssembly.Sdk.net7" /> + <Import Project="Sdk.props" Sdk="Microsoft.NETCore.App.Runtime.AOT.Cross.net7.browser-wasm" /> + <Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk.net7" /> + </ImportGroup> + + <!-- HACK: --> + <ImportGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(UsingBrowserRuntimeWorkload)' == 'true' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionEquals('$(TargetFrameworkVersion)', '7.0'))"> + <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Python.net7" Condition="!$([MSBuild]::IsOsPlatform('Linux'))" /> + <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Node.net7" /> + <Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Sdk.net7" /> + </ImportGroup> + + <PropertyGroup Condition="'$(TargetsNet7)' == 'true' and ('$(TargetPlatformIdentifier)' == 'android' or '$(TargetPlatformIdentifier)' == 'macOS' or '$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'maccatalyst' or '$(TargetPlatformIdentifier)' == 'tvos' or ('$(RuntimeIdentifier)' == 'browser-wasm' and '$(UsingBrowserRuntimeWorkload)' == 'true'))"> + <_MonoWorkloadTargetsMobile>true</_MonoWorkloadTargetsMobile> + <_MonoWorkloadRuntimePackPackageVersion>$(_RuntimePackInWorkloadVersion7)</_MonoWorkloadRuntimePackPackageVersion> + </PropertyGroup> + + <ItemGroup Condition="'$(TargetsNet7)' == 'true' and '$(_MonoWorkloadTargetsMobile)' == 'true'"> + <KnownRuntimePack Update="@(KnownRuntimePack)"> + <LatestRuntimeFrameworkVersion Condition="'%(KnownRuntimePack.TargetFramework)' == 'net7.0' and '%(KnownRuntimePack.RuntimePackLabels)' == 'Mono'">$(_MonoWorkloadRuntimePackPackageVersion)</LatestRuntimeFrameworkVersion> + <!-- Overrides for wasm threading support --> + <RuntimePackNamePatterns Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(WasmEnableThreading)' == 'true'">Microsoft.NETCore.App.Runtime.Mono.multithread.**RID**</RuntimePackNamePatterns> + <RuntimePackNamePatterns Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(WasmEnablePerfTrace)' == 'true'">Microsoft.NETCore.App.Runtime.Mono.perftrace.**RID**</RuntimePackNamePatterns> + </KnownRuntimePack> + </ItemGroup> + + <!-- we can't condition sdk imports on the item @(NativeFileReference). Instead, explicitly check before the build + and emit a warning --> + <Target Name="_CheckBrowserWorkloadNeededButNotAvailable" + Condition="'$(TargetsNet7)' == 'true' and '$(RuntimeIdentifier)' == 'browser-wasm' and '$(_BrowserWorkloadDisabled7)' != 'true' and '$(WasmNativeWorkload7)' != 'true'" + BeforeTargets="Build"> + + <Warning Condition="@(NativeFileReference->Count()) > 0" + Text="%40(NativeFileReference) is not empty, but the native references won't be linked in, because neither %24(WasmBuildNative), nor %24(RunAOTCompilation) are 'true'. NativeFileReference=@(NativeFileReference)" /> + </Target> + + <!-- not checking TargetsNet7 here since this essentially checks for net5.0 --> + <Target Name="_ErrorDisabledWorkload" Condition="'$(BrowserWorkloadDisabled)' == 'true'" BeforeTargets="Build"> + <Error Condition="'$(RunAOTCompilation)' == 'true'" + Text="WebAssembly workloads, required for AOT, are only supported for projects targeting net6.0+ . Set %24(RunAOTCompilation)=false to disable it." /> + + <Error Condition="@(NativeFileReference->Count()) > 0" + Text="WebAssembly workloads, required for linking native files (from %40(NativeFileReference)), are only supported for projects targeting net6.0+ ." /> + </Target> + + <Target Name="_ErrorDualWasmThreadProps" + Condition="'$(TargetsNet7)' == 'true' and '$(RuntimeIdentifier)' == 'browser-wasm' and '$(_BrowserWorkloadDisabled7)' != 'true' and '$(WasmEnableThreading)' == 'true' and '$(WasmEnablePerfTrace)' == 'true'" + BeforeTargets="Build"> + <Error Text="WebAssembly workloads can only support one active threading mode at a time. Either set WasmEnableThreading or WasmEnablePerfTrace to true, but not both." /> + </Target> +</Project> diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.cs.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.cs.json index da1ee8979a0..da1ee8979a0 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.cs.json +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.cs.json diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.de.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.de.json index 3d4467d7b05..3d4467d7b05 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.de.json +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.de.json diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.en.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.en.json index a6dcccedcf5..a6dcccedcf5 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.en.json +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.en.json diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.es.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.es.json index 166e1db9fe8..166e1db9fe8 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.es.json +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.es.json diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.fr.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.fr.json index e660e45a264..e660e45a264 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.fr.json +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.fr.json diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.it.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.it.json index 6703c002560..6703c002560 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.it.json +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.it.json diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.ja.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.ja.json index fd3fe984155..fd3fe984155 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.ja.json +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.ja.json diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.ko.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.ko.json index c5261248ff6..c5261248ff6 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.ko.json +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.ko.json diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.pl.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.pl.json index 858653c73b5..858653c73b5 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.pl.json +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.pl.json diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.pt-BR.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.pt-BR.json index a8dceaf324f..a8dceaf324f 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.pt-BR.json +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.pt-BR.json diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.ru.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.ru.json index 102e67acdc2..102e67acdc2 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.ru.json +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.ru.json diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.tr.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.tr.json index 34d4e3b66de..34d4e3b66de 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.tr.json +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.tr.json diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.zh-Hans.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.zh-Hans.json index 360e1e5a5d1..360e1e5a5d1 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.zh-Hans.json +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.zh-Hans.json diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.zh-Hant.json b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.zh-Hant.json index c5d85ecc0f5..c5d85ecc0f5 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/localize/WorkloadManifest.zh-Hant.json +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest/localize/WorkloadManifest.zh-Hant.json diff --git a/src/mono/nuget/mono-packages.proj b/src/mono/nuget/mono-packages.proj index 1c1c7c0bff9..319028efb91 100644 --- a/src/mono/nuget/mono-packages.proj +++ b/src/mono/nuget/mono-packages.proj @@ -15,7 +15,8 @@ </ItemGroup> <ItemGroup Condition="'$(TargetsMobile)' == 'true'"> - <ProjectReference Include="Microsoft.NET.Workload.Mono.Toolchain.Manifest\Microsoft.NET.Workload.Mono.Toolchain.Manifest.pkgproj" /> + <ProjectReference Include="Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest\Microsoft.NET.Workload.Mono.Toolchain.net6.Manifest.pkgproj" /> + <ProjectReference Include="Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest\Microsoft.NET.Workload.Mono.Toolchain.net7.Manifest.pkgproj" /> <ProjectReference Include="Microsoft.NET.Runtime.MonoAOTCompiler.Task\Microsoft.NET.Runtime.MonoAOTCompiler.Task.pkgproj" /> </ItemGroup> diff --git a/src/mono/wasm/runtime/dotnet.d.ts b/src/mono/wasm/runtime/dotnet.d.ts index 83accc3b01b..b7bfea762f5 100644 --- a/src/mono/wasm/runtime/dotnet.d.ts +++ b/src/mono/wasm/runtime/dotnet.d.ts @@ -269,6 +269,8 @@ declare global { function getDotnetRuntime(runtimeId: number): RuntimeAPI | undefined; } +declare const dotnet: ModuleAPI["dotnet"]; +declare const exit: ModuleAPI["exit"]; /** * Span class is JS wrapper for System.Span<T>. This view doesn't own the memory, nor pin the underlying array. * It's ideal to be used on call from C# with the buffer pinned there or with unmanaged memory. @@ -315,4 +317,4 @@ declare class ManagedObject implements IDisposable { toString(): string; } -export { ArraySegment, AssetBehaviours, AssetEntry, CreateDotnetRuntimeType, DotnetModuleConfig, EmscriptenModule, IMemoryView, LoadingResource, ManagedError, ManagedObject, MemoryViewType, ModuleAPI, MonoConfig, NativePointer, ResourceRequest, RuntimeAPI, Span, createDotnetRuntime as default }; +export { ArraySegment, AssetBehaviours, AssetEntry, CreateDotnetRuntimeType, DotnetModuleConfig, EmscriptenModule, IMemoryView, LoadingResource, ManagedError, ManagedObject, MemoryViewType, ModuleAPI, MonoConfig, NativePointer, ResourceRequest, RuntimeAPI, Span, createDotnetRuntime as default, dotnet, exit }; diff --git a/src/mono/wasm/runtime/export-types.ts b/src/mono/wasm/runtime/export-types.ts index bc368975c17..800b0a617e7 100644 --- a/src/mono/wasm/runtime/export-types.ts +++ b/src/mono/wasm/runtime/export-types.ts @@ -17,6 +17,8 @@ declare global { export default createDotnetRuntime; +declare const dotnet: ModuleAPI["dotnet"]; +declare const exit: ModuleAPI["exit"]; /** * Span class is JS wrapper for System.Span<T>. This view doesn't own the memory, nor pin the underlying array. @@ -71,6 +73,7 @@ export { EmscriptenModule, NativePointer, RuntimeAPI, ModuleAPI, DotnetModuleConfig, CreateDotnetRuntimeType, MonoConfig, AssetEntry, ResourceRequest, LoadingResource, AssetBehaviours, - IMemoryView, MemoryViewType, ManagedObject, ManagedError, Span, ArraySegment + IMemoryView, MemoryViewType, ManagedObject, ManagedError, Span, ArraySegment, + dotnet, exit }; diff --git a/src/mono/wasm/runtime/managed-exports.ts b/src/mono/wasm/runtime/managed-exports.ts index bbd48aa9e30..09f6d9a33d0 100644 --- a/src/mono/wasm/runtime/managed-exports.ts +++ b/src/mono/wasm/runtime/managed-exports.ts @@ -22,8 +22,8 @@ export function init_managed_exports(): void { if (!runtimeHelpers.runtime_interop_exports_class) throw "Can't find " + runtimeHelpers.runtime_interop_namespace + "." + runtimeHelpers.runtime_interop_exports_classname + " class"; - const install_sync_context = get_method("InstallSynchronizationContext"); - mono_assert(install_sync_context, "Can't find InstallSynchronizationContext method"); + const install_sync_context = cwraps.mono_wasm_assembly_find_method(runtimeHelpers.runtime_interop_exports_class, "InstallSynchronizationContext", -1); + // mono_assert(install_sync_context, "Can't find InstallSynchronizationContext method"); const call_entry_point = get_method("CallEntrypoint"); mono_assert(call_entry_point, "Can't find CallEntrypoint method"); const release_js_owned_object_by_gc_handle_method = get_method("ReleaseJSOwnedObjectByGCHandle"); @@ -134,19 +134,22 @@ export function init_managed_exports(): void { anyModule.stackRestore(sp); } }; - runtimeHelpers.javaScriptExports.install_synchronization_context = () => { - const sp = anyModule.stackSave(); - try { - const args = alloc_stack_frame(2); - invoke_method_and_handle_exception(install_sync_context, args); - } finally { - anyModule.stackRestore(sp); - } - }; - if (!ENVIRONMENT_IS_PTHREAD) - // Install our sync context so that async continuations will migrate back to this thread (the main thread) automatically - runtimeHelpers.javaScriptExports.install_synchronization_context(); + if (install_sync_context) { + runtimeHelpers.javaScriptExports.install_synchronization_context = () => { + const sp = anyModule.stackSave(); + try { + const args = alloc_stack_frame(2); + invoke_method_and_handle_exception(install_sync_context, args); + } finally { + anyModule.stackRestore(sp); + } + }; + + if (!ENVIRONMENT_IS_PTHREAD) + // Install our sync context so that async continuations will migrate back to this thread (the main thread) automatically + runtimeHelpers.javaScriptExports.install_synchronization_context(); + } } export function get_method(method_name: string): MonoMethod { diff --git a/src/tasks/AotCompilerTask/MonoAOTCompiler.cs b/src/tasks/AotCompilerTask/MonoAOTCompiler.cs index 291af85bde4..55e93530680 100644 --- a/src/tasks/AotCompilerTask/MonoAOTCompiler.cs +++ b/src/tasks/AotCompilerTask/MonoAOTCompiler.cs @@ -488,15 +488,11 @@ public class MonoAOTCompiler : Microsoft.Build.Utilities.Task { // compare original assembly vs it's outputs.. all it's outputs! string assemblyPath = args.AOTAssembly.GetMetadata("FullPath"); - if (args.ProxyFiles.Any(pf => IsNewerThanOutput(assemblyPath, pf.TargetFile))) + if (args.ProxyFiles.Any(pf => Utils.IsNewerThan(assemblyPath, pf.TargetFile))) return false; } return true; - - static bool IsNewerThanOutput(string inFile, string outFile) - => !File.Exists(inFile) || !File.Exists(outFile) || - (File.GetLastWriteTimeUtc(inFile) > File.GetLastWriteTimeUtc(outFile)); } private IEnumerable<ITaskItem> FilterOutUnmanagedAssemblies(IEnumerable<ITaskItem> assemblies) diff --git a/src/tasks/Common/Utils.cs b/src/tasks/Common/Utils.cs index 2c624214937..8ed6c2c1371 100644 --- a/src/tasks/Common/Utils.cs +++ b/src/tasks/Common/Utils.cs @@ -23,6 +23,10 @@ internal static class Utils return reader.ReadToEnd(); } + public static bool IsNewerThan(string inFile, string outFile) + => !File.Exists(inFile) || !File.Exists(outFile) || + (File.GetLastWriteTimeUtc(inFile) > File.GetLastWriteTimeUtc(outFile)); + public static (int exitCode, string output) RunShellCommand( TaskLoggingHelper logger, string command, @@ -233,6 +237,9 @@ internal static class Utils #if NETCOREAPP public static void DirectoryCopy(string sourceDir, string destDir, Func<string, bool>? predicate=null) { + if (!Directory.Exists(destDir)) + Directory.CreateDirectory(destDir); + string[] files = Directory.GetFiles(sourceDir, "*", SearchOption.AllDirectories); foreach (string file in files) { diff --git a/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs b/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs index 2fd3597425e..1e77d5905f5 100644 --- a/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs +++ b/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs @@ -20,7 +20,10 @@ namespace Microsoft.Workload.Build.Tasks public class InstallWorkloadFromArtifacts : Task { [Required, NotNull] - public ITaskItem[] WorkloadIds { get; set; } = Array.Empty<ITaskItem>(); + public ITaskItem[] WorkloadIds { get; set; } = Array.Empty<ITaskItem>(); + + [Required, NotNull] + public ITaskItem[] InstallTargets { get; set; } = Array.Empty<ITaskItem>(); [Required, NotNull] public string? VersionBand { get; set; } @@ -32,22 +35,71 @@ namespace Microsoft.Workload.Build.Tasks public string? TemplateNuGetConfigPath { get; set; } [Required, NotNull] - public string? SdkDir { get; set; } + public string SdkWithNoWorkloadInstalledPath { get; set; } = string.Empty; public bool OnlyUpdateManifests{ get; set; } private const string s_nugetInsertionTag = "<!-- TEST_RESTORE_SOURCES_INSERTION_LINE -->"; + private string AllManifestsStampPath => Path.Combine(SdkWithNoWorkloadInstalledPath, ".all-manifests.stamp"); public override bool Execute() { try { - foreach (var workloadIdItem in WorkloadIds) + if (!Directory.Exists(SdkWithNoWorkloadInstalledPath)) + throw new LogAsErrorException($"Cannot find {nameof(SdkWithNoWorkloadInstalledPath)}={SdkWithNoWorkloadInstalledPath}"); + + if (!Directory.Exists(LocalNuGetsPath)) + throw new LogAsErrorException($"Cannot find {nameof(LocalNuGetsPath)}={LocalNuGetsPath} . " + + "Set it to the Shipping packages directory in artifacts."); + + if (!InstallAllManifests()) + return false; + + if (OnlyUpdateManifests) + return !Log.HasLoggedErrors; + + InstallWorkloadRequest[] selectedRequests = InstallTargets + .SelectMany(workloadToInstall => + { + if (!HasMetadata(workloadToInstall, nameof(workloadToInstall), "Variants", Log)) + throw new LogAsErrorException($"Missing Variants metadata on item '{workloadToInstall.ItemSpec}'"); + + return workloadToInstall + .GetMetadata("Variants") + .Split(";", StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries) + .Select(v => (variant: v, target: workloadToInstall)); + }) + .SelectMany(w => + { + IEnumerable<InstallWorkloadRequest> workloads = WorkloadIds.Where(wi => wi.GetMetadata("Variant") == w.variant) + .Select(wi => new InstallWorkloadRequest(wi, w.target)); + return workloads.Any() + ? workloads + : throw new LogAsErrorException($"Could not find any workload variant named '{w.variant}'"); + }).ToArray(); + + foreach (InstallWorkloadRequest req in selectedRequests) { - if (!ExecuteInternal(workloadIdItem)) + if (Directory.Exists(req.TargetPath)) + { + Log.LogMessage(MessageImportance.Low, $"Deleting directory {req.TargetPath}"); + Directory.Delete(req.TargetPath, recursive: true); + } + } + + string cachePath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); + foreach (InstallWorkloadRequest req in selectedRequests) + { + Log.LogMessage(MessageImportance.High, $"** Installing workload {req.WorkloadId} in {req.TargetPath} **"); + if (!req.Validate(Log)) + return false; + + if (!ExecuteInternal(req) && !req.IgnoreErrors) return false; } - return true; + + return !Log.HasLoggedErrors; } catch (LogAsErrorException laee) { @@ -56,73 +108,136 @@ namespace Microsoft.Workload.Build.Tasks } } - private bool ExecuteInternal(ITaskItem workloadId) + private bool ExecuteInternal(InstallWorkloadRequest req) { - if (!HasMetadata(workloadId, nameof(workloadId), "Version") || - !HasMetadata(workloadId, nameof(workloadId), "ManifestName")) + if (!File.Exists(TemplateNuGetConfigPath)) { + Log.LogError($"Cannot find TemplateNuGetConfigPath={TemplateNuGetConfigPath}"); return false; } - if (!Directory.Exists(SdkDir)) - { - Log.LogError($"Cannot find SdkDir={SdkDir}"); + Log.LogMessage(MessageImportance.Low, $"Duplicating {SdkWithNoWorkloadInstalledPath} into {req.TargetPath}"); + Utils.DirectoryCopy(SdkWithNoWorkloadInstalledPath, req.TargetPath); + + string nugetConfigContents = GetNuGetConfig(); + if (!InstallPacks(req, nugetConfigContents)) return false; + + UpdateAppRef(req.TargetPath, req.Version); + + return !Log.HasLoggedErrors; + } + + private bool InstallAllManifests() + { + var allManifestPkgs = Directory.EnumerateFiles(LocalNuGetsPath, "*Manifest*nupkg"); + if (!AnyInputsNewerThanOutput(AllManifestsStampPath, allManifestPkgs)) + { + Log.LogMessage(MessageImportance.Low, + $"Skipping installing manifests because the {AllManifestsStampPath} " + + $"is newer than packages {string.Join(',', allManifestPkgs)}."); + return true; } - if (!File.Exists(TemplateNuGetConfigPath)) + // HACK BEGIN - because sdk doesn't yet have the net6/net7 manifest names in the known workloads + // list + string? txtPath = Directory.EnumerateFiles(Path.Combine(SdkWithNoWorkloadInstalledPath, "sdk"), "IncludedWorkloadManifests.txt", + new EnumerationOptions { RecurseSubdirectories = true, MaxRecursionDepth = 2}) + .FirstOrDefault(); + if (txtPath is null) + throw new LogAsErrorException($"Could not find IncludedWorkloadManifests.txt in {SdkWithNoWorkloadInstalledPath}"); + + string stampPath = Path.Combine(Path.GetDirectoryName(txtPath)!, ".stamp"); + if (!File.Exists(stampPath)) { - Log.LogError($"Cannot find TemplateNuGetConfigPath={TemplateNuGetConfigPath}"); - return false; + Log.LogMessage(MessageImportance.High, $"txtPath: {txtPath}"); + string newTxt = File.ReadAllText(txtPath) + .Replace("microsoft.net.workload.mono.toolchain", + $"microsoft.net.workload.mono.toolchain.net6{Environment.NewLine}microsoft.net.workload.mono.toolchain.net7") + .Replace("microsoft.net.workload.emscripten", + $"microsoft.net.workload.emscripten.net6{Environment.NewLine}microsoft.net.workload.emscripten.net7"); + File.WriteAllText(txtPath, newTxt); + File.WriteAllText(stampPath, ""); } - Log.LogMessage(MessageImportance.High, $"{Environment.NewLine}** Installing workload manifest {workloadId.ItemSpec} **{Environment.NewLine}"); + string p = Path.Combine(SdkWithNoWorkloadInstalledPath, "sdk-manifests", "7.0.100", "microsoft.net.workload.mono.toolchain"); + Log.LogMessage(MessageImportance.High, $"Deleting {p}"); + if (Directory.Exists(p)) + Directory.Delete(p, recursive: true); + p = Path.Combine(SdkWithNoWorkloadInstalledPath, "sdk-manifests", "7.0.100", "microsoft.net.workload.emscripten"); + Log.LogMessage(MessageImportance.High, $"Deleting {p}"); + if (Directory.Exists(p)) + Directory.Delete(p, recursive: true); + // HACK END string nugetConfigContents = GetNuGetConfig(); - if (!InstallWorkloadManifest(workloadId, workloadId.GetMetadata("ManifestName"), workloadId.GetMetadata("Version"), nugetConfigContents, stopOnMissing: true)) - return false; + HashSet<string> manifestsInstalled = new(); + foreach (ITaskItem workload in WorkloadIds) + { + InstallWorkloadRequest req = new(workload, new TaskItem()); - if (OnlyUpdateManifests) - return !Log.HasLoggedErrors; + if (manifestsInstalled.Contains(req.ManifestName)) + { + Log.LogMessage(MessageImportance.High, $"{Environment.NewLine}** Manifests for workload {req.WorkloadId} are already installed **{Environment.NewLine}"); + continue; + } - if (!InstallPacks(workloadId, nugetConfigContents)) - return false; + Log.LogMessage(MessageImportance.High, $"{Environment.NewLine}** Installing manifests for workload {req.WorkloadId} **"); + if (!InstallWorkloadManifest(workload, + req.ManifestName, + req.Version, + SdkWithNoWorkloadInstalledPath, + nugetConfigContents, + stopOnMissing: true)) + { + return false; + } - UpdateAppRef(workloadId.GetMetadata("Version")); + manifestsInstalled.Add(req.ManifestName); + } - return !Log.HasLoggedErrors; + File.WriteAllText(AllManifestsStampPath, string.Empty); + + return true; } - private bool InstallPacks(ITaskItem workloadId, string nugetConfigContents) + private bool InstallPacks(InstallWorkloadRequest req, string nugetConfigContents) { string nugetConfigPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); File.WriteAllText(nugetConfigPath, nugetConfigContents); - Log.LogMessage(MessageImportance.High, $"{Environment.NewLine}** workload install **{Environment.NewLine}"); + // Log.LogMessage(MessageImportance.High, $"{Environment.NewLine}** dotnet workload install {req.WorkloadId} **{Environment.NewLine}"); (int exitCode, string output) = Utils.TryRunProcess( Log, - Path.Combine(SdkDir, "dotnet"), - $"workload install --skip-manifest-update --no-cache --configfile \"{nugetConfigPath}\" {workloadId.ItemSpec}", + Path.Combine(req.TargetPath, "dotnet"), + $"workload install --skip-manifest-update --no-cache --configfile \"{nugetConfigPath}\" {req.WorkloadId}", workingDir: Path.GetTempPath(), silent: false, + logStdErrAsMessage: req.IgnoreErrors, debugMessageImportance: MessageImportance.High); if (exitCode != 0) { - Log.LogError($"workload install failed with exit code {exitCode}: {output}"); - - foreach (string dir in Directory.EnumerateDirectories(Path.Combine(SdkDir, "sdk-manifests"), "*", SearchOption.AllDirectories)) - Log.LogMessage(MessageImportance.Low, $"\t{Path.Combine(SdkDir, "sdk-manifests", dir)}"); + if (req.IgnoreErrors) + { + Log.LogMessage(MessageImportance.High, + $"{Environment.NewLine} ** Ignoring workload installation failure exit code {exitCode}. **{Environment.NewLine}"); + } + else + { + Log.LogError($"workload install failed with exit code {exitCode}: {output}"); + } - foreach (string dir in Directory.EnumerateDirectories(Path.Combine(SdkDir, "packs"), "*", SearchOption.AllDirectories)) - Log.LogMessage(MessageImportance.Low, $"\t{Path.Combine(SdkDir, "packs", dir)}"); + foreach (string dir in Directory.EnumerateDirectories(Path.Combine(req.TargetPath, "sdk-manifests"), "*", SearchOption.AllDirectories)) + Log.LogMessage(MessageImportance.Low, $"\t{Path.Combine(req.TargetPath, "sdk-manifests", dir)}"); - return false; + foreach (string dir in Directory.EnumerateDirectories(Path.Combine(req.TargetPath, "packs"), "*", SearchOption.AllDirectories)) + Log.LogMessage(MessageImportance.Low, $"\t{Path.Combine(req.TargetPath, "packs", dir)}"); } return !Log.HasLoggedErrors; } - private void UpdateAppRef(string version) + private void UpdateAppRef(string sdkPath, string version) { Log.LogMessage(MessageImportance.High, $"{Environment.NewLine}** Updating Targeting pack **{Environment.NewLine}"); @@ -131,7 +246,7 @@ namespace Microsoft.Workload.Build.Tasks throw new LogAsErrorException($"Could not find {pkgPath} needed to update the targeting pack to the newly built one." + " Make sure to build the subset `packs`, like `./build.sh -os browser -s mono+libs+packs`."); - string packDir = Path.Combine(SdkDir, "packs", "Microsoft.NETCore.App.Ref"); + string packDir = Path.Combine(sdkPath, "packs", "Microsoft.NETCore.App.Ref"); string[] dirs = Directory.EnumerateDirectories(packDir).ToArray(); if (dirs.Length != 1) throw new LogAsErrorException($"Expected to find exactly one versioned directory under {packDir}, but got " + @@ -150,28 +265,28 @@ namespace Microsoft.Workload.Build.Tasks private string GetNuGetConfig() { string contents = File.ReadAllText(TemplateNuGetConfigPath); - if (contents.IndexOf(s_nugetInsertionTag) < 0) + if (contents.IndexOf(s_nugetInsertionTag, StringComparison.InvariantCultureIgnoreCase) < 0) throw new LogAsErrorException($"Could not find {s_nugetInsertionTag} in {TemplateNuGetConfigPath}"); return contents.Replace(s_nugetInsertionTag, $@"<add key=""nuget-local"" value=""{LocalNuGetsPath}"" />"); } - private bool InstallWorkloadManifest(ITaskItem workloadId, string name, string version, string nugetConfigContents, bool stopOnMissing) + private bool InstallWorkloadManifest(ITaskItem workloadId, string name, string version, string sdkDir, string nugetConfigContents, bool stopOnMissing) { - Log.LogMessage(MessageImportance.High, $"Installing workload manifest for {name}/{version}"); + Log.LogMessage(MessageImportance.High, $" ** Installing manifest: {name}/{version}"); // Find any existing directory with the manifest name, ignoring the case // Multiple directories for a manifest, differing only in case causes // workload install to fail due to duplicate manifests! // This is applicable only on case-sensitive filesystems - string outputDir = FindSubDirIgnoringCase(Path.Combine(SdkDir, "sdk-manifests", VersionBand), name); + string outputDir = FindSubDirIgnoringCase(Path.Combine(sdkDir, "sdk-manifests", VersionBand), name); PackageReference pkgRef = new(Name: $"{name}.Manifest-{VersionBand}", Version: version, OutputDir: outputDir, relativeSourceDir: "data"); - if (!PackageInstaller.Install(new[]{ pkgRef }, nugetConfigContents, Log, stopOnMissing)) + if (!PackageInstaller.Install(new[] { pkgRef }, nugetConfigContents, Log, stopOnMissing)) return false; string manifestDir = pkgRef.OutputDir; @@ -209,7 +324,7 @@ namespace Microsoft.Workload.Build.Tasks { foreach ((string depName, string depVersion) in manifest.DependsOn) { - if (!InstallWorkloadManifest(workloadId, depName, depVersion, nugetConfigContents, stopOnMissing: false)) + if (!InstallWorkloadManifest(workloadId, depName, depVersion, sdkDir, nugetConfigContents, stopOnMissing: false)) { Log.LogWarning($"Could not install manifest {depName}/{depVersion}. This can be ignored if the workload {workloadId.ItemSpec} doesn't depend on it."); continue; @@ -220,31 +335,35 @@ namespace Microsoft.Workload.Build.Tasks return true; } - private bool HasMetadata(ITaskItem item, string itemName, string metadataName) + private static bool HasMetadata(ITaskItem item, string itemName, string metadataName, TaskLoggingHelper log) { if (!string.IsNullOrEmpty(item.GetMetadata(metadataName))) return true; - Log.LogError($"{itemName} item ({item.ItemSpec}) is missing Name metadata"); + log.LogError($"{itemName} item ({item.ItemSpec}) is missing {metadataName} metadata"); return false; } private string FindSubDirIgnoringCase(string parentDir, string dirName) { - IEnumerable<string> matchingDirs = Directory.EnumerateDirectories(parentDir, + string[] matchingDirs = Directory.EnumerateDirectories(parentDir, dirName, - new EnumerationOptions { MatchCasing = MatchCasing.CaseInsensitive }); + new EnumerationOptions { MatchCasing = MatchCasing.CaseInsensitive }) + .ToArray(); string? first = matchingDirs.FirstOrDefault(); - if (matchingDirs.Count() > 1) + if (matchingDirs.Length > 1) { - Log.LogWarning($"Found multiple directories with names that differ only in case. {string.Join(", ", matchingDirs.ToArray())}" + Log.LogWarning($"Found multiple directories with names that differ only in case. {string.Join(", ", matchingDirs)}" + $"{Environment.NewLine}Using the first one: {first}"); } return first ?? Path.Combine(parentDir, dirName.ToLower(CultureInfo.InvariantCulture)); } + private static bool AnyInputsNewerThanOutput(string output, IEnumerable<string> inputs) + => inputs.Any(i => Utils.IsNewerThan(i, output)); + private sealed record ManifestInformation( object Version, string Description, @@ -272,6 +391,35 @@ namespace Microsoft.Workload.Build.Tasks [property: JsonPropertyName("alias-to")] Dictionary<string, string> AliasTo ); + + internal sealed record InstallWorkloadRequest( + ITaskItem Workload, + ITaskItem Target) + { + public string ManifestName => Workload.GetMetadata("ManifestName"); + public string Version => Workload.GetMetadata("Version"); + public string TargetPath => Target.GetMetadata("InstallPath"); + public bool IgnoreErrors => Workload.GetMetadata("IgnoreErrors").ToLowerInvariant() == "true"; + public string WorkloadId => Workload.ItemSpec; + + public bool Validate(TaskLoggingHelper log) + { + if (!HasMetadata(Workload, nameof(Workload), "Version", log) || + !HasMetadata(Workload, nameof(Workload), "ManifestName", log) || + !HasMetadata(Target, nameof(Target), "InstallPath", log)) + { + return false; + } + + if (string.IsNullOrEmpty(TargetPath)) + { + log.LogError($"InstallPath is empty for workload {Workload.ItemSpec}"); + return false; + } + + return true; + } + } } internal sealed record PackageReference(string Name, diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildEnvironment.cs b/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildEnvironment.cs index c119db17c28..abe5e102bc6 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildEnvironment.cs +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildEnvironment.cs @@ -51,7 +51,7 @@ namespace Wasm.Build.Tests "..", "..", "..", - "dotnet-workload"); + "dotnet-net7"); if (Directory.Exists(probePath)) sdkForWorkloadPath = Path.GetFullPath(probePath); else @@ -112,6 +112,12 @@ namespace Wasm.Build.Tests // helps with debugging EnvVars["WasmNativeStrip"] = "false"; + // Works around an issue in msbuild due to which + // second, and subsequent builds fail without any details + // in the logs + EnvVars["DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER"] = "1"; + DefaultBuildArgs += " /nr:false"; + if (OperatingSystem.IsWindows()) { EnvVars["WasmCachePath"] = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs b/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs index 9e3b2e5b0b7..c2b64f79044 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/BuildTestBase.cs @@ -488,6 +488,7 @@ namespace Wasm.Build.Tests $"-bl:{logPath}", $"-p:Configuration={config}", "-p:BlazorEnableCompression=false", + "-nr:false", setWasmDevel ? "-p:_WasmDevel=true" : string.Empty }.Concat(extraArgs).ToArray(); diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/README.md b/src/tests/BuildWasmApps/Wasm.Build.Tests/README.md index 79a0a8945a8..a42e30078c8 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/README.md +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/README.md @@ -38,7 +38,7 @@ For this, the builds get cached using `BuildArgs` as the key. - when running locally, the default is to test with workloads. For this, sdk with `$(SdkVersionForWorkloadTesting)` is installed in - `artifacts/bin/dotnet-workload`. And the workload packs are installed there + `artifacts/bin/dotnet-net7`. And the workload packs are installed there using packages in `artifacts/packages/$(Configuration)/Shipping`. - If the packages get updated, then the workload will get installed again. diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Blazor.Directory.Build.targets b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Blazor.Directory.Build.targets index 5557a97f375..b2b875fd844 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Blazor.Directory.Build.targets +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Blazor.Directory.Build.targets @@ -1,7 +1,4 @@ <Project> - <PropertyGroup> - <LocalFrameworkOverrideName>Microsoft.NETCore.App</LocalFrameworkOverrideName> - </PropertyGroup> <ItemGroup> <EmscriptenEnvVars Include="FROZEN_CACHE=" Condition="'$(OS)' == 'Windows_NT'" /> </ItemGroup> @@ -9,67 +6,4 @@ <Target Name="PrintRuntimePackPath" BeforeTargets="Publish"> <Message Text="** MicrosoftNetCoreAppRuntimePackDir : %(ResolvedRuntimePack.PackageDirectory)" Importance="High" /> </Target> - - <!-- SDK tries to download runtime packs when RuntimeIdentifier is set, remove them from PackageDownload item. --> - <Target Name="RemoveRuntimePackFromDownloadItem" - AfterTargets="ProcessFrameworkReferences" - Condition="'$(WasmNativeWorkload)' == 'true'"> - <ItemGroup> - <PackageDownload Remove="@(PackageDownload)" - Condition="'$(UsePackageDownload)' == 'true' and $([System.String]::Copy('%(Identity)').StartsWith('Microsoft.NETCore.App.Runtime'))" /> - <PackageReference Remove="@(PackageReference)" - Condition="'$(UsePackageDownload)' != 'true' and $([System.String]::Copy('%(Identity)').StartsWith('Microsoft.NETCore.App.Runtime'))" /> - </ItemGroup> - </Target> - - <!-- Use local targeting pack for NetCoreAppCurrent. --> - <Target Name="UpdateTargetingAndRuntimePack" - AfterTargets="ResolveFrameworkReferences" - Condition="'$(WasmNativeWorkload)' == 'true'"> - <ItemGroup> - <ResolvedRuntimePack - Update="Microsoft.NETCore.App.Runtime.Mono.browser-wasm" - FrameworkName="Microsoft.NETCore.App" - NuGetPackageId="Microsoft.NETCore.App.Runtime.Mono.browser-wasm" - NuGetPackageVersion="$(RuntimePackInWorkloadVersion)" - PackageDirectory="$(NetCoreTargetingPackRoot)\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\$(RuntimePackInWorkloadVersion)" - RuntimeIdentifier="browser-wasm" /> - - <ResolvedFrameworkReference Update="Microsoft.NETCore.App" - RuntimePackName="Microsoft.NETCore.App.Runtime.Mono.browser-wasm" - RuntimePackVersion="$(RuntimePackInWorkloadVersion)" - RuntimePackPath="$(NetCoreTargetingPackRoot)\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\$(RuntimePackInWorkloadVersion)" - RuntimeIdentifier="browser-wasm" /> - </ItemGroup> - </Target> - - <!-- Update the local targeting pack's version as it's written into the runtimeconfig.json file to select the right framework. --> - <Target Name="UpdateRuntimeFrameworkVersion" - AfterTargets="ResolveTargetingPackAssets" - Condition="'$(WasmNativeWorkload)' == 'true'"> - <ItemGroup> - <RuntimeFramework Version="$(RuntimePackInWorkloadVersion)" - Condition="'%(RuntimeFramework.FrameworkName)' == 'Microsoft.NETCore.App'" /> - </ItemGroup> - </Target> - - <!-- Filter out conflicting implicit assembly references. --> - <Target Name="FilterImplicitAssemblyReferences" - Condition="'$(WasmNativeWorkload)' == 'true'" - DependsOnTargets="ResolveProjectReferences" - AfterTargets="ResolveTargetingPackAssets"> - <ItemGroup> - <_targetingPackReferenceExclusion Include="$(TargetName)" /> - <_targetingPackReferenceExclusion Include="@(_ResolvedProjectReferencePaths->'%(Filename)')" /> - <_targetingPackReferenceExclusion Include="@(DefaultReferenceExclusion)" /> - </ItemGroup> - - <ItemGroup> - <_targetingPackReferenceWithExclusion Include="@(Reference)"> - <Exclusion>%(_targetingPackReferenceExclusion.Identity)</Exclusion> - </_targetingPackReferenceWithExclusion> - <Reference Remove="@(_targetingPackReferenceWithExclusion)" - Condition="'%(_targetingPackReferenceWithExclusion.ExternallyResolved)' == 'true' and '%(_targetingPackReferenceWithExclusion.Filename)' == '%(_targetingPackReferenceWithExclusion.Exclusion)'" /> - </ItemGroup> - </Target> </Project> diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Blazor.Local.Directory.Build.targets b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Blazor.Local.Directory.Build.targets index 18ef74cead4..d18165944fa 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Blazor.Local.Directory.Build.targets +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Blazor.Local.Directory.Build.targets @@ -2,24 +2,4 @@ <Target Name="PrintRuntimePackPath" BeforeTargets="Publish"> <Message Text="** MicrosoftNetCoreAppRuntimePackDir : %(ResolvedRuntimePack.PackageDirectory)" Importance="High" /> </Target> - - <!-- Use local targeting pack for NetCoreAppCurrent. --> - <Target Name="UpdateTargetingAndRuntimePack" - AfterTargets="ResolveFrameworkReferences"> - <ItemGroup> - <ResolvedRuntimePack - Update="Microsoft.NETCore.App.Runtime.Mono.browser-wasm" - FrameworkName="Microsoft.NETCore.App" - NuGetPackageId="Microsoft.NETCore.App.Runtime.Mono.browser-wasm" - NuGetPackageVersion="$(RuntimePackInWorkloadVersion)" - PackageDirectory="$(MicrosoftNetCoreAppRuntimePackLocationToUse)" - RuntimeIdentifier="browser-wasm" /> - - <ResolvedFrameworkReference Update="Microsoft.NETCore.App" - RuntimePackName="Microsoft.NETCore.App.Runtime.Mono.browser-wasm" - RuntimePackVersion="$(RuntimePackInWorkloadVersion)" - RuntimePackPath="$(MicrosoftNetCoreAppRuntimePackLocationToUse)" - RuntimeIdentifier="browser-wasm" /> - </ItemGroup> - </Target> </Project> diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/data/RunScriptTemplate.cmd b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/RunScriptTemplate.cmd index d3c47af35c0..75b09e58cb2 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/data/RunScriptTemplate.cmd +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/RunScriptTemplate.cmd @@ -94,10 +94,10 @@ exit /b %EXIT_CODE% REM Functions :SetEnvVars if [%TEST_USING_WORKLOADS%] == [true] ( - set _DIR_NAME=dotnet-workload + set _DIR_NAME=dotnet-net7 set SDK_HAS_WORKLOAD_INSTALLED=true ) else ( - set _DIR_NAME=sdk-no-workload + set _DIR_NAME=dotnet-none set SDK_HAS_WORKLOAD_INSTALLED=false ) diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/data/RunScriptTemplate.sh b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/RunScriptTemplate.sh index 0c3be485422..e27d280a23c 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/data/RunScriptTemplate.sh +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/RunScriptTemplate.sh @@ -68,10 +68,10 @@ function set_env_vars() { local _DIR_NAME= if [ "x$TEST_USING_WORKLOADS" = "xtrue" ]; then - _DIR_NAME=dotnet-workload + _DIR_NAME=dotnet-net7 export SDK_HAS_WORKLOAD_INSTALLED=true else - _DIR_NAME=sdk-no-workload + _DIR_NAME=dotnet-none export SDK_HAS_WORKLOAD_INSTALLED=false fi diff --git a/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Workloads.Directory.Build.targets b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Workloads.Directory.Build.targets index 2274fe83598..b2b875fd844 100644 --- a/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Workloads.Directory.Build.targets +++ b/src/tests/BuildWasmApps/Wasm.Build.Tests/data/Workloads.Directory.Build.targets @@ -6,74 +6,4 @@ <Target Name="PrintRuntimePackPath" BeforeTargets="Publish"> <Message Text="** MicrosoftNetCoreAppRuntimePackDir : %(ResolvedRuntimePack.PackageDirectory)" Importance="High" /> </Target> - - <!-- Add the resolved targeting pack to the assembly search path. --> - <!-- <Target Name="UseTargetingPackForAssemblySearchPaths" - BeforeTargets="ResolveAssemblyReferences; - DesignTimeResolveAssemblyReferences" - Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'"> - <PropertyGroup> - <AssemblySearchPaths>$(AssemblySearchPaths);$(MicrosoftNetCoreAppRefPackRefDir.TrimEnd('/\'))</AssemblySearchPaths> - <DesignTimeAssemblySearchPaths>$(DesignTimeAssemblySearchPaths);$(MicrosoftNetCoreAppRefPackRefDir.TrimEnd('/\'))</DesignTimeAssemblySearchPaths> - </PropertyGroup> - </Target> --> - - <!-- SDK tries to download runtime packs when RuntimeIdentifier is set, remove them from PackageDownload item. --> - <Target Name="RemoveRuntimePackFromDownloadItem" - AfterTargets="ProcessFrameworkReferences"> - <ItemGroup> - <PackageDownload Remove="@(PackageDownload)" - Condition="'$(UsePackageDownload)' == 'true' and $([System.String]::Copy('%(Identity)').StartsWith('Microsoft.NETCore.App.Runtime'))" /> - <PackageReference Remove="@(PackageReference)" - Condition="'$(UsePackageDownload)' != 'true' and $([System.String]::Copy('%(Identity)').StartsWith('Microsoft.NETCore.App.Runtime'))" /> - </ItemGroup> - </Target> - - <!-- Use local targeting pack for NetCoreAppCurrent. --> - <Target Name="UpdateTargetingAndRuntimePack" - AfterTargets="ResolveFrameworkReferences"> - <ItemGroup> - <ResolvedRuntimePack - Update="Microsoft.NETCore.App.Runtime.Mono.browser-wasm" - FrameworkName="Microsoft.NETCore.App" - NuGetPackageId="Microsoft.NETCore.App.Runtime.Mono.browser-wasm" - NuGetPackageVersion="$(RuntimePackInWorkloadVersion)" - PackageDirectory="$(NetCoreTargetingPackRoot)\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\$(RuntimePackInWorkloadVersion)" - RuntimeIdentifier="browser-wasm" /> - - <ResolvedFrameworkReference Update="Microsoft.NETCore.App" - RuntimePackName="Microsoft.NETCore.App.Runtime.Mono.browser-wasm" - RuntimePackVersion="$(RuntimePackInWorkloadVersion)" - RuntimePackPath="$(NetCoreTargetingPackRoot)\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\$(RuntimePackInWorkloadVersion)" - RuntimeIdentifier="browser-wasm" /> - </ItemGroup> - </Target> - - <!-- Update the local targeting pack's version as it's written into the runtimeconfig.json file to select the right framework. --> - <Target Name="UpdateRuntimeFrameworkVersion" - AfterTargets="ResolveTargetingPackAssets"> - <ItemGroup> - <RuntimeFramework Version="$(RuntimePackInWorkloadVersion)" - Condition="'%(RuntimeFramework.FrameworkName)' == 'Microsoft.NETCore.App'" /> - </ItemGroup> - </Target> - - <!-- Filter out conflicting implicit assembly references. --> - <Target Name="FilterImplicitAssemblyReferences" - DependsOnTargets="ResolveProjectReferences" - AfterTargets="ResolveTargetingPackAssets"> - <ItemGroup> - <_targetingPackReferenceExclusion Include="$(TargetName)" /> - <_targetingPackReferenceExclusion Include="@(_ResolvedProjectReferencePaths->'%(Filename)')" /> - <_targetingPackReferenceExclusion Include="@(DefaultReferenceExclusion)" /> - </ItemGroup> - - <ItemGroup> - <_targetingPackReferenceWithExclusion Include="@(Reference)"> - <Exclusion>%(_targetingPackReferenceExclusion.Identity)</Exclusion> - </_targetingPackReferenceWithExclusion> - <Reference Remove="@(_targetingPackReferenceWithExclusion)" - Condition="'%(_targetingPackReferenceWithExclusion.ExternallyResolved)' == 'true' and '%(_targetingPackReferenceWithExclusion.Filename)' == '%(_targetingPackReferenceWithExclusion.Exclusion)'" /> - </ItemGroup> - </Target> </Project> diff --git a/src/tests/readytorun/tests/main.cs b/src/tests/readytorun/tests/main.cs index 02d94a59393..04314860d48 100644 --- a/src/tests/readytorun/tests/main.cs +++ b/src/tests/readytorun/tests/main.cs @@ -414,6 +414,13 @@ class Program Assert.AreEqual(value[i], (byte)(9 - i)); } + // public constructor, so we run something when loading from byte array in the test below + public Program() + { + // do something in the constructor to see if it works + TestVirtualMethodCalls(); + } + static void TestLoadR2RImageFromByteArray() { Assembly assembly1 = typeof(Program).Assembly; @@ -422,6 +429,8 @@ class Program Assembly assembly2 = Assembly.Load(array); Assert.AreEqual(assembly2.FullName, assembly1.FullName); + + assembly2.CreateInstance("Program"); } [MethodImplAttribute(MethodImplOptions.NoInlining)] @@ -513,9 +522,8 @@ class Program Console.WriteLine("RVAFieldTest"); RVAFieldTest(); -// Disable for https://github.com/dotnet/runtime/issues/71507 -// Console.WriteLine("TestLoadR2RImageFromByteArray"); -// TestLoadR2RImageFromByteArray(); + Console.WriteLine("TestLoadR2RImageFromByteArray"); + TestLoadR2RImageFromByteArray(); Console.WriteLine("TestILBodyChange"); TestILBodyChange(); diff --git a/src/workloads/workloads.csproj b/src/workloads/workloads.csproj index 1acaa7ea235..c2250ab18ec 100644 --- a/src/workloads/workloads.csproj +++ b/src/workloads/workloads.csproj @@ -79,8 +79,8 @@ <!-- Shorten package names to avoid long path issues in Visual Studio --> <ItemGroup> <!-- These need to be in order - matching rules will try in order. --> - <ShortNames Include="Microsoft.NET.Workload.Mono.ToolChain."> - <Replacement>Mono</Replacement> + <ShortNames Include="Microsoft.NET.Workload.Mono.ToolChain.net"> + <Replacement>Mono.</Replacement> </ShortNames> <ShortNames Include="microsoft.netcore.app.runtime;Microsoft.NETCore.App.Runtime;microsoft.net.runtime;Microsoft.NET.Runtime"> <Replacement>Microsoft</Replacement> @@ -91,10 +91,11 @@ </ItemGroup> <ItemGroup> - <ManifestPackages Include="$(PackageSource)Microsoft.NET.Workload.Mono.ToolChain.Manifest-*.nupkg" MsiVersion="$(MsiVersion)"/> + <ManifestPackages Include="$(PackageSource)Microsoft.NET.Workload.Mono.ToolChain.*Manifest-*.nupkg" MsiVersion="$(MsiVersion)"/> </ItemGroup> <CreateVisualStudioWorkload BaseIntermediateOutputPath="$(WorkloadIntermediateOutputPath)" + AllowMissingPacks="True" BaseOutputPath="$(WorkloadOutputPath)" ComponentResources="$(ComponentResources)" PackageSource="$(PackageSource)" |