Skip to content

Commit 8cc9b6d

Browse files
committed
Add windows support
1 parent 2b75ed3 commit 8cc9b6d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Diff for: dotnet-maui/DittoMauiTasksApp/DittoMauiTasksApp.csproj

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
4+
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst;net9.0-windows10.0.19041.0</TargetFrameworks>
55
<OutputType>Exe</OutputType>
66
<RootNamespace>DittoMauiTasksApp</RootNamespace>
77
<UseMaui>true</UseMaui>
@@ -41,7 +41,9 @@
4141
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
4242
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
4343
</ItemGroup>
44-
44+
<ItemGroup Condition="$(TargetFramework.Contains('-windows'))">
45+
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.7.250310001" />
46+
</ItemGroup>
4547
<ItemGroup>
4648
<!-- See the README for instructions on creating this file, if it doesn't exist -->
4749
<EmbeddedResource Include="../../.env" />

Diff for: dotnet-maui/DittoMauiTasksApp/MauiProgram.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ private static Ditto SetupDitto()
4949
AppId,
5050
PlaygroundToken,
5151
false, // This is required to be set to false to use the correct URLs
52-
authUrl));
52+
authUrl), Path.Combine(FileSystem.Current.AppDataDirectory, "ditto"));
5353

5454
ditto.TransportConfig.Connect.WebsocketUrls.Add(websocketUrl);
5555
// Optionally enable all P2P transports if using P2P Sync

0 commit comments

Comments
 (0)