diff --git a/Configuration.props b/Configuration.props
index 41a4eb577ca..44439cadb26 100644
--- a/Configuration.props
+++ b/Configuration.props
@@ -72,6 +72,7 @@
5.0.100
$(DotNetPreviewVersionBand)-rtm.20509.5
+ $(AndroidToolchainDirectory)\wix\
3.10.2
$(AndroidCmakeVersion).4988404
$(AndroidSdkDirectory)\cmake\$(AndroidCmakeVersionPath)
diff --git a/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/ConvertToRichText.cs b/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/ConvertToRichText.cs
new file mode 100644
index 00000000000..98c03bdd0d1
--- /dev/null
+++ b/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/ConvertToRichText.cs
@@ -0,0 +1,57 @@
+using System;
+using System.IO;
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+
+namespace Xamarin.Android.Tools.BootstrapTasks
+{
+ ///
+ /// Used for converting plain text license files to .rtf format.
+ /// Assumes the file is line wrapped with Environment.NewLine:
+ /// * Double new lines are preserved.
+ /// * Single new lines are replaced with spaces.
+ ///
+ /// For a Unicode escape the control word \u is used, followed by
+ /// a 16-bit signed decimal integer giving the Unicode UTF-16 code
+ /// unit number. More information under 'Character encoding' here:
+ /// https://en.wikipedia.org/wiki/Rich_Text_Format
+ ///
+ public class ConvertToRichText : Task
+ {
+ [Required]
+ public string SourceFile { get; set; }
+
+ [Required]
+ public string DestinationFile { get; set; }
+
+ public override bool Execute ()
+ {
+ var text = File.ReadAllText (SourceFile);
+
+ text = text
+ .Replace (@"\", @"\\")
+ .Replace ("{", @"\{")
+ .Replace ("}", @"\}")
+ // Only want to keep "double" new lines
+ .Replace (Environment.NewLine + Environment.NewLine, $@"\par{Environment.NewLine} \par{Environment.NewLine} ")
+ .Replace (Environment.NewLine, " ");
+
+ Directory.CreateDirectory (Path.GetDirectoryName (DestinationFile));
+ using (var writer = File.CreateText (DestinationFile)) {
+ writer.Write (@"{\rtf1\ansi\ansicpg1250\deff0{\fonttbl\f0\fcharset0 Courier New;}\f0\pard ");
+ foreach (char letter in text) {
+ if (letter <= 0x7f) {
+ writer.Write (letter);
+ } else {
+ writer.Write ("\\u");
+ writer.Write (Convert.ToUInt32 (letter));
+ writer.Write ("?");
+ }
+ }
+ writer.Write (" } ");
+ }
+
+ return !Log.HasLoggedErrors;
+ }
+ }
+}
diff --git a/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/GenerateWixFile.cs b/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/GenerateWixFile.cs
new file mode 100644
index 00000000000..ce4452468b9
--- /dev/null
+++ b/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/GenerateWixFile.cs
@@ -0,0 +1,188 @@
+using System.IO;
+using System.Linq;
+using System.Security.Cryptography;
+using System.Text;
+using System.Xml;
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+
+namespace Xamarin.Android.Tools.BootstrapTasks
+{
+ ///
+ /// Generates a .wix file for the contents of ~/android-toolchain/dotnet/packs
+ /// The .wix file can be used to generate the .msi installer for Windows.
+ ///
+ public class GenerateWixFile : Task
+ {
+ [Required]
+ public string Template { get; set; }
+
+ [Required]
+ public string DestinationFile { get; set; }
+
+ [Required]
+ public string DotNetPath { get; set; }
+
+ [Required]
+ public string DotNetVersion { get; set; }
+
+ [Required]
+ public string MSIVersion { get; set; }
+
+ public override bool Execute ()
+ {
+ var settings = new XmlWriterSettings {
+ OmitXmlDeclaration = true,
+ Indent = true,
+ };
+
+ var directories = new StringBuilder ();
+ var components = new StringBuilder ();
+ using (var packWriter = XmlWriter.Create (directories, settings))
+ using (var componentWriter = XmlWriter.Create (components, settings)) {
+
+ // Components
+ componentWriter.WriteStartElement ("ComponentGroup");
+ componentWriter.WriteAttributeString ("Id", "ProductComponents");
+ componentWriter.WriteStartElement ("ComponentRef");
+ componentWriter.WriteAttributeString ("Id", "EnableWorkloadResolver");
+ componentWriter.WriteEndElement (); //
+
+ // dotnet
+ packWriter.WriteStartElement ("Directory");
+ packWriter.WriteAttributeString ("Id", "dotnet");
+ packWriter.WriteAttributeString ("Name", "dotnet");
+
+ // sdk
+ packWriter.WriteStartElement ("Directory");
+ packWriter.WriteAttributeString ("Id", "sdk");
+ packWriter.WriteAttributeString ("Name", "sdk");
+
+ // DOTNETVERSION
+ packWriter.WriteStartElement ("Directory");
+ packWriter.WriteAttributeString ("Id", "DOTNETVERSION");
+ packWriter.WriteAttributeString ("Name", DotNetVersion);
+ packWriter.WriteAttributeString ("FileSource", Path.Combine (DotNetPath, "sdk", DotNetVersion));
+
+ // EnableWorkloadResolver
+ packWriter.WriteStartElement ("Component");
+ packWriter.WriteAttributeString ("Id", "EnableWorkloadResolver");
+ packWriter.WriteStartElement ("File");
+ packWriter.WriteAttributeString ("Id", "EnableWorkloadResolver");
+ packWriter.WriteAttributeString ("Name", "EnableWorkloadResolver.sentinel");
+ packWriter.WriteAttributeString ("KeyPath", "yes");
+ packWriter.WriteEndElement (); //
+ packWriter.WriteEndElement (); //
+ packWriter.WriteEndElement (); // DOTNETVERSION
+ packWriter.WriteEndElement (); // sdk
+
+ // sdk-manifests
+ var sdk_manifests_root = Path.Combine (DotNetPath, "sdk-manifests");
+ packWriter.WriteStartElement ("Directory");
+ packWriter.WriteAttributeString ("Id", "sdk_manifests");
+ packWriter.WriteAttributeString ("Name", "sdk-manifests");
+
+ // 5.0.100
+ var sdk_manifests = Directory.EnumerateDirectories (sdk_manifests_root).FirstOrDefault ();
+ if (string.IsNullOrEmpty (sdk_manifests)) {
+ Log.LogError ($"Cannot find child directory of: {sdk_manifests_root}");
+ return false;
+ }
+ var version_band = Path.GetFileName (sdk_manifests);
+ packWriter.WriteStartElement ("Directory");
+ packWriter.WriteAttributeString ("Id", "DOTNETVERSIONBAND");
+ packWriter.WriteAttributeString ("Name", version_band);
+ packWriter.WriteAttributeString ("FileSource", sdk_manifests);
+ var workload = Path.Combine (sdk_manifests, "Microsoft.NET.Workload.Android");
+ if (Directory.Exists (workload)) {
+ RecurseDirectory (sdk_manifests, packWriter, componentWriter, workload);
+ } else {
+ Log.LogError ($"Cannot find directory: {workload}");
+ return false;
+ }
+ packWriter.WriteEndElement (); // version_band
+ packWriter.WriteEndElement (); // sdk-manifests
+
+ // packs
+ var packs_dir = Path.Combine (DotNetPath, "packs");
+ packWriter.WriteStartElement ("Directory");
+ packWriter.WriteAttributeString ("Id", "packs");
+ packWriter.WriteAttributeString ("Name", "packs");
+ foreach (var directory in Directory.EnumerateDirectories (packs_dir, "Microsoft.Android.*")) {
+ RecurseDirectory (packs_dir, packWriter, componentWriter, directory);
+ }
+
+ packWriter.WriteEndDocument (); //
+ componentWriter.WriteEndDocument (); //
+ }
+
+ var template = File.ReadAllText (Template);
+ var contents = template
+ .Replace ("@MSIVERSION@", MSIVersion)
+ .Replace ("@DIRECTORIES@", directories.ToString ())
+ .Replace ("@COMPONENTS@", components.ToString ());
+
+ Log.LogMessage (MessageImportance.Low, "Writing XML to {0}: {1}", DestinationFile, contents);
+ File.WriteAllText (DestinationFile, contents);
+
+ return !Log.HasLoggedErrors;
+ }
+
+ static void RecurseDirectory (string top_dir, XmlWriter packWriter, XmlWriter componentWriter, string directory)
+ {
+ var directoryId = GetId (top_dir, directory);
+ packWriter.WriteStartElement ("Directory");
+ packWriter.WriteAttributeString ("Id", directoryId);
+ packWriter.WriteAttributeString ("Name", Path.GetFileName (directory));
+ packWriter.WriteAttributeString ("FileSource", directory);
+ foreach (var child in Directory.EnumerateDirectories (directory)) {
+ var directoryName = Path.GetFileName (child);
+ if (directoryName.StartsWith (".") || directoryName.StartsWith ("_"))
+ continue;
+ RecurseDirectory (top_dir, packWriter, componentWriter, child);
+ }
+ foreach (var file in Directory.EnumerateFiles (directory)) {
+ var fileName = Path.GetFileName (file);
+ if (fileName.StartsWith (".") || fileName.StartsWith ("_"))
+ continue;
+ var componentId = GetId (top_dir, file);
+ packWriter.WriteStartElement ("Component");
+ packWriter.WriteAttributeString ("Id", componentId);
+ packWriter.WriteStartElement ("File");
+ packWriter.WriteAttributeString ("Id", componentId);
+ packWriter.WriteAttributeString ("Name", Path.GetFileName (file));
+ packWriter.WriteAttributeString ("KeyPath", "yes");
+ packWriter.WriteEndElement (); //
+ packWriter.WriteEndElement (); //
+ componentWriter.WriteStartElement ("ComponentRef");
+ componentWriter.WriteAttributeString ("Id", componentId);
+ componentWriter.WriteEndElement (); //
+ }
+ packWriter.WriteEndElement (); //
+ }
+
+ static string GetId (string top_dir, string path)
+ {
+ if (string.IsNullOrEmpty (path))
+ return path;
+ if (path.Length > top_dir.Length + 1) {
+ path = path.Substring (top_dir.Length + 1);
+ }
+ return GetHashString (path);
+ }
+
+ static byte [] GetHash (string inputString)
+ {
+ using (var algorithm = SHA256.Create ())
+ return algorithm.ComputeHash (Encoding.UTF8.GetBytes (inputString));
+ }
+
+ static string GetHashString (string inputString)
+ {
+ var sb = new StringBuilder ("S", 65);
+ foreach (byte b in GetHash (inputString))
+ sb.Append (b.ToString ("X2"));
+ return sb.ToString ();
+ }
+ }
+}
diff --git a/build-tools/automation/azure-pipelines-oss.yaml b/build-tools/automation/azure-pipelines-oss.yaml
index e2847fc61ee..f701ff3e49f 100644
--- a/build-tools/automation/azure-pipelines-oss.yaml
+++ b/build-tools/automation/azure-pipelines-oss.yaml
@@ -103,8 +103,8 @@ stages:
displayName: make jenkins
- script: >
- echo "make create-installers V=1 CONFIGURATION=$(XA.Build.Configuration)" &&
- make create-installers V=1 CONFIGURATION=$(XA.Build.Configuration)
+ echo "make create-pkg create-vsix V=1 CONFIGURATION=$(XA.Build.Configuration)" &&
+ make create-pkg create-vsix V=1 CONFIGURATION=$(XA.Build.Configuration)
workingDirectory: $(Build.SourcesDirectory)
displayName: create installers
diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml
index 56b926aa4b4..522ffdbdd24 100644
--- a/build-tools/automation/azure-pipelines.yaml
+++ b/build-tools/automation/azure-pipelines.yaml
@@ -203,6 +203,13 @@ stages:
artifactName: $(TestAssembliesArtifactName)
targetPath: xamarin-android/bin/Test$(XA.Build.Configuration)
+ - task: MSBuild@1
+ displayName: pack all nupkgs
+ inputs:
+ solution: $(System.DefaultWorkingDirectory)/xamarin-android/build-tools/create-packs/Microsoft.Android.Sdk.proj
+ configuration: $(XA.Build.Configuration)
+ msbuildArguments: /t:CreateAllPacks /restore /p:NuGetLicense=$(System.DefaultWorkingDirectory)/xamarin-android/external/monodroid/tools/scripts/License.txt /bl:$(System.DefaultWorkingDirectory)/xamarin-android/bin/Build$(XA.Build.Configuration)/create-all-packs.binlog
+
# Create installers
- script: make create-installers V=1 CONFIGURATION=$(XA.Build.Configuration)
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android
@@ -227,13 +234,6 @@ stages:
artifactName: $(InstallerArtifactName)
targetPath: xamarin-android/bin/Build$(XA.Build.Configuration)/$(InstallerArtifactName)
- - task: MSBuild@1
- displayName: pack all nupkgs
- inputs:
- solution: $(System.DefaultWorkingDirectory)/xamarin-android/build-tools/create-packs/Microsoft.Android.Sdk.proj
- configuration: $(XA.Build.Configuration)
- msbuildArguments: /t:CreateAllPacks /restore /p:NuGetLicense=$(System.DefaultWorkingDirectory)/xamarin-android/external/monodroid/tools/scripts/License.txt /bl:$(System.DefaultWorkingDirectory)/xamarin-android/bin/Build$(XA.Build.Configuration)/create-all-packs.binlog
-
- task: NuGetCommand@2
displayName: push nupkgs
inputs:
@@ -1115,6 +1115,60 @@ stages:
- template: yaml-templates/fail-on-issue.yaml
+- stage: dotnet_installers
+ displayName: .NET 6 Preview Installers
+ dependsOn: mac_build
+ jobs:
+ # Check - "Xamarin.Android (.NET 6 Preview Installers Create .msi and Upload)"
+ - job: dotnet_preview_installers
+ displayName: Create .msi and Upload
+ pool: $(HostedWinVS2019)
+ workspace:
+ clean: all
+ steps:
+ - checkout: self
+ submodules: recursive
+
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ artifactName: $(NuGetArtifactName)
+ downloadPath: $(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\nupkgs
+
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ artifactName: $(InstallerArtifactName)
+ downloadPath: $(System.DefaultWorkingDirectory)\installer-artifacts
+ patterns: Microsoft.*.pkg
+
+ - task: MSBuild@1
+ displayName: msbuild Xamarin.Android.BootstrapTasks
+ inputs:
+ solution: Xamarin.Android.BootstrapTasks.sln
+ configuration: $(XA.Build.Configuration)
+ msbuildArguments: /restore /bl:$(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\msbuild-bootstraptasks.binlog
+
+ - task: MSBuild@1
+ displayName: msbuild /t:CreateWorkloadInstallers
+ inputs:
+ solution: Xamarin.Android.sln
+ configuration: $(XA.Build.Configuration)
+ msbuildArguments: /t:CreateWorkloadInstallers /bl:$(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\msbuild-workload.binlog
+
+ - script: copy /Y $(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\*.msi $(System.DefaultWorkingDirectory)\installer-artifacts
+ displayName: copy .msi
+
+ - template: upload-to-storage\win\v1.yml@yaml
+ parameters:
+ ArtifactsDirectory: $(System.DefaultWorkingDirectory)\installer-artifacts
+ Azure.ContainerName: $(Azure.Container.Name)
+ Azure.BlobPrefix: $(Build.DefinitionName)/public/$(Build.BuildId)/$(Build.SourceBranchName)/$(Build.SourceVersion)
+ GitHub.Context: .NET 6 Preview Installers
+
+ - template: yaml-templates/upload-results.yaml
+ parameters:
+ solution: build-tools\Xamarin.Android.Tools.BootstrapTasks\Xamarin.Android.Tools.BootstrapTasks.csproj
+ artifactName: Build Results - .NET 6 Preview Installers
+
- stage: finalize_installers
displayName: Finalize Installers
dependsOn: mac_build
@@ -1148,6 +1202,9 @@ stages:
inputs:
artifactName: $(InstallerArtifactName)
downloadPath: $(System.DefaultWorkingDirectory)/storage-artifacts
+ patterns: |
+ xamarin.android*.pkg
+ Xamarin.Android*.vsix
- powershell: |
$pkg = Get-ChildItem -Path "$(System.DefaultWorkingDirectory)/storage-artifacts/*" -Include *.pkg -File
diff --git a/build-tools/automation/yaml-templates/run-installer.yaml b/build-tools/automation/yaml-templates/run-installer.yaml
index 273ff1c43d5..bf09aeede15 100644
--- a/build-tools/automation/yaml-templates/run-installer.yaml
+++ b/build-tools/automation/yaml-templates/run-installer.yaml
@@ -6,6 +6,15 @@ steps:
inputs:
artifactName: $(InstallerArtifactName)
downloadPath: $(System.DefaultWorkingDirectory)
+ patterns: xamarin.android*.pkg
+ condition: and(succeeded(), eq(variables['agent.os'], 'Darwin'))
+
+- task: DownloadPipelineArtifact@2
+ inputs:
+ artifactName: $(InstallerArtifactName)
+ downloadPath: $(System.DefaultWorkingDirectory)
+ patterns: Xamarin.Android*.vsix
+ condition: and(succeeded(), eq(variables['agent.os'], 'Windows_NT'))
- powershell: |
$itemPattern = "*.vsix"
diff --git a/build-tools/create-dotnet-msi/Microsoft.NET.Workload.Android.wix.in b/build-tools/create-dotnet-msi/Microsoft.NET.Workload.Android.wix.in
new file mode 100644
index 00000000000..06be9352769
--- /dev/null
+++ b/build-tools/create-dotnet-msi/Microsoft.NET.Workload.Android.wix.in
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @DIRECTORIES@
+
+
+
+
+
+ @COMPONENTS@
+
+
+
diff --git a/build-tools/create-dotnet-msi/create-dotnet-msi.csproj b/build-tools/create-dotnet-msi/create-dotnet-msi.csproj
new file mode 100644
index 00000000000..a6b4cffdb95
--- /dev/null
+++ b/build-tools/create-dotnet-msi/create-dotnet-msi.csproj
@@ -0,0 +1,106 @@
+
+
+ netstandard2.0
+ false
+ ..\..\bin\Build$(Configuration)
+ <_WixTemplate>Microsoft.NET.Workload.Android.wix.in
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(DotNetPreviewPath)sdk-manifests\$(DotNetPreviewVersionBand)\Microsoft.NET.Workload.Android\LICENSE
+ <_LicenseDestination>$(IntermediateOutputPath)LICENSE.rtf
+ <_WixFile>$(IntermediateOutputPath)Microsoft.NET.Workload.Android.wix
+ <_WixObj>$(IntermediateOutputPath)Microsoft.NET.Workload.Android.wixobj
+ <_WixMsi>$(IntermediateOutputPath)Microsoft.NET.Workload.Android.msi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_IgnoredWarnings Include="-sice:ICE03" />
+
+ <_IgnoredWarnings Include="-sice:ICE61" />
+
+
+
+
+
+
+
+
+
diff --git a/build-tools/create-dotnet-pkg/create-dotnet-pkg.csproj b/build-tools/create-dotnet-pkg/create-dotnet-pkg.csproj
new file mode 100644
index 00000000000..7960aa01455
--- /dev/null
+++ b/build-tools/create-dotnet-pkg/create-dotnet-pkg.csproj
@@ -0,0 +1,82 @@
+
+
+ netstandard2.0
+ false
+ ..\..\bin\Build$(Configuration)
+
+
+
+
+
+
+ /
+ $(OutputPath)\pkg\archive
+ $(OutputPath)\pkg\packages
+ $(OutputPath)\pkg\resources
+ $(OutputPath)\pkg\distribution.xml
+ $(PkgResourcesPath)\en.lproj
+
+
+
+
+
+
+
+
+
+
+
+ $(DotNetPreviewPath)sdk-manifests\$(DotNetPreviewVersionBand)\Microsoft.NET.Workload.Android\LICENSE
+ $(PayloadDir)\usr\local\share\dotnet\
+
+
+ <_FilesToCopy Include="$(DotNetPreviewPath)\sdk\$(DotNetPreviewVersionFull)\EnableWorkloadResolver.sentinel" />
+ <_FilesToCopy Include="$(DotNetPreviewPath)\sdk-manifests\$(DotNetPreviewVersionBand)\Microsoft.NET.Workload.Android\**\*" />
+ <_FilesToCopy Include="$(DotNetPreviewPath)\packs\Microsoft.Android.Ref\**\*" />
+ <_FilesToCopy Include="$(DotNetPreviewPath)\packs\Microsoft.Android.Sdk\**\*" />
+
+
+
+
+
+
+
+
+ $(IntermediateOutputPath)Microsoft.NET.Workload.Android.pkg
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build-tools/create-dotnet-pkg/distribution.xml.in b/build-tools/create-dotnet-pkg/distribution.xml.in
new file mode 100644
index 00000000000..827da8bf9df
--- /dev/null
+++ b/build-tools/create-dotnet-pkg/distribution.xml.in
@@ -0,0 +1,18 @@
+
+
+
+ @PACKAGE_TITLE@
+
+
+
+
+
+
+
+
+
+
+
+
+ #microsoft.net.workload.android.pkg
+
\ No newline at end of file
diff --git a/build-tools/create-packs/Directory.Build.targets b/build-tools/create-packs/Directory.Build.targets
index bf5c25d63e7..65c9e2d1283 100644
--- a/build-tools/create-packs/Directory.Build.targets
+++ b/build-tools/create-packs/Directory.Build.targets
@@ -25,6 +25,23 @@
+
+
+ $(XamarinAndroidSourcePath)LICENSE
+ LICENSE
+
+
+
+
+
+ <_PackageFiles Include="$(IntermediateOutputPath)$(PackageLicenseFile)" PackagePath="\" />
+
+
+
@@ -105,6 +122,7 @@
/>
+
- $(XamarinAndroidSourcePath)\LICENSE
- $([System.IO.Path]::GetFileName($(NuGetLicense)))
_GetTargetingPackItems;
_GetDefaultPackageVersion;
@@ -31,13 +29,13 @@ by projects that use the Microsoft.Android framework in .NET 5.
-
+
$(IntermediateOutputPath)FrameworkList.xml
- <_PackageFiles Include="$(NuGetLicense)" PackagePath="\" />
<_PackageFiles Include="@(_AndroidAppRefAssemblies)" PackagePath="$(_AndroidRefPackAssemblyPath)" TargetPath="$(_AndroidRefPackAssemblyPath)" />
<_PackageFiles Include="$(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\netcoreapp3.1\mono.android.jar" PackagePath="$(_AndroidRefPackAssemblyPath)" />
<_PackageFiles Include="$(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\netcoreapp3.1\mono.android.dex" PackagePath="$(_AndroidRefPackAssemblyPath)" />
diff --git a/build-tools/create-packs/Microsoft.Android.Runtime.proj b/build-tools/create-packs/Microsoft.Android.Runtime.proj
index 0143a539bb2..6ada15ab5ec 100644
--- a/build-tools/create-packs/Microsoft.Android.Runtime.proj
+++ b/build-tools/create-packs/Microsoft.Android.Runtime.proj
@@ -24,8 +24,6 @@ projects that use the Microsoft.Android framework in .NET 5.
- $(XamarinAndroidSourcePath)\LICENSE
- $([System.IO.Path]::GetFileName($(NuGetLicense)))
_GetRuntimePackItems;
_GetDefaultPackageVersion;
@@ -34,7 +32,8 @@ projects that use the Microsoft.Android framework in .NET 5.
-
+
$(IntermediateOutputPath)$(AndroidRID)\RuntimeList.xml
@@ -48,7 +47,6 @@ projects that use the Microsoft.Android framework in .NET 5.
- <_PackageFiles Include="$(NuGetLicense)" PackagePath="\" />
<_PackageFiles Include="@(_AndroidAppPackAssemblies)" PackagePath="$(_AndroidRuntimePackAssemblyPath)" TargetPath="$(_AndroidRuntimePackAssemblyPath)" />
<_PackageFiles Include="@(_AndroidRuntimePackAssets)" PackagePath="$(_AndroidRuntimePackNativePath)" TargetPath="$(_AndroidRuntimePackNativePath)" IsNative="true" />
diff --git a/build-tools/create-packs/Microsoft.Android.Sdk.proj b/build-tools/create-packs/Microsoft.Android.Sdk.proj
index 4682e6678d5..5ad6d4a8ebc 100644
--- a/build-tools/create-packs/Microsoft.Android.Sdk.proj
+++ b/build-tools/create-packs/Microsoft.Android.Sdk.proj
@@ -26,8 +26,6 @@ sdk pack imported by Microsoft.NET.Workload.Android.
- $(XamarinAndroidSourcePath)\LICENSE
- $([System.IO.Path]::GetFileName($(NuGetLicense)))
_GenerateXASdkContent;
$(BeforePack);
@@ -35,7 +33,7 @@ sdk pack imported by Microsoft.NET.Workload.Android.
+ DependsOnTargets="ConstructInstallerItems;_GenerateBundledVersions;_GetLicense">
$(XamarinAndroidSourcePath)bin\Build$(Configuration)\packs\tools\
$(XamarinAndroidSourcePath)bin\$(Configuration)-netcoreapp3.1\
@@ -71,7 +69,6 @@ sdk pack imported by Microsoft.NET.Workload.Android.
Condition="$([MSBuild]::IsOSPlatform('osx')) or $([MSBuild]::IsOSPlatform('linux'))"
/>
- <_PackageFiles Include="$(NuGetLicense)" PackagePath="\" />
<_PackageFiles Include="$(ToolsSourceDir)**" PackagePath="tools" />
<_PackageFiles Include="$(NetCoreAppToolsSourceDir)generator.dll" PackagePath="tools" />
<_PackageFiles Include="$(NetCoreAppToolsSourceDir)generator.runtimeconfig.json" PackagePath="tools" />
diff --git a/build-tools/create-packs/Microsoft.NET.Workload.Android.proj b/build-tools/create-packs/Microsoft.NET.Workload.Android.proj
index 71fa9eb8886..72fb19321b9 100644
--- a/build-tools/create-packs/Microsoft.NET.Workload.Android.proj
+++ b/build-tools/create-packs/Microsoft.NET.Workload.Android.proj
@@ -20,8 +20,6 @@ workload manifest pack containing information about the various Microsoft.Androi
- $(XamarinAndroidSourcePath)\LICENSE
- $([System.IO.Path]::GetFileName($(NuGetLicense)))
_GenerateXAWorkloadContent;
$(BeforePack);
@@ -30,7 +28,7 @@ workload manifest pack containing information about the various Microsoft.Androi
+ DependsOnTargets="_GetDefaultPackageVersion;_GetLicense">
$(OutputPath)\workload-manifest\WorkloadManifest.targets
$(OutputPath)\workload-manifest\WorkloadManifest.json
@@ -80,7 +78,6 @@ workload manifest pack containing information about the various Microsoft.Androi
Overwrite="true" />
- <_PackageFiles Include="$(NuGetLicense)" PackagePath="\" />
<_PackageFiles Include="$(WorkloadManifestTargetsPath)" PackagePath="\" />
<_PackageFiles Include="$(WorkloadManifestJsonPath)" PackagePath="\" />
diff --git a/build-tools/scripts/DotNet.targets b/build-tools/scripts/DotNet.targets
index 5a3a86c98c5..7d0399922f6 100644
--- a/build-tools/scripts/DotNet.targets
+++ b/build-tools/scripts/DotNet.targets
@@ -1,17 +1,36 @@
+
+ <_Root>$(MSBuildThisFileDirectory)..\..\
+
-
- <_TopDir>$(MSBuildThisFileDirectory)..\..\
-
-
-
-
-
+
+
+
+
- <_OldPackages Include="$(_TopDir)packages\microsoft.android.*\**\*.nupkg" />
+ <_OldPackages Include="$(_Root)packages\microsoft.android.*\**\*.nupkg" />
<_DirectoriesToRemove Include="%(_OldPackages.RootDir)%(_OldPackages.Directory)" />
+
+
+
+
+
diff --git a/build-tools/scripts/Packaging.mk b/build-tools/scripts/Packaging.mk
index 7f244a2c93b..cd4a9cca154 100644
--- a/build-tools/scripts/Packaging.mk
+++ b/build-tools/scripts/Packaging.mk
@@ -1,4 +1,4 @@
-create-installers: create-pkg create-vsix
+create-installers: create-pkg create-vsix create-workload-installers
create-pkg:
MONO_IOMAP=all MONO_OPTIONS="$(MONO_OPTIONS)" $(call MSBUILD_BINLOG,create-pkg) /p:Configuration=$(CONFIGURATION) /t:CreatePkg \
@@ -10,6 +10,11 @@ create-pkg:
$(if $(USE_COMMERCIAL_INSTALLER_NAME),/p:UseCommercialInstallerName="$(USE_COMMERCIAL_INSTALLER_NAME)") \
$(if $(_MSBUILD_ARGS),"$(_MSBUILD_ARGS)")
+create-workload-installers:
+ MONO_IOMAP=all MONO_OPTIONS="$(MONO_OPTIONS)" $(call MSBUILD_BINLOG,create-workload-installers) /p:Configuration=$(CONFIGURATION) /t:CreateWorkloadInstallers \
+ Xamarin.Android.sln \
+ $(if $(_MSBUILD_ARGS),"$(_MSBUILD_ARGS)")
+
create-vsix:
MONO_IOMAP=all MONO_OPTIONS="$(MONO_OPTIONS)" $(call MSBUILD_BINLOG,create-vsix) /p:Configuration=$(CONFIGURATION) /p:CreateVsixContainer=True \
build-tools/create-vsix/create-vsix.csproj \
diff --git a/build-tools/scripts/XAVersionInfo.targets b/build-tools/scripts/XAVersionInfo.targets
index 0b73a7ba566..8b6f123056e 100644
--- a/build-tools/scripts/XAVersionInfo.targets
+++ b/build-tools/scripts/XAVersionInfo.targets
@@ -88,6 +88,7 @@
<_AndroidPackBranch>$([System.Text.RegularExpressions.Regex]::Replace('$(XAVersionBranch)', '[^a-zA-Z0-9-]', '-'))
<_AndroidPackLabel Condition=" '$(_AndroidPackLabel)' == '' ">ci.$(_AndroidPackBranch).$(PackVersionCommitCount)
$(AndroidPackVersion)-$(_AndroidPackLabel)
+ $(AndroidPackVersion).$(PackVersionCommitCount)