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
1025c0a
Bump to net8.0
Arlodotexe Jan 11, 2024
9904bc4
Include MSBuild.Sdk.Extras/3.0.23 on UWP only
Arlodotexe Feb 9, 2024
b037c26
Update to .NET 8.0.201
Arlodotexe Feb 16, 2024
a65f129
Handle case-sensitivity for importing Directory.Build.props
Arlodotexe Feb 17, 2024
beb1db5
Update to .NET 8.0.201
Arlodotexe Feb 17, 2024
367c4e3
Update to latest stable Microsoft.CodeAnalysis.CSharp and Microsoft.C…
Arlodotexe Feb 19, 2024
ca90d37
Update System.Collections.Immutable to 8.0.0
Arlodotexe Feb 19, 2024
7b7fcff
Update Microsoft.CodeAnalysis.CSharp.Workspaces to latest stable 4.8.0
Arlodotexe Feb 20, 2024
ac93531
Update Microsoft.CodeAnalysis.CSharp.Workspaces to latest stable 4.8.0
Arlodotexe Feb 20, 2024
d555ec4
Update tooling
Arlodotexe Feb 20, 2024
04ac673
Update tooling to latest
Arlodotexe Feb 21, 2024
2485558
Use RuntimeIdentifiers on both heads and libraries, handle pre-net8 i…
Arlodotexe Feb 21, 2024
71cf0e1
Update tooling with fixes for new analyzer warnings/errors
Arlodotexe Feb 21, 2024
1264067
Use empty source instead of empty string for sourcegen tests
Arlodotexe Feb 21, 2024
d7c8d63
Fixed DiagnosticDescriptors message formatting
Arlodotexe Feb 21, 2024
5d9763e
Update tooling
Arlodotexe Feb 21, 2024
5651991
Use msbuild 17.9 or higher
Arlodotexe Feb 23, 2024
d99d850
Update to uno-check 1.20.2
Arlodotexe Feb 23, 2024
5ebb4b0
Update slngen to latest 11.2.3
Arlodotexe Feb 23, 2024
d987b77
Unpin uno-check manifest
Arlodotexe Feb 26, 2024
4058bea
Fixed Library.props import order
Arlodotexe Feb 26, 2024
7a313f9
Update tooling to latest main
Arlodotexe Feb 27, 2024
f1d2100
Cleaned up redundant or empty tests
Arlodotexe Feb 27, 2024
cd213e9
Cleanup removed file reference
Arlodotexe Feb 28, 2024
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: 2 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"uno.check": {
"version": "1.18.1",
"version": "1.20.2",
"commands": [
"uno-check"
]
Expand All @@ -15,7 +15,7 @@
]
},
"microsoft.visualstudio.slngen.tool": {
"version": "9.5.4",
"version": "11.2.3",
"commands": [
"slngen"
]
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"args": {
// Update 'VARIANT' to pick a .NET Core version: 3.1, 5.0, 6.0
// Append -bullseye or -focal to pin to an OS version.
"VARIANT": "7.0",
"VARIANT": "8.0",
// Options
"NODE_VERSION": "lts/*"
}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
merge_group:

env:
DOTNET_VERSION: ${{ '7.0.100' }}
DOTNET_VERSION: ${{ '8.0.201' }}
ENABLE_DIAGNOSTICS: true
MSBUILD_VERBOSITY: normal
#COREHOST_TRACE: 1
Expand Down Expand Up @@ -108,7 +108,6 @@ jobs:
- name: Restore dotnet tools
run: dotnet tool restore

# Pinning Manifest for 1.18 version of Uno.Check at the moment to unblock build, see https://github.com/CommunityToolkit/Windows/pull/320
- name: Run Uno Check to Install Dependencies
run: >
dotnet tool run uno-check
Expand All @@ -119,10 +118,11 @@ jobs:
--skip androidemulator
--skip vswinworkloads
--verbose
--manifest https://raw.githubusercontent.com/unoplatform/uno.check/1660eba219684491362704c75153b40ce6ef7a35/manifests/uno.ui.manifest.json

- name: Add msbuild to PATH
uses: microsoft/[email protected]
uses: microsoft/setup-msbuild@v2
with:
vs-version: '[17.9,)'

- name: Enable ${{ env.TARGET_PLATFORMS }} TargetFrameworks
working-directory: ./${{ env.MULTI_TARGET_DIRECTORY }}
Expand Down
4 changes: 3 additions & 1 deletion components/Animations/samples/Animations.Samples.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))')" />

<PropertyGroup>
<ToolkitComponentName>Animations</ToolkitComponentName>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))')" />

<PropertyGroup>
<ToolkitComponentName>Animations</ToolkitComponentName>
<Description>This package contains Animations.</Description>
Expand Down
4 changes: 3 additions & 1 deletion components/Behaviors/samples/Behaviors.Samples.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))')" />

<PropertyGroup>
<ToolkitComponentName>Behaviors</ToolkitComponentName>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))')" />

<PropertyGroup>
<ToolkitComponentName>Behaviors</ToolkitComponentName>
<Description>This package contains Behaviors.</Description>
Expand Down
8 changes: 0 additions & 8 deletions components/Behaviors/tests/Behaviors.Tests.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,12 @@
<Import_RootNamespace>BehaviorsExperiment.Tests</Import_RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)ExampleBehaviorsTestClass.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ExampleBehaviorsTestPage.xaml.cs">
<DependentUpon>ExampleBehaviorsTestPage.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)StackedNotificationsBehaviorsTestPage.xaml.cs">
<DependentUpon>StackedNotificationsBehaviorsTestPage.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)StackedNotificationsBehaviorTestClass.cs" />
</ItemGroup>
<ItemGroup>
<Page Include="$(MSBuildThisFileDirectory)ExampleBehaviorsTestPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)StackedNotificationsBehaviorsTestPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down
41 changes: 0 additions & 41 deletions components/Behaviors/tests/ExampleBehaviorsTestClass.cs

This file was deleted.

11 changes: 0 additions & 11 deletions components/Behaviors/tests/ExampleBehaviorsTestPage.xaml

This file was deleted.

16 changes: 0 additions & 16 deletions components/Behaviors/tests/ExampleBehaviorsTestPage.xaml.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))')" />

<PropertyGroup>
<ToolkitComponentName>CameraPreview</ToolkitComponentName>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))')" />

<PropertyGroup>
<ToolkitComponentName>CameraPreview</ToolkitComponentName>
<Description>This package contains CameraPreview.</Description>
Expand Down
4 changes: 3 additions & 1 deletion components/Collections/samples/Collections.Samples.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))')" />

<PropertyGroup>
<ToolkitComponentName>Collections</ToolkitComponentName>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))')" />

<PropertyGroup>
<ToolkitComponentName>Collections</ToolkitComponentName>
<Description>This package contains the AdvancedCollectionView and IncrementalLoadingCollection.</Description>
Expand Down
4 changes: 3 additions & 1 deletion components/Converters/samples/Converters.Samples.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))')" />

<PropertyGroup>
<ToolkitComponentName>Converters</ToolkitComponentName>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))')" />

<PropertyGroup>
<ToolkitComponentName>Converters</ToolkitComponentName>
<Description>This package contains Converters.</Description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))')" />

<PropertyGroup>
<ToolkitComponentName>DeveloperTools</ToolkitComponentName>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))')" />

<PropertyGroup>
<ToolkitComponentName>DeveloperTools</ToolkitComponentName>
<Description>This package contains DeveloperTools.</Description>
Expand Down
4 changes: 3 additions & 1 deletion components/Extensions/samples/Extensions.Samples.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))')" />

<PropertyGroup>
<ToolkitComponentName>Extensions</ToolkitComponentName>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))')" />

<PropertyGroup>
<ToolkitComponentName>Extensions</ToolkitComponentName>
<Description>This package contains Extensions.</Description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))')" />

<PropertyGroup>
<ToolkitComponentName>HeaderedControls</ToolkitComponentName>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))')" />

<PropertyGroup>
<ToolkitComponentName>HeaderedControls</ToolkitComponentName>
<Description>This package contains HeaderedControls.</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,95 +10,13 @@ namespace HeaderedControls.Tests;
[TestClass]
public partial class HeaderedContentControlTestClass : VisualUITestBase
{
// If you don't need access to UI objects directly or async code, use this pattern.
[TestMethod]
public void SimpleSynchronousExampleTest()
{
var assembly = typeof(HeaderedContentControl).Assembly;
var type = assembly.GetType(typeof(HeaderedContentControl).FullName ?? string.Empty);

Assert.IsNotNull(type, "Could not find HeaderedContentControl type.");
Assert.AreEqual(typeof(HeaderedContentControl), type, "Type of HeaderedContentControl does not match expected type.");
}

// The UIThreadTestMethod can also easily grab a XAML Page for us by passing its type as a parameter.
// This lets us actually test a control as it would behave within an actual application.
// The page will already be loaded by the time your test is called.
[UIThreadTestMethod]
public void SimpleUIExamplePageTest(HeaderedContentControlTestPage page)
{
// You can use the Toolkit Visual Tree helpers here to find the component by type or name:
var component = page.FindDescendant<HeaderedContentControl>();

Assert.IsNotNull(component);

var componentByName = page.FindDescendant("HeaderedContentControl");

Assert.IsNotNull(componentByName);
}

// You can still do async work with a UIThreadTestMethod as well.
[UIThreadTestMethod]
public async Task SimpleAsyncUIExamplePageTest(HeaderedContentControlTestPage page)
{
// This helper can be used to wait for a rendering pass to complete.
await CompositionTargetHelper.ExecuteAfterCompositionRenderingAsync(() => { });

var component = page.FindDescendant<HeaderedContentControl>();

Assert.IsNotNull(component);
}

//// ----------------------------- ADVANCED TEST SCENARIOS -----------------------------

// If you need to use DataRow, you can use this pattern with the UI dispatch still.
// Otherwise, checkout the UIThreadTestMethod attribute above.
// See https://github.com/CommunityToolkit/Labs-Windows/issues/186
[TestMethod]
public async Task ComplexAsyncUIExampleTest()
{
await EnqueueAsync(() =>
{
var component = new HeaderedContentControl();
Assert.IsNotNull(component);
});
}

// If you want to load other content not within a XAML page using the UIThreadTestMethod above.
// Then you can do that using the Load/UnloadTestContentAsync methods.
[TestMethod]
public async Task ComplexAsyncLoadUIExampleTest()
{
await EnqueueAsync(async () =>
{
var component = new HeaderedContentControl();
Assert.IsNotNull(component);
Assert.IsFalse(component.IsLoaded);

await LoadTestContentAsync(component);

Assert.IsTrue(component.IsLoaded);

await UnloadTestContentAsync(component);

Assert.IsFalse(component.IsLoaded);
});
}

// You can still use the UIThreadTestMethod to remove the extra layer for the dispatcher as well:
[UIThreadTestMethod]
public async Task ComplexAsyncLoadUIExampleWithoutDispatcherTest()
{
var component = new HeaderedContentControl();
Assert.IsNotNull(component);
Assert.IsFalse(component.IsLoaded);

await LoadTestContentAsync(component);

Assert.IsTrue(component.IsLoaded);

await UnloadTestContentAsync(component);

Assert.IsFalse(component.IsLoaded);
}
}
Loading