Skip to content

Commit c21e78c

Browse files
authored
[build] Copy .NET build output to ref/runtime dirs (#7010)
How does one test incremental changes to xamarin-android for .NET6+? Previously, every change would require re-creating the .NET packs: # make changes to src/Xamarin.Android.Build.Tasks % dotnet build src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj # re-create .NET packs % make pack-dotnet # can now use `./dotnet-local.*` to test changes. The problem with this is that `make pack-dotnet` can take multiple minutes to complete. This slows down local testing. Update the build system to instead place build artifacts within the `bin\$(Configuration)\lib\packs` directory, and update the `dotnet-local` scripts to set: * The `DOTNETSDK_WORKLOAD_MANIFEST_ROOTS` environment variable to `bin\$(Configuration)\lib\sdk-manifests`, and the * The `DOTNETSDK_WORKLOAD_PACK_ROOTS` environment variable to `bin\$(Configuration)\lib`. This simplifies the .NET 6 test workflow to: ./dotnet-local build Xamarin.Android.sln # Use of `dotnet-local` now includes in-tree changes. The `bin\$(Configuration)\lib\packs` directory contains the content required for our Ref and Runtime packs, and follows the directory structure that the `dotnet workload` resolution process expects. This in-build-tree structure is simplified compare to the CI structure; commit distance and semver metadata isn't present. A new `ConfigureLocalWorkload` target has been added to run a couple of extra steps that are required to set up the local workload. This includes generating workload manifest, target, and FrameworkList files, installing mono/runtime dependencies, and creating the templates pack. It is run as part of the `make all` and `make jenkins` Make targets. The `ConfigureLocalWorkload` target should only need to run once per "clean build". It is fine to run this target more frequently than that, but it is only required when building from scratch or after one of the following changes: * The structure of the android workload changes. * Files are added to either the Ref or Runtime packs. * Changes are made to the templates pack. * The dotnet/runtime dependency is updated. A new `BuildDotNet` target has been added, which will only build one API level. This should be closer to `make all`, *not* `make jenkins`. The `BuildDotNet` target also calls `ConfigureLocalWorkload`.
1 parent aa46089 commit c21e78c

File tree

20 files changed

+341
-91
lines changed

20 files changed

+341
-91
lines changed

Configuration.props

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,13 @@
6565
<_XABinRelativeInstallPrefix>lib\xamarin.android</_XABinRelativeInstallPrefix>
6666
<XAInstallPrefix Condition=" '$(XAInstallPrefix)' == '' ">$(MSBuildThisFileDirectory)bin\$(Configuration)\$(_XABinRelativeInstallPrefix)\</XAInstallPrefix>
6767
<_MonoAndroidNETOutputRoot>$(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\</_MonoAndroidNETOutputRoot>
68-
<MicrosoftAndroidSdkPackDir>$(BuildOutputDirectory)packs\$(MicrosoftAndroidSdkPackName)\$(AndroidPackVersion)\</MicrosoftAndroidSdkPackDir>
68+
<_MonoAndroidNETDefaultOutDir>$(_MonoAndroidNETOutputRoot)$(AndroidApiLevel)\</_MonoAndroidNETDefaultOutDir>
69+
<MicrosoftAndroidRefPackDir>$(BuildOutputDirectory)lib\packs\Microsoft.Android.Ref.$(AndroidApiLevel)\$(AndroidPackVersion)\ref\$(DotNetTargetFramework)\</MicrosoftAndroidRefPackDir>
70+
<MicrosoftAndroidArmPackDir>$(BuildOutputDirectory)lib\packs\Microsoft.Android.Runtime.$(AndroidApiLevel).android-arm\$(AndroidPackVersion)\runtimes\android-arm\</MicrosoftAndroidArmPackDir>
71+
<MicrosoftAndroidArm64PackDir>$(BuildOutputDirectory)lib\packs\Microsoft.Android.Runtime.$(AndroidApiLevel).android-arm64\$(AndroidPackVersion)\runtimes\android-arm64\</MicrosoftAndroidArm64PackDir>
72+
<MicrosoftAndroidx86PackDir>$(BuildOutputDirectory)lib\packs\Microsoft.Android.Runtime.$(AndroidApiLevel).android-x86\$(AndroidPackVersion)\runtimes\android-x86\</MicrosoftAndroidx86PackDir>
73+
<MicrosoftAndroidx64PackDir>$(BuildOutputDirectory)lib\packs\Microsoft.Android.Runtime.$(AndroidApiLevel).android-x64\$(AndroidPackVersion)\runtimes\android-x64\</MicrosoftAndroidx64PackDir>
74+
<MicrosoftAndroidSdkPackDir>$(BuildOutputDirectory)lib\packs\$(MicrosoftAndroidSdkPackName)\$(AndroidPackVersion)\</MicrosoftAndroidSdkPackDir>
6975
<MicrosoftAndroidSdkOutDir>$(MicrosoftAndroidSdkPackDir)\tools\</MicrosoftAndroidSdkOutDir>
7076
<MingwDependenciesRootDirectory Condition=" '$(MingwDependenciesRootDirectory)' == '' ">$(MSBuildThisFileDirectory)\bin\Build$(Configuration)\mingw-deps</MingwDependenciesRootDirectory>
7177
<HostCc Condition=" '$(HostCc)' == '' ">$(HostCc64)</HostCc>

Documentation/building/unix/instructions.md

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -62,34 +62,13 @@ on Windows, many of the concepts should still apply:
6262

6363
[xamdevsummit]: https://youtu.be/8qaQleb6Tbk
6464

65-
# Creating installers
66-
67-
Once `make all` or `make jenkins` have completed, macOS (.pkg)
68-
and Windows (.vsix) installer files can be built with:
69-
70-
make create-installers
71-
72-
Commercial installers will be created by this command if the
73-
`make prepare-external-git-dependencies` command was ran before building.
74-
75-
A .NET 6 Workload installer is also created at
76-
`Microsoft.NET.Workload.Android-*.pkg`, you can run `make
77-
create-workload-installers` if you only want to create the .NET 6
78-
installer.
79-
80-
# Creating a local .NET 6 Workload
65+
# Creating a local .NET android Workload
8166

82-
`make prepare` provisions a specific build of .NET 6 to
67+
`make prepare` provisions a specific build of .NET to
8368
`bin/$(Configuration)/dotnet`.
8469

85-
Once `make all` or `make jenkins` have completed, you can build the .NET 6
86-
packages with:
87-
88-
make pack-dotnet
89-
90-
Several `.nupkg` files will be output in `./bin/BuildDebug/nuget-unsigned`,
91-
but this is only part of the story. Your local
92-
`bin/$(Configuration)/dotnet/packs` directory will be populated with a
70+
Once `make all` or `make jenkins` have completed, your local
71+
`bin/$(Configuration)/lib/packs` directory will be populated with a
9372
local Android "workload" in `Microsoft.Android.Sdk.$(HostOS)` matching
9473
your operating system.
9574

@@ -113,6 +92,25 @@ Using the `dotnet-local` script will execute the `dotnet` provisioned in
11392

11493
See the [One .NET Documentation](../../guides/OneDotNet.md) for further details.
11594

95+
# Creating installers
96+
97+
Once `make all` or `make jenkins` have completed, macOS (.pkg),
98+
Windows (.vsix), and .NET android workload .nupkg files
99+
can be built with:
100+
101+
make create-installers
102+
103+
Alternatively, .NET android workload packs can be built with:
104+
105+
make create-nupkgs
106+
# -or-
107+
make pack-dotnet
108+
109+
Several `.nupkg` files will be output in `./bin/Build$(Configuration)/nuget-unsigned`.
110+
111+
Commercial installers will be created by this command if the
112+
`make prepare-external-git-dependencies` command was ran before building.
113+
116114
# Building Unit Tests
117115

118116
Once `make all` or `make jenkins` have completed, the unit tests may

Documentation/building/windows/instructions.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,19 +91,17 @@ So for example:
9191
[windows_path]: https://www.java.com/en/download/help/path.xml
9292
[set_alias]: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/set-alias?view=powershell-6
9393

94-
# Creating a local .NET 6 Workload
94+
# Creating a local .NET android Workload
9595

96-
`msbuild Xamarin.Android.sln /t:Prepare` provisions a specific build
97-
of .NET 6 to `bin\$(Configuration)\dotnet`.
96+
`dotnet msbuild Xamarin.Android.sln -t:Prepare` provisions a
97+
specific build of .NET to `bin\$(Configuration)\dotnet`.
9898

99-
Once `msbuild Xamarin.Android.sln /t:Build` is complete, you can build
100-
the .NET 6 packages with:
99+
Once the prepare target is complete, you can set up a local
100+
.NET android workload install with:
101101

102-
dotnet-local.cmd build Xamarin.Android.sln -t:PackDotNet -m:1
102+
dotnet-local.cmd build Xamarin.Android.sln -t:BuildDotNet -m:1
103103

104-
Several `.nupkg` files will be output in `.\bin\BuildDebug\nuget-unsigned`,
105-
but this is only part of the story. Your local
106-
`bin\$(Configuration)\dotnet\packs` directory will be
104+
Your local `bin\$(Configuration)\lib\packs` directory will be
107105
populated with a local Android "workload" in
108106
`Microsoft.Android.Sdk.$(HostOS)` matching your operating system.
109107

@@ -131,6 +129,19 @@ Using the `dotnet-local` script will execute the `dotnet` provisioned in
131129

132130
See the [One .NET Documentation](../../guides/OneDotNet.md) for further details.
133131

132+
# Creating installers
133+
134+
Once `dotnet msbuild Xamarin.Android.sln -t:Prepare` is complete,
135+
.NET android workload packs can be built with:
136+
137+
dotnet-local.cmd build Xamarin.Android.sln -t:BuildDotNet,PackDotNet -m:1
138+
139+
Several `.nupkg` files will be output in `.\bin\Build$(Configuration)\nuget-unsigned`.
140+
141+
Commercial packages will be created by this command if the
142+
`dotnet-local.cmd build Xamarin.Android.sln -t:BuildExternal`
143+
command was ran before building.
144+
134145
# Building Unit Tests
135146

136147
Once `msbuild Xamarin.Android.sln` has completed, the unit tests may

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ _PREPARE_ARGS =
2323

2424
all:
2525
$(call DOTNET_BINLOG,all) $(MSBUILD_FLAGS) $(SOLUTION) -m:1
26+
$(call DOTNET_BINLOG,setup-workload) -t:ConfigureLocalWorkload build-tools/create-packs/Microsoft.Android.Sdk.proj
2627
$(call MSBUILD_BINLOG,all,$(_SLN_BUILD)) /restore $(MSBUILD_FLAGS) tools/xabuild/xabuild.csproj
2728

2829
-include bin/Build$(CONFIGURATION)/rules.mk

build-tools/automation/azure-pipelines.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ stages:
115115

116116
- script: >
117117
mkdir -p $(System.DefaultWorkingDirectory)/xamarin-android/bin/Build$(XA.Build.Configuration)/windows-toolchain-pdb &&
118-
ln $(System.DefaultWorkingDirectory)/xamarin-android/bin/$(XA.Build.Configuration)/packs/Microsoft.Android.Sdk.Darwin/*/tools/binutils/bin/*.pdb
118+
ln $(System.DefaultWorkingDirectory)/xamarin-android/bin/$(XA.Build.Configuration)/lib/packs/Microsoft.Android.Sdk.Darwin/*/tools/binutils/bin/*.pdb
119119
$(System.DefaultWorkingDirectory)/xamarin-android/bin/Build$(XA.Build.Configuration)/windows-toolchain-pdb/
120120
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android
121121
displayName: copy Windows toolchain pdb files
@@ -208,7 +208,7 @@ stages:
208208
parameters:
209209
project: Xamarin.Android.sln
210210
arguments: >-
211-
-t:PackDotNet -c $(XA.Build.Configuration) -m:1 -v:n
211+
-t:BuildDotNet,PackDotNet -c $(XA.Build.Configuration) -m:1 -v:n
212212
-bl:$(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\dotnet-build.binlog
213213
displayName: Build Solution
214214
continueOnError: false

build-tools/create-packs/Directory.Build.targets

Lines changed: 88 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@
5757
</Target>
5858

5959
<Target Name="_CreateDefaultRefPack"
60-
Condition=" '$(AndroidLatestStableApiLevel)' != '$(AndroidDefaultTargetDotnetApiLevel)' and Exists('$(_MonoAndroidNETOutputRoot)$(DotNetAndroidTargetFramework)$(AndroidDefaultTargetDotnetApiLevel)\Mono.Android.dll') ">
60+
Condition=" '$(AndroidLatestStableApiLevel)' != '$(AndroidDefaultTargetDotnetApiLevel)' and Exists('$(_MonoAndroidNETOutputRoot)$(AndroidDefaultTargetDotnetApiLevel)\Mono.Android.dll') ">
6161
<Exec Command="&quot;$(DotNetPreviewTool)&quot; pack @(_GlobalProperties, ' ') -p:AndroidApiLevel=$(AndroidDefaultTargetDotnetApiLevel) &quot;$(MSBuildThisFileDirectory)Microsoft.Android.Ref.proj&quot;" />
6262
</Target>
6363

6464
<Target Name="_CreatePreviewPacks"
65-
Condition=" '$(AndroidLatestStableApiLevel)' != '$(AndroidLatestUnstableApiLevel)' and Exists('$(_MonoAndroidNETOutputRoot)$(DotNetAndroidTargetFramework)$(AndroidLatestUnstableApiLevel)\Mono.Android.dll') ">
65+
Condition=" '$(AndroidLatestStableApiLevel)' != '$(AndroidLatestUnstableApiLevel)' and Exists('$(_MonoAndroidNETOutputRoot)$(AndroidLatestUnstableApiLevel)\Mono.Android.dll') ">
6666
<Exec Command="&quot;$(DotNetPreviewTool)&quot; pack @(_GlobalProperties, ' ') -p:AndroidApiLevel=$(AndroidLatestUnstableApiLevel) -p:AndroidRID=android-arm &quot;$(MSBuildThisFileDirectory)Microsoft.Android.Runtime.proj&quot;" />
6767
<Exec Command="&quot;$(DotNetPreviewTool)&quot; pack @(_GlobalProperties, ' ') -p:AndroidApiLevel=$(AndroidLatestUnstableApiLevel) -p:AndroidRID=android-arm64 &quot;$(MSBuildThisFileDirectory)Microsoft.Android.Runtime.proj&quot;" />
6868
<Exec Command="&quot;$(DotNetPreviewTool)&quot; pack @(_GlobalProperties, ' ') -p:AndroidApiLevel=$(AndroidLatestUnstableApiLevel) -p:AndroidRID=android-x86 &quot;$(MSBuildThisFileDirectory)Microsoft.Android.Runtime.proj&quot;" />
@@ -95,7 +95,6 @@
9595
<_WLManifest Include="$(XamarinAndroidSourcePath)bin\Build$(Configuration)\nuget-unsigned\Microsoft.NET.Sdk.Android.Manifest-*.nupkg" />
9696
</ItemGroup>
9797
<PropertyGroup>
98-
<_WLPackVersion>@(_WLManifest->'%(Filename)'->Replace('Microsoft.NET.Sdk.Android.Manifest-$(DotNetAndroidManifestVersionBand).', ''))</_WLPackVersion>
9998
<_SdkManifestsFolder>$(DotNetPreviewPath)sdk-manifests\$(DotNetSdkManifestsFolder)\</_SdkManifestsFolder>
10099
</PropertyGroup>
101100
<Unzip
@@ -119,7 +118,7 @@
119118

120119
<!-- dotnet workload install android -->
121120
<PropertyGroup>
122-
<_TempDirectory>$(DotNetPreviewPath)..\.xa-workload-temp-$([System.IO.Path]::GetRandomFileName())</_TempDirectory>
121+
<_TempDirectory>$(IntermediateOutputPath).xa-workload-temp-$([System.IO.Path]::GetRandomFileName())</_TempDirectory>
123122
</PropertyGroup>
124123
<ItemGroup>
125124
<_NuGetSources Include="$(OutputPath.TrimEnd('\'))" />
@@ -137,7 +136,6 @@
137136
<Exec
138137
Command="&quot;$(DotNetPreviewTool)&quot; workload install @(_InstallArguments, ' ')"
139138
WorkingDirectory="$(_TempDirectory)"
140-
EnvironmentVariables="DOTNET_MULTILEVEL_LOOKUP=0"
141139
/>
142140
<RemoveDir Directories="$(_TempDirectory)" />
143141
</Target>
@@ -204,4 +202,89 @@
204202
/>
205203
</Target>
206204

205+
<!-- Targets for setting up a local workload test environment without needing to pack .nupkg files -->
206+
<ItemGroup>
207+
<_FrameworkListInputs Include="$(MicrosoftAndroidRefPackDir)**" />
208+
<_FrameworkListOutputs Include="$(BuildOutputDirectory)lib\packs\Microsoft.Android.Ref.$(AndroidDefaultTargetDotnetApiLevel)\$(AndroidPackVersion)\data\FrameworkList.xml" />
209+
<_FrameworkListOutputs Include="$(BuildOutputDirectory)lib\packs\Microsoft.Android.Ref.$(AndroidLatestStableApiLevel)\$(AndroidPackVersion)\data\FrameworkList.xml" />
210+
<_FrameworkListOutputs Include="$(BuildOutputDirectory)lib\packs\Microsoft.Android.Ref.$(AndroidLatestUnstableApiLevel)\$(AndroidPackVersion)\data\FrameworkList.xml" />
211+
<_RuntimeListInputs Include="$(MicrosoftAndroidArmPackDir)**" />
212+
<_RuntimeListInputs Include="$(MicrosoftAndroidArm64PackDir)**" />
213+
<_RuntimeListInputs Include="$(MicrosoftAndroidx86PackDir)**" />
214+
<_RuntimeListInputs Include="$(MicrosoftAndroidx64PackDir)**" />
215+
<_RuntimeListOutputs Include="@(AndroidSupportedTargetJitAbi->'$(BuildOutputDirectory)lib\packs\Microsoft.Android.Runtime.$(AndroidDefaultTargetDotnetApiLevel).%(AndroidRID)\$(AndroidPackVersion)\data\RuntimeList.xml')" AndroidRID="%(AndroidRID)" />
216+
<_RuntimeListOutputs Include="@(AndroidSupportedTargetJitAbi->'$(BuildOutputDirectory)lib\packs\Microsoft.Android.Runtime.$(AndroidLatestStableApiLevel).%(AndroidRID)\$(AndroidPackVersion)\data\RuntimeList.xml')" AndroidRID="%(AndroidRID)" />
217+
<_RuntimeListOutputs Include="@(AndroidSupportedTargetJitAbi->'$(BuildOutputDirectory)lib\packs\Microsoft.Android.Runtime.$(AndroidLatestUnstableApiLevel).%(AndroidRID)\$(AndroidPackVersion)\data\RuntimeList.xml')" AndroidRID="%(AndroidRID)" />
218+
<_TemplatesInputs Include="$(XamarinAndroidSourcePath)src\Microsoft.Android.Templates\**" />
219+
<_TemplatesOutputs Include="$(BuildOutputDirectory)lib\template-packs\Microsoft.Android.Templates.$(AndroidPackVersion).nupkg" />
220+
</ItemGroup>
221+
222+
<Target Name="CreateLocalRuntimeLists"
223+
Inputs="$(MSBuildThisFile);@(_RuntimeListInputs)"
224+
Outputs="@(_RuntimeListOutputs)">
225+
<MSBuild
226+
Projects="$(MSBuildThisFileDirectory)Microsoft.Android.Runtime.proj"
227+
Properties="FrameworkListFile=%(_RuntimeListOutputs.Identity);AndroidRID=%(_RuntimeListOutputs.AndroidRID)"
228+
Targets="_GetRuntimePackItems;_GenerateFrameworkListFile"
229+
/>
230+
</Target>
231+
232+
<Target Name="CreateLocalFrameworkLists"
233+
Inputs="$(MSBuildThisFile);@(_FrameworkListInputs)"
234+
Outputs="@(_FrameworkListOutputs)">
235+
<MSBuild
236+
Projects="$(MSBuildThisFileDirectory)Microsoft.Android.Ref.proj"
237+
Properties="FrameworkListFile=%(_FrameworkListOutputs.Identity)"
238+
Targets="_GetTargetingPackItems;_GenerateFrameworkListFile"
239+
/>
240+
</Target>
241+
242+
<Target Name="PackAndCopyTemplates"
243+
Inputs="@(_TemplatesInputs)"
244+
Outputs="@(_TemplatesOutputs)">
245+
<ItemGroup>
246+
<_PackProps Include="-v:n -c $(Configuration)" />
247+
<_PackProps Include="-p:IncludeSymbols=False" />
248+
<_PackProps Include="-p:OutputPath=$(DotNetPreviewPath)template-packs" />
249+
<_PackProps Include="-p:TemplatePackVersion=$(AndroidPackVersion)" />
250+
</ItemGroup>
251+
<Exec Command="&quot;$(DotNetPreviewTool)&quot; pack @(_PackProps, ' ') &quot;$(XamarinAndroidSourcePath)src\Microsoft.Android.Templates\Microsoft.Android.Templates.csproj&quot;" />
252+
</Target>
253+
254+
<Target Name="InstallManifestAndDependencies">
255+
<PropertyGroup>
256+
<_LocalSdkManifestsFolder>$(BuildOutputDirectory)lib\sdk-manifests\$(DotNetSdkManifestsFolder)\</_LocalSdkManifestsFolder>
257+
<_LocalAndroidManifestFolder>$(_LocalSdkManifestsFolder)microsoft.net.sdk.android\</_LocalAndroidManifestFolder>
258+
<_EmptyWorkloadDir>$(_LocalSdkManifestsFolder)android.deps.workload\</_EmptyWorkloadDir>
259+
<_EmptyWorkloadJsonContent>
260+
<![CDATA[
261+
{"version": "0.0.1", "workloads": { "android-deps": { "extends" : [ "microsoft-net-runtime-android", "microsoft-net-runtime-android-aot" ] } } }
262+
]]>
263+
</_EmptyWorkloadJsonContent>
264+
</PropertyGroup>
265+
<MakeDir Directories="$(_LocalAndroidManifestFolder)" />
266+
<MSBuild
267+
Projects="$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.Android.proj"
268+
Properties="WorkloadManifestJsonPath=$(_LocalAndroidManifestFolder)WorkloadManifest.json;WorkloadManifestTargetsPath=$(_LocalAndroidManifestFolder)WorkloadManifest.targets;WorkloadVersion=$(AndroidPackVersion)"
269+
Targets="_GenerateXAWorkloadContent"
270+
/>
271+
<!-- Create empty workload to install dotnet/runtime dependencies -->
272+
<MakeDir Directories="$(_EmptyWorkloadDir)" />
273+
<WriteLinesToFile
274+
File="$(_EmptyWorkloadDir)WorkloadManifest.json"
275+
Lines="$(_EmptyWorkloadJsonContent)"
276+
Overwrite="true"
277+
/>
278+
<Exec
279+
Command="&quot;$(DotNetPreviewTool)&quot; workload install android-deps --configfile &quot;$(XamarinAndroidSourcePath)NuGet.config&quot; --skip-manifest-update --verbosity diag"
280+
EnvironmentVariables="DOTNETSDK_WORKLOAD_MANIFEST_ROOTS=$(BuildOutputDirectory)lib\sdk-manifests"
281+
WorkingDirectory="$(XamarinAndroidSourcePath)"
282+
/>
283+
</Target>
284+
285+
<PropertyGroup>
286+
<ConfigureLocalWorkloadDependsOn Condition="'$(RunningOnCI)' != 'true'">CreateLocalFrameworkLists;CreateLocalRuntimeLists;PackAndCopyTemplates;InstallManifestAndDependencies</ConfigureLocalWorkloadDependsOn>
287+
</PropertyGroup>
288+
<Target Name="ConfigureLocalWorkload" DependsOnTargets="$(ConfigureLocalWorkloadDependsOn)" />
289+
207290
</Project>

build-tools/create-packs/Microsoft.Android.Ref.proj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Microsoft.Android.Ref.proj
44
55
This project file is used to create the Microsoft.Android.Ref.[API] NuGet, which is the
66
targeting pack containing reference assemblies and other compile time assets required
7-
by projects that use the Microsoft.Android framework in .NET 5.
7+
by projects that use the Microsoft.Android framework in .NET 6+.
88
***********************************************************************************************
99
-->
1010
<Project Sdk="Microsoft.Build.NoTargets">
@@ -27,23 +27,23 @@ by projects that use the Microsoft.Android framework in .NET 5.
2727
<Target Name="_GetTargetingPackItems"
2828
DependsOnTargets="AssembleApiDocs;_GetLicense">
2929
<PropertyGroup>
30-
<FrameworkListFile>$(IntermediateOutputPath)FrameworkList.xml</FrameworkListFile>
30+
<FrameworkListFile Condition="'$(FrameworkListFile)' == ''">$(IntermediateOutputPath)FrameworkList.xml</FrameworkListFile>
3131
</PropertyGroup>
3232

3333
<ItemGroup>
3434
<_AndroidRefPackAssemblies Include="$(JavaInteropSourceDirectory)\bin\$(Configuration)-net7.0\ref\Java.Interop.dll" />
35-
<_AndroidRefPackAssemblies Include="$(_MonoAndroidNETOutputRoot)$(DotNetAndroidTargetFramework)$(AndroidApiLevel)\ref\Mono.Android.dll" />
35+
<_AndroidRefPackAssemblies Include="$(_MonoAndroidNETDefaultOutDir)ref\Mono.Android.dll" />
3636
<!-- Always include stable Mono.Android.Export.dll -->
37-
<_AndroidRefPackAssemblies Include="$(_MonoAndroidNETOutputRoot)$(DotNetAndroidTargetFramework)$(AndroidLatestStableApiLevel)\ref\Mono.Android.Export.dll" />
37+
<_AndroidRefPackAssemblies Include="$(_MonoAndroidNETOutputRoot)$(AndroidLatestStableApiLevel)\ref\Mono.Android.Export.dll" />
3838
<FrameworkListFileClass Include="@(_AndroidRefPackAssemblies->'%(Filename)%(Extension)')" Profile="Android" />
3939
</ItemGroup>
4040

4141
<ItemGroup>
4242
<_PackageFiles Include="@(_AndroidRefPackAssemblies)" PackagePath="$(_AndroidRefPackAssemblyPath)" TargetPath="$(_AndroidRefPackAssemblyPath)" />
43-
<_PackageFiles Include="$(_MonoAndroidNETOutputRoot)$(DotNetAndroidTargetFramework)$(AndroidApiLevel)\Java.Interop.xml" PackagePath="$(_AndroidRefPackAssemblyPath)" />
44-
<_PackageFiles Include="$(_MonoAndroidNETOutputRoot)$(DotNetAndroidTargetFramework)$(AndroidApiLevel)\Mono.Android.xml" PackagePath="$(_AndroidRefPackAssemblyPath)" />
45-
<_PackageFiles Include="$(_MonoAndroidNETOutputRoot)$(DotNetAndroidTargetFramework)$(AndroidApiLevel)\mono.android.jar" PackagePath="$(_AndroidRefPackAssemblyPath)" />
46-
<_PackageFiles Include="$(_MonoAndroidNETOutputRoot)$(DotNetAndroidTargetFramework)$(AndroidApiLevel)\mono.android.dex" PackagePath="$(_AndroidRefPackAssemblyPath)" />
43+
<_PackageFiles Include="$(_MonoAndroidNETDefaultOutDir)Java.Interop.xml" PackagePath="$(_AndroidRefPackAssemblyPath)" />
44+
<_PackageFiles Include="$(_MonoAndroidNETDefaultOutDir)Mono.Android.xml" PackagePath="$(_AndroidRefPackAssemblyPath)" />
45+
<_PackageFiles Include="$(_MonoAndroidNETDefaultOutDir)mono.android.jar" PackagePath="$(_AndroidRefPackAssemblyPath)" />
46+
<_PackageFiles Include="$(_MonoAndroidNETDefaultOutDir)mono.android.dex" PackagePath="$(_AndroidRefPackAssemblyPath)" />
4747
</ItemGroup>
4848
</Target>
4949

0 commit comments

Comments
 (0)