Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6e46587
Update dependencies from https://github.com/xamarin/xamarin-android b…
dotnet-maestro[bot] Jun 24, 2021
2f8ca34
[build] set %TEMP% and %TMP%
jonathanpeppers Jun 24, 2021
c4c2d1f
Update dependencies from https://github.com/xamarin/xamarin-android b…
dotnet-maestro[bot] Jun 25, 2021
418e26a
Update dependencies from https://github.com/xamarin/xamarin-android b…
dotnet-maestro[bot] Jun 26, 2021
4246aca
Merge branch 'main' into darc-main-9d46297c-7973-476a-b29b-e70150a67406
rmarinho Jun 28, 2021
9861a64
Update dependencies from https://github.com/xamarin/xamarin-android b…
dotnet-maestro[bot] Jun 29, 2021
ef7ae19
Update dependencies from https://github.com/xamarin/xamarin-macios bu…
dotnet-maestro[bot] Jun 29, 2021
c87bab4
Enable runtimeconfig.json support
jonathanpeppers Jun 29, 2021
9c2ed6a
Merge branch 'main' into darc-main-9d46297c-7973-476a-b29b-e70150a67406
jonathanpeppers Jun 29, 2021
7e10ac4
Install `microsoft-net-runtime-maccatalyst` manually
jonathanpeppers Jun 29, 2021
18d444a
Revert "Install `microsoft-net-runtime-maccatalyst` manually"
jonathanpeppers Jun 29, 2021
08a1873
Manually patch MacCatalyst & iOS workload files
jonathanpeppers Jun 29, 2021
904008d
Set %TMP% and %TEMP% in another spot
jonathanpeppers Jun 30, 2021
6eeee59
For now, include missing workload in maui-maccatalyst
jonathanpeppers Jun 30, 2021
b33c423
Update dependencies from https://github.com/xamarin/xamarin-android b…
dotnet-maestro[bot] Jun 30, 2021
4236336
Update dependencies from https://github.com/xamarin/xamarin-macios bu…
dotnet-maestro[bot] Jun 30, 2021
0d28fed
Revert "For now, include missing workload in maui-maccatalyst"
jonathanpeppers Jun 30, 2021
da2a11b
No longer need to patch microsoft.net.sdk.maccatalyst/WorkloadManifes…
jonathanpeppers Jun 30, 2021
0421025
Use --temp-dir switch instead of $TMP/$TEMP env vars
jonathanpeppers Jun 30, 2021
4e319f7
[essentials] use AssemblyMetadata w/ IsTrimmable instead of Linkersafe
jonathanpeppers Jul 1, 2021
85853cb
Update dependencies from https://github.com/xamarin/xamarin-android b…
dotnet-maestro[bot] Jul 1, 2021
36770b2
Merge remote-tracking branch 'origin/main' into darc-main-9d46297c-79…
mattleibow Jul 1, 2021
6fc0547
Merge remote-tracking branch 'origin/main' into darc-main-9d46297c-79…
mattleibow Jul 1, 2021
c5cdfee
Update dependencies from https://github.com/xamarin/xamarin-android b…
dotnet-maestro[bot] Jul 2, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
<PropertyGroup Condition=" '$(CI)' == 'true' ">
<PublishTrimmed Condition=" '$(TargetFramework)' == 'net6.0-ios' or '$(TargetFramework)' == 'net6.0-maccatalyst' ">false</PublishTrimmed>
</PropertyGroup>
<!-- Temporarily disable runtimeconfig.json under .NET framework MSBuild -->
<PropertyGroup Condition=" '$(MSBuildRuntimeType)' == 'Full' and ('$(TargetFramework)' == 'net6.0-android' or '$(TargetFramework)' == 'net6.0-ios' or '$(TargetFramework)' == 'net6.0-maccatalyst') ">
<GenerateRuntimeConfigurationFiles>false</GenerateRuntimeConfigurationFiles>
</PropertyGroup>

<PropertyGroup Condition="'$(SingleProject)' == 'true'">
<!-- Required - Enable Launch Profiles for .NET 6 iOS/Android -->
Expand Down
28 changes: 14 additions & 14 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="6.0.100-preview.6.21313.2" CoherentParentDependency="Microsoft.Android.Sdk.Windows">
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="6.0.100-preview.6.21351.1" CoherentParentDependency="Microsoft.Android.Sdk.Windows">
<Uri>https://github.com/dotnet/installer</Uri>
<Sha>abb57b4610404b011c76ca8ea1d7ab40c58991d4</Sha>
<Sha>1360c44a086dddc90f0634f5e77281b2bd41b512</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="6.0.0-preview.6.21306.1" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Dependency Name="Microsoft.NETCore.App.Ref" Version="6.0.0-preview.6.21325.12" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>5b8e1780ad7740e632c285bc2af13a8d0b20c5a9</Sha>
<Sha>d4baa2bd2b009cdd0886bba925ce32517041bfa0</Sha>
</Dependency>
<Dependency Name="Microsoft.Android.Sdk.Windows" Version="30.0.100-preview.6.51">
<Dependency Name="Microsoft.Android.Sdk.Windows" Version="30.0.100-preview.6.61">
<Uri>https://github.com/xamarin/xamarin-android</Uri>
<Sha>05c0426dc2d52a2ab32c04528d0bbeeebafb2664</Sha>
<Sha>ac0333b7828fd72de2afb43c67d8212f18d5be43</Sha>
</Dependency>
<Dependency Name="Microsoft.MacCatalyst.Sdk" Version="15.0.100-preview.6.60">
<Dependency Name="Microsoft.MacCatalyst.Sdk" Version="15.0.100-preview.6.62">
<Uri>https://github.com/xamarin/xamarin-macios</Uri>
<Sha>f1a9961839e4e1bc8adbbea4e2aee0f1808392cc</Sha>
<Sha>52cb862052e3b855fb21b47a097e8018c9938216</Sha>
</Dependency>
<Dependency Name="Microsoft.iOS.Sdk" Version="15.0.100-preview.6.60">
<Dependency Name="Microsoft.iOS.Sdk" Version="15.0.100-preview.6.62">
<Uri>https://github.com/xamarin/xamarin-macios</Uri>
<Sha>f1a9961839e4e1bc8adbbea4e2aee0f1808392cc</Sha>
<Sha>52cb862052e3b855fb21b47a097e8018c9938216</Sha>
</Dependency>
<Dependency Name="Microsoft.tvOS.Sdk" Version="15.0.100-preview.6.60">
<Dependency Name="Microsoft.tvOS.Sdk" Version="15.0.100-preview.6.62">
<Uri>https://github.com/xamarin/xamarin-macios</Uri>
<Sha>f1a9961839e4e1bc8adbbea4e2aee0f1808392cc</Sha>
<Sha>52cb862052e3b855fb21b47a097e8018c9938216</Sha>
</Dependency>
<Dependency Name="Microsoft.macOS.Sdk" Version="12.0.100-preview.6.60">
<Dependency Name="Microsoft.macOS.Sdk" Version="12.0.100-preview.6.62">
<Uri>https://github.com/xamarin/xamarin-macios</Uri>
<Sha>f1a9961839e4e1bc8adbbea4e2aee0f1808392cc</Sha>
<Sha>52cb862052e3b855fb21b47a097e8018c9938216</Sha>
</Dependency>
</ProductDependencies>
</Dependencies>
14 changes: 7 additions & 7 deletions eng/Versions.props
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project>
<!--Package versions-->
<PropertyGroup>
<MicrosoftDotnetSdkInternalPackageVersion>6.0.100-preview.6.21313.2</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>6.0.0-preview.6.21306.1</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftAndroidSdkWindowsPackageVersion>30.0.100-preview.6.51</MicrosoftAndroidSdkWindowsPackageVersion>
<MicrosoftMacCatalystSdkPackageVersion>15.0.100-preview.6.60</MicrosoftMacCatalystSdkPackageVersion>
<MicrosoftiOSSdkPackageVersion>15.0.100-preview.6.60</MicrosoftiOSSdkPackageVersion>
<MicrosofttvOSSdkPackageVersion>15.0.100-preview.6.60</MicrosofttvOSSdkPackageVersion>
<MicrosoftmacOSSdkPackageVersion>12.0.100-preview.6.60</MicrosoftmacOSSdkPackageVersion>
<MicrosoftDotnetSdkInternalPackageVersion>6.0.100-preview.6.21351.1</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>6.0.0-preview.6.21325.12</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftAndroidSdkWindowsPackageVersion>30.0.100-preview.6.61</MicrosoftAndroidSdkWindowsPackageVersion>
<MicrosoftMacCatalystSdkPackageVersion>15.0.100-preview.6.62</MicrosoftMacCatalystSdkPackageVersion>
<MicrosoftiOSSdkPackageVersion>15.0.100-preview.6.62</MicrosoftiOSSdkPackageVersion>
<MicrosofttvOSSdkPackageVersion>15.0.100-preview.6.62</MicrosofttvOSSdkPackageVersion>
<MicrosoftmacOSSdkPackageVersion>12.0.100-preview.6.62</MicrosoftmacOSSdkPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Trim all characters after first `-` or `+` is encountered. -->
Expand Down
26 changes: 24 additions & 2 deletions src/DotNet/DotNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
</_ProvisionDependsOn>
</PropertyGroup>

<Import Project="$(MauiRootDirectory)eng/ReplaceText.targets" />

<!-- Build target provisions ./bin/dotnet/ -->
<Target Name="_Provision" BeforeTargets="Build" DependsOnTargets="$(_ProvisionDependsOn)" />

Expand Down Expand Up @@ -84,8 +86,8 @@
</PropertyGroup>
<WriteLinesToFile File="$(_NuGetConfig)" Lines="$(_NuGetContent)" Overwrite="true" />
<Exec
Command="&quot;$(_ThisDotNet)&quot; workload install maui --skip-manifest-update --verbosity diag --temp-dir $(DotNetTempDirectory)"
WorkingDirectory="$(DotNetTempDirectory)"
Command="&quot;$(_ThisDotNet)&quot; workload install maui --skip-manifest-update --verbosity diag"
/>
<Delete Files="$(_NuGetConfig)" />

Expand Down Expand Up @@ -171,6 +173,26 @@
VersionBand="$(DotNetPreviewVersionBand)"
/>

<!-- HACK: temporary fixes for iOS and MacCatalyst workloads -->
<ReplaceText
Input="$(DotNetSdkManifestsDirectory)microsoft.net.workload.mono.toolchain/WorkloadManifest.targets"
Output="$(DotNetSdkManifestsDirectory)microsoft.net.workload.mono.toolchain/WorkloadManifest.targets"
OldValue="Sdk=&quot;Microsoft.NETCore.App.Runtime.AOT.Cross.maccatalyst&quot;"
NewValue="Condition=&quot;%24([MSBuild]::IsOSPlatform('osx'))&quot; Sdk=&quot;Microsoft.NETCore.App.Runtime.AOT.Cross.maccatalyst&quot;"
/>
<ReplaceText
Input="$(DotNetSdkManifestsDirectory)microsoft.net.workload.mono.toolchain/WorkloadManifest.targets"
Output="$(DotNetSdkManifestsDirectory)microsoft.net.workload.mono.toolchain/WorkloadManifest.targets"
OldValue="Sdk=&quot;Microsoft.NETCore.App.Runtime.AOT.Cross.ios-arm&quot;"
NewValue="Condition=&quot;%24([MSBuild]::IsOSPlatform('osx'))&quot; Sdk=&quot;Microsoft.NETCore.App.Runtime.AOT.Cross.ios-arm&quot;"
/>
<ReplaceText
Input="$(DotNetSdkManifestsDirectory)microsoft.net.workload.mono.toolchain/WorkloadManifest.targets"
Output="$(DotNetSdkManifestsDirectory)microsoft.net.workload.mono.toolchain/WorkloadManifest.targets"
OldValue="Sdk=&quot;Microsoft.NETCore.App.Runtime.AOT.Cross.ios-arm64&quot;"
NewValue="Condition=&quot;%24([MSBuild]::IsOSPlatform('osx'))&quot; Sdk=&quot;Microsoft.NETCore.App.Runtime.AOT.Cross.ios-arm64&quot;"
/>
Comment on lines +177 to +194
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/cc @Redth @steveisok

I had to manually patch up microsoft.net.workload.mono.toolchain/WorkloadManifest.targets for iOS and MacCatalyst projects to be able to build on Windows.

These AOT packs have platforms limiting to osx:

https://github.com/dotnet/runtime/blob/685eda620e0f058b157b6d0a66da6f21c2d165fa/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.json.in#L55

And so on Windows, imports such as these would fail:

https://github.com/dotnet/runtime/blob/685eda620e0f058b157b6d0a66da6f21c2d165fa/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.targets#L23-L25

Not sure if we should merge without this fixed, as it would probably break anyone doing maui-check --main.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created an issue on the runtime end and we'll see what we can do.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you try to build an iOS or Mac Catalyst project on Windows right now, you'll hit:

C:\src\maui\bin\dotnet\sdk-manifests\6.0.100\microsoft.net.workload.mono.toolchain\WorkloadManifest.targets(23,9): error : C:\src\maui\bin\dotnet\sdk\6.0.100-preview.6.21328.1\Sdks\Microsoft.NETCore.App.Runtime.AOT.Cross.ios-arm\Sdk not found. Check that a recent enough .NET SDK is installed and/or increase the version specified in global.json.
C:\src\maui\bin\dotnet\sdk-manifests\6.0.100\microsoft.net.workload.mono.toolchain\WorkloadManifest.targets(24,9): error : C:\src\maui\bin\dotnet\sdk\6.0.100-preview.6.21328.1\Sdks\Microsoft.NETCore.App.Runtime.AOT.Cross.ios-arm64\Sdk not found. Check that a recent enough .NET SDK is installed and/or increase the version specified in global.json.
C:\src\maui\bin\dotnet\sdk-manifests\6.0.100\microsoft.net.workload.mono.toolchain\WorkloadManifest.targets(29,9): error : C:\src\maui\bin\dotnet\sdk\6.0.100-preview.6.21328.1\Sdks\Microsoft.NETCore.App.Runtime.AOT.Cross.maccatalyst\Sdk not found. Check that a recent enough .NET SDK is installed and/or increase the version specified in global.json.


<Touch Files="$(DotNetSdkManifestsDirectory).stamp" AlwaysCreate="true" />
</Target>

Expand All @@ -179,7 +201,7 @@
Inputs="$(_Inputs)"
Outputs="$(DotNetPacksDirectory).stamp">
<Exec
Command="&quot;$(DotNetToolPath)&quot; workload install %(_WorkloadIds.Identity) --skip-manifest-update --verbosity diag"
Command="&quot;$(DotNetToolPath)&quot; workload install @(_WorkloadIds, ' ') --skip-manifest-update --verbosity diag --temp-dir $(DotNetTempDirectory)"
Comment on lines -182 to +204
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

WorkingDirectory="$(MauiRootDirectory)"
/>
<Touch Files="$(DotNetPacksDirectory).stamp" AlwaysCreate="true" />
Expand Down
4 changes: 2 additions & 2 deletions src/Essentials/src/AssemblyInfo/AssemblyInfo.android.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
using Android;
using System.Reflection;

[assembly: LinkerSafe]
[assembly: AssemblyMetadata("IsTrimmable", "True")]