Skip to content

Commit b017856

Browse files
Changes for sample to build
1 parent f9a884d commit b017856

File tree

6 files changed

+10
-28
lines changed

6 files changed

+10
-28
lines changed

NuGet.config

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<!-- Added manually for dotnet/runtime 8.0.11 -->
2222
<add key="darc-pub-dotnet-emsdk-91b783e" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-91b783ed/nuget/v3/index.json" />
2323
<add key="darc-pub-dotnet-runtime-ef07c4f" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-ef07c4f2/nuget/v3/index.json" />
24+
<add key="maui-local" value="D:\src\maui\artifacts\packages\Release\Shipping" />
2425
</packageSources>
2526
<disabledPackageSources />
2627
</configuration>

samples/NativeAOT/MainApplication.cs

-23
This file was deleted.

samples/NativeAOT/MainPage.xaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
SemanticProperties.HeadingLevel="Level1" />
2020

2121
<Label
22-
Text="Welcome to &#10;.NET Multi-platform App UI"
22+
Text="Welcome to &#10;.NET MAUI on NativeAOT!"
2323
Style="{StaticResource SubHeadline}"
2424
SemanticProperties.HeadingLevel="Level2"
25-
SemanticProperties.Description="Welcome to dot net Multi platform App U I" />
25+
SemanticProperties.Description="Welcome to dot net maui on native AOT" />
2626

2727
<Button
2828
x:Name="CounterBtn"

samples/NativeAOT/NativeAOT.csproj

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
<!-- Current required properties for NativeAOT -->
1818
<PublishAot>true</PublishAot>
1919
<PublishAotUsingRuntimePack>true</PublishAotUsingRuntimePack>
20+
<!-- Verify we get a specific MAUI version -->
21+
<MauiVersion>10.0.0-ci.net10.25074.1</MauiVersion>
2022
</PropertyGroup>
2123

2224
<!-- Settings for CI -->

samples/NativeAOT/Platforms/Android/MainActivity.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
using Android.Content.PM;
33
using Android.OS;
44
using Android.Runtime;
5+
using Android.Util;
56

67
namespace NativeAOT;
78

89
// Name required for typemap in NativeAotTypeManager
910
[Activity (Name = "my.MainActivity", Theme = "@style/Maui.SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
1011
public class MainActivity : MauiAppCompatActivity
1112
{
12-
protected override void OnCreate(Bundle? savedInstanceState)
13+
protected override void OnCreate (Bundle? savedInstanceState)
1314
{
1415
Log.Debug ("NativeAOT", "MainActivity.OnCreate()");
1516

samples/NativeAOT/Platforms/Android/MainApplication.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using Android.App;
22
using Android.Runtime;
3+
using Android.Util;
34

45
namespace NativeAOT;
56

@@ -10,8 +11,8 @@ namespace NativeAOT;
1011
[Application (Name = "my.MainApplication")]
1112
public class MainApplication : MauiApplication
1213
{
13-
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
14-
: base(handle, ownership)
14+
public MainApplication (IntPtr handle, JniHandleOwnership transfer)
15+
: base (handle, transfer)
1516
{
1617
Log.Debug ("NativeAOT", $"Application..ctor({handle.ToString ("x2")}, {transfer})");
1718
}

0 commit comments

Comments
 (0)