Skip to content

Commit 65e6fb4

Browse files
committed
update example to latest dotnet new templates for Uno and Modern.CSharp.Templates
1 parent ac1a2d2 commit 65e6fb4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+288
-554
lines changed

src/CSharpMarkup.WinUI.Examples/.editorconfig

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,40 +31,40 @@ indent_style = tab
3131
indent_size = 2
3232

3333
[*.{csproj,proj,projitems,shproj}]
34-
indent_size = 2
34+
indent_size = 4
3535

3636
[*.{json,slnf}]
3737
indent_size = 2
3838
end_of_line = lf
3939

4040
[*.{props,targets}]
41-
indent_size = 2
41+
indent_size = 4
4242

4343
[*.xaml]
44-
indent_size = 2
44+
indent_size = 4
4545
charset = utf-8-bom
4646

4747
[*.xml]
48-
indent_size = 2
48+
indent_size = 4
4949
end_of_line = lf
5050

5151
[*.plist]
52-
indent_size = 2
52+
indent_size = 4
5353
indent_style = tab
5454
end_of_line = lf
5555

5656
[*.manifest]
57-
indent_size = 2
57+
indent_size = 4
5858

5959
[*.appxmanifest]
60-
indent_size = 2
60+
indent_size = 4
6161

6262
[*.{json,css,webmanifest}]
6363
indent_size = 2
6464
end_of_line = lf
6565

6666
[web.config]
67-
indent_size = 2
67+
indent_size = 4
6868
end_of_line = lf
6969

7070
[*.sh]

src/CSharpMarkup.WinUI.Examples/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ StyleCopReport.xml
8282
*.pgc
8383
*.pgd
8484
*.rsp
85+
# but not Directory.Build.rsp, as it configures directory-level build defaults
86+
!Directory.Build.rsp
8587
*.sbr
8688
*.tlb
8789
*.tli
@@ -153,6 +155,7 @@ coverage*.info
153155

154156
# NCrunch
155157
_NCrunch_*
158+
.NCrunch_*
156159
.*crunch*.local.xml
157160
nCrunchTemp_*
158161

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# About the `.run` folder
2+
3+
This folder is present to add support for the [Rider IDE](https://aka.platform.uno/rider-getstarted). You can remove this folder safely if you're not using Rider.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="WinUICsMarkupExamples (Desktop)" type="LaunchSettings" factoryName=".NET Launch Settings Profile">
3+
<option name="LAUNCH_PROFILE_PROJECT_FILE_PATH" value="$PROJECT_DIR$/WinUICsMarkupExamples/WinUICsMarkupExamples.csproj" />
4+
<option name="LAUNCH_PROFILE_TFM" value="net9.0-desktop" />
5+
<option name="LAUNCH_PROFILE_NAME" value="WinUICsMarkupExamples (Desktop)" />
6+
<option name="USE_EXTERNAL_CONSOLE" value="0" />
7+
<option name="USE_MONO" value="0" />
8+
<option name="RUNTIME_ARGUMENTS" value="" />
9+
<option name="GENERATE_APPLICATIONHOST_CONFIG" value="1" />
10+
<option name="SHOW_IIS_EXPRESS_OUTPUT" value="0" />
11+
<option name="SEND_DEBUG_REQUEST" value="1" />
12+
<option name="ADDITIONAL_IIS_EXPRESS_ARGUMENTS" value="" />
13+
<method v="2">
14+
<option name="Build" />
15+
</method>
16+
</configuration>
17+
<configuration default="false" name="WinUICsMarkupExamples (WebAssembly IIS Express)" type="LaunchSettings" factoryName=".NET Launch Settings Profile">
18+
<option name="LAUNCH_PROFILE_PROJECT_FILE_PATH" value="$PROJECT_DIR$/WinUICsMarkupExamples/WinUICsMarkupExamples.csproj" />
19+
<option name="LAUNCH_PROFILE_TFM" value="net9.0-browserwasm" />
20+
<option name="LAUNCH_PROFILE_NAME" value="WinUICsMarkupExamples (WebAssembly IIS Express)" />
21+
<option name="USE_EXTERNAL_CONSOLE" value="0" />
22+
<option name="USE_MONO" value="0" />
23+
<option name="RUNTIME_ARGUMENTS" value="" />
24+
<option name="GENERATE_APPLICATIONHOST_CONFIG" value="1" />
25+
<option name="SHOW_IIS_EXPRESS_OUTPUT" value="0" />
26+
<option name="SEND_DEBUG_REQUEST" value="1" />
27+
<option name="ADDITIONAL_IIS_EXPRESS_ARGUMENTS" value="" />
28+
<method v="2">
29+
<option name="Build" />
30+
</method>
31+
</configuration>
32+
<configuration default="false" name="WinUICsMarkupExamples (WebAssembly)" type="LaunchSettings" factoryName=".NET Launch Settings Profile">
33+
<option name="LAUNCH_PROFILE_PROJECT_FILE_PATH" value="$PROJECT_DIR$/WinUICsMarkupExamples/WinUICsMarkupExamples.csproj" />
34+
<option name="LAUNCH_PROFILE_TFM" value="net9.0-browserwasm" />
35+
<option name="LAUNCH_PROFILE_NAME" value="WinUICsMarkupExamples (WebAssembly)" />
36+
<option name="USE_EXTERNAL_CONSOLE" value="0" />
37+
<option name="USE_MONO" value="0" />
38+
<option name="RUNTIME_ARGUMENTS" value="" />
39+
<option name="GENERATE_APPLICATIONHOST_CONFIG" value="1" />
40+
<option name="SHOW_IIS_EXPRESS_OUTPUT" value="0" />
41+
<option name="SEND_DEBUG_REQUEST" value="1" />
42+
<option name="ADDITIONAL_IIS_EXPRESS_ARGUMENTS" value="" />
43+
<method v="2">
44+
<option name="Build" />
45+
</method>
46+
</configuration>
47+
<configuration default="false" name="WinUICsMarkupExamples (WinAppSDK Unpackaged)" type="LaunchSettings" factoryName=".NET Launch Settings Profile">
48+
<option name="LAUNCH_PROFILE_PROJECT_FILE_PATH" value="$PROJECT_DIR$/WinUICsMarkupExamples/WinUICsMarkupExamples.csproj" />
49+
<option name="LAUNCH_PROFILE_TFM" value="net9.0-windows10.0.26100.0" />
50+
<option name="LAUNCH_PROFILE_NAME" value="WinUICsMarkupExamples (WinAppSDK Unpackaged)" />
51+
<option name="USE_EXTERNAL_CONSOLE" value="0" />
52+
<option name="USE_MONO" value="0" />
53+
<option name="RUNTIME_ARGUMENTS" value="" />
54+
<option name="GENERATE_APPLICATIONHOST_CONFIG" value="1" />
55+
<option name="SHOW_IIS_EXPRESS_OUTPUT" value="0" />
56+
<option name="SEND_DEBUG_REQUEST" value="1" />
57+
<option name="ADDITIONAL_IIS_EXPRESS_ARGUMENTS" value="" />
58+
<method v="2">
59+
<option name="Build" />
60+
</method>
61+
</configuration>
62+
</component>

src/CSharpMarkup.WinUI.Examples/.vscode/launch.json

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"version": "0.2.0",
66
"configurations": [
77
{
8-
"name": "Uno Platform Mobile",
8+
"name": "Uno Platform Mobile Debug",
99
"type": "Uno",
1010
"request": "launch",
1111
// any Uno* task will do, this is simply to satisfy vscode requirement when a launch.json is present
@@ -15,7 +15,7 @@
1515
// Use IntelliSense to find out which attributes exist for C# debugging
1616
// Use hover for the description of the existing attributes
1717
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
18-
"name": "Debug (Chrome, WebAssembly)",
18+
"name": "Uno Platform WebAssembly Debug (Chrome)",
1919
"type": "chrome",
2020
"request": "launch",
2121
"url": "http://localhost:5000",
@@ -26,7 +26,7 @@
2626
"server": {
2727
"runtimeExecutable": "dotnet",
2828
"program": "run",
29-
"args": ["--no-build","-f","net8.0-browserwasm","--launch-profile", "WinUICsMarkupExamples (WebAssembly)"],
29+
"args": ["--no-build","-f","net9.0-browserwasm","--launch-profile", "WinUICsMarkupExamples (WebAssembly)"],
3030
"outputCapture": "std",
3131
"timeout": 30000,
3232
"cwd": "${workspaceFolder}/WinUICsMarkupExamples"
@@ -36,12 +36,33 @@
3636
// Use IntelliSense to find out which attributes exist for C# debugging
3737
// Use hover for the description of the existing attributes
3838
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
39-
"name": "Uno Platform Desktop (Debug)",
39+
"name": "Uno Platform WebAssembly Debug (Edge)",
40+
"type": "msedge",
41+
"request": "launch",
42+
"url": "http://localhost:5000",
43+
"webRoot": "${workspaceFolder}/WinUICsMarkupExamples",
44+
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
45+
"timeout": 30000,
46+
"preLaunchTask": "build-wasm",
47+
"server": {
48+
"runtimeExecutable": "dotnet",
49+
"program": "run",
50+
"args": ["--no-build","-f","net9.0-browserwasm","--launch-profile", "WinUICsMarkupExamples (WebAssembly)"],
51+
"outputCapture": "std",
52+
"timeout": 30000,
53+
"cwd": "${workspaceFolder}/WinUICsMarkupExamples"
54+
}
55+
},
56+
{
57+
// Use IntelliSense to find out which attributes exist for C# debugging
58+
// Use hover for the description of the existing attributes
59+
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
60+
"name": "Uno Platform Desktop Debug",
4061
"type": "coreclr",
4162
"request": "launch",
4263
"preLaunchTask": "build-desktop",
4364
// If you have changed target frameworks, make sure to update the program path.
44-
"program": "${workspaceFolder}/WinUICsMarkupExamples/bin/Debug/net8.0-desktop/WinUICsMarkupExamples.dll",
65+
"program": "${workspaceFolder}/WinUICsMarkupExamples/bin/Debug/net9.0-desktop/WinUICsMarkupExamples.dll",
4566
"args": [],
4667
"launchSettingsProfile": "WinUICsMarkupExamples (Desktop)",
4768
"env": {

src/CSharpMarkup.WinUI.Examples/.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33
"explorer.fileNesting.expand": false,
44
"explorer.fileNesting.patterns": {
55
"*.xaml": "$(capture).xaml.cs"
6+
},
7+
"files.associations": {
8+
"global.json": "jsonc"
69
}
710
}

src/CSharpMarkup.WinUI.Examples/.vscode/tasks.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"build",
1010
"${workspaceFolder}/WinUICsMarkupExamples/WinUICsMarkupExamples.csproj",
1111
"/property:GenerateFullPaths=true",
12-
"/property:TargetFramework=net8.0-browserwasm",
12+
"/property:TargetFramework=net9.0-browserwasm",
1313
"/consoleloggerparameters:NoSummary"
1414
],
1515
"problemMatcher": "$msCompile"
@@ -22,7 +22,7 @@
2222
"publish",
2323
"${workspaceFolder}/WinUICsMarkupExamples/WinUICsMarkupExamples.csproj",
2424
"/property:GenerateFullPaths=true",
25-
"/property:TargetFramework=net8.0-browserwasm",
25+
"/property:TargetFramework=net9.0-browserwasm",
2626
"/consoleloggerparameters:NoSummary"
2727
],
2828
"problemMatcher": "$msCompile"
@@ -35,7 +35,7 @@
3535
"build",
3636
"${workspaceFolder}/WinUICsMarkupExamples/WinUICsMarkupExamples.csproj",
3737
"/property:GenerateFullPaths=true",
38-
"/property:TargetFramework=net8.0-desktop",
38+
"/property:TargetFramework=net9.0-desktop",
3939
"/consoleloggerparameters:NoSummary"
4040
],
4141
"problemMatcher": "$msCompile"
@@ -48,7 +48,7 @@
4848
"publish",
4949
"${workspaceFolder}/WinUICsMarkupExamples/WinUICsMarkupExamples.csproj",
5050
"/property:GenerateFullPaths=true",
51-
"/property:TargetFramework=net8.0-desktop",
51+
"/property:TargetFramework=net9.0-desktop",
5252
"/consoleloggerparameters:NoSummary"
5353
],
5454
"problemMatcher": "$msCompile"

src/CSharpMarkup.WinUI.Examples/.vsconfig

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,15 @@
1515
"Microsoft.VisualStudio.Component.Web",
1616
"Microsoft.VisualStudio.ComponentGroup.Web.Client",
1717
"Microsoft.VisualStudio.Workload.NetWeb",
18-
"Microsoft.VisualStudio.ComponentGroup.Azure.Prerequisites",
19-
"Microsoft.VisualStudio.Workload.Azure",
2018
"Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.TemplateEngine",
21-
"Microsoft.VisualStudio.Component.Windows10SDK.19041",
2219
"Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging",
2320
"Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites",
2421
"Microsoft.VisualStudio.Component.Debugger.JustInTime",
2522
"Microsoft.VisualStudio.Workload.ManagedDesktop",
26-
"Microsoft.Component.NetFX.Native",
27-
"Microsoft.VisualStudio.Component.Graphics",
28-
"Microsoft.VisualStudio.Component.Merq",
2923
"Component.Xamarin.RemotedSimulator",
3024
"Microsoft.VisualStudio.Component.MonoDebugger",
3125
"Microsoft.VisualStudio.ComponentGroup.Maui.All",
3226
"Component.Android.SDK34",
33-
"Component.Android.SDK33",
3427
"Component.OpenJDK",
3528
"Microsoft.VisualStudio.Workload.NetCrossPlat",
3629
"Microsoft.VisualStudio.Workload.NetCoreTools"

src/CSharpMarkup.WinUI.Examples/Directory.Packages.props

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,14 @@
33
To update the version of Uno, you should instead update the Sdk version in the global.json file.
44
55
See https://aka.platform.uno/using-uno-sdk for more information.
6+
See https://aka.platform.uno/using-uno-sdk#implicit-packages for more information regarding the Implicit Packages.
67
-->
78
<ItemGroup>
8-
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.0" />
9-
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
10-
<PackageVersion Include="CSharpMarkup.WinUI" Version="3.1.0" />
11-
<PackageVersion Include="CSharpMarkup.WinUI.Uno.Extensions.Navigation" Version="3.1.0" />
12-
<PackageVersion Include="CSharpMarkup.WinUI.Uno.Extensions.Navigation.Toolkit" Version="3.1.0" />
13-
<PackageVersion Include="CSharpMarkup.WinUI.Uno.Toolkit" Version="3.1.0" />
14-
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
15-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
16-
<PackageVersion Include="NUnit" Version="4.1.0" />
17-
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
18-
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
19-
<PackageVersion Include="PropertyChanged.Fody" Version="4.1.0" />
20-
<PackageVersion Include="Uno.UITest.Helpers" Version="1.1.0-dev.70" />
21-
<PackageVersion Include="Xamarin.UITest" Version="4.3.4" />
229
</ItemGroup>
23-
</Project>
10+
<ItemGroup>
11+
<PackageVersion Include="CSharpMarkup.WinUI" Version="3.1.2" />
12+
<PackageVersion Include="CSharpMarkup.WinUI.Uno.Extensions.Navigation" Version="3.1.2" />
13+
<PackageVersion Include="CSharpMarkup.WinUI.Uno.Extensions.Navigation.Toolkit" Version="3.1.2" />
14+
<PackageVersion Include="CSharpMarkup.WinUI.Uno.Toolkit" Version="3.1.2" />
15+
</ItemGroup>
16+
</Project>

src/CSharpMarkup.WinUI.Examples/NuGet.config

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)