Skip to content

Commit ca1f87b

Browse files
authored
Merge branch 'main' into niels9001/iconsupport
2 parents 2e341c5 + 35c03df commit ca1f87b

48 files changed

Lines changed: 361 additions & 376 deletions

File tree

Some content is hidden

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

CommunityToolkit.Tooling.SampleGen.Tests/CommunityToolkit.Tooling.SampleGen.Tests.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
<LangVersion>preview</LangVersion>
99
</PropertyGroup>
1010

11-
<ItemGroup>
12-
<Compile Include="..\GlobalUsings.cs" Link="GlobalUsings.cs" />
13-
</ItemGroup>
14-
1511
<ItemGroup>
1612
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.0.1" />
1713
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
1814
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
1915
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
2016
</ItemGroup>
2117

18+
<ItemGroup>
19+
<Compile Include="..\GlobalUsings.cs" Link="GlobalUsings.cs" />
20+
</ItemGroup>
21+
2222
<ItemGroup>
2323
<ProjectReference Include="..\CommunityToolkit.Tooling.SampleGen\CommunityToolkit.Tooling.SampleGen.csproj" />
2424
</ItemGroup>

CommunityToolkit.Tooling.SampleGen.Tests/ToolkitSampleMetadataTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using Microsoft.CodeAnalysis.CSharp;
99
using Microsoft.CodeAnalysis.Text;
1010
using Microsoft.VisualStudio.TestTools.UnitTesting;
11+
using System.Collections.Immutable;
1112
using System.ComponentModel.DataAnnotations;
1213

1314
namespace CommunityToolkit.Tooling.SampleGen.Tests;

CommunityToolkit.Tooling.SampleGen/ToolkitSampleMetadataGenerator.Documentation.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,7 @@ public static class ToolkitDocumentRegistry
255255
{{
256256
public static System.Collections.Generic.IEnumerable<{typeof(ToolkitFrontMatter).FullName}> Execute()
257257
{{
258-
{
259-
string.Join("\n ", sampleMetadata.Select(FrontMatterToRegistryCall).ToArray())
260-
}
258+
{string.Join("\n ", sampleMetadata.Select(FrontMatterToRegistryCall).ToArray())}
261259
}}
262260
}}";
263261
}

CommunityToolkit.Tooling.TestGen.Tests/CommunityToolkit.Tooling.TestGen.Tests.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
<IsPackable>false</IsPackable>
88
</PropertyGroup>
99

10-
<ItemGroup>
11-
<Compile Include="..\GlobalUsings.cs" Link="GlobalUsings.cs" />
12-
</ItemGroup>
13-
1410
<ItemGroup>
1511
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.0.1" />
1612
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
1713
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
1814
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
1915
</ItemGroup>
2016

17+
<ItemGroup>
18+
<Compile Include="..\GlobalUsings.cs" Link="GlobalUsings.cs" />
19+
</ItemGroup>
20+
2121
<ItemGroup>
2222
<ProjectReference Include="..\CommunityToolkit.Tooling.TestGen\CommunityToolkit.Tooling.TestGen.csproj" />
2323
</ItemGroup>

CommunityToolkit.Tooling.TestGen.Tests/UIThreadTestMethodTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Microsoft.CodeAnalysis;
88
using Microsoft.CodeAnalysis.CSharp;
99
using Microsoft.VisualStudio.TestTools.UnitTesting;
10+
using System.Collections.Immutable;
1011

1112
namespace CommunityToolkit.Tooling.TestGen.Tests;
1213

GlobalUsings.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
global using System;
99
global using System.Collections.Generic;
10-
global using System.Collections.Immutable;
1110
global using System.Collections.ObjectModel;
1211
global using System.ComponentModel;
1312
global using System.Diagnostics;
File renamed without changes.

MultiTarget/DefinedConstants.props

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<Project>
2+
<PropertyGroup>
3+
<DefineConstants Condition="'$(HasWinUI)' == 'true'">$(DefineConstants);WINUI$(WinUIMajorVersion);</DefineConstants>
4+
5+
<!-- The WINAPPSDK const is the legacy version of the WINUI3 const. -->
6+
<DefineConstants Condition="'$(WinUIMajorVersion)' == '3'">$(DefineConstants);WINAPPSDK;</DefineConstants>
7+
8+
<DefineConstants Condition="'$(IsUno)' == 'true'">$(DefineConstants);HAS_UNO;</DefineConstants>
9+
<DefineConstants Condition="'$(IsUwp)' == 'true'">$(DefineConstants);WINDOWS_UWP;NETFX_CORE;</DefineConstants>
10+
<DefineConstants Condition="'$(IsWinAppSdk)' == 'true'">$(DefineConstants);WINDOWS_WINAPPSDK;WINAPPSDK</DefineConstants>
11+
<DefineConstants Condition="'$(IsWasm)' == 'true'">$(DefineConstants);__WASM__;HAS_UNO_WASM;</DefineConstants>
12+
<DefineConstants Condition="'$(IsDroid)' == 'true'">$(DefineConstants);__ANDROID__;</DefineConstants>
13+
<DefineConstants Condition="'$(IsiOS)' == 'true'">$(DefineConstants);__IOS__;</DefineConstants>
14+
<DefineConstants Condition="'$(IsMacOS)' == 'true'">$(DefineConstants);__MACOS__;</DefineConstants>
15+
<DefineConstants Condition="'$(IsWpf)' == 'true'">$(DefineConstants);HAS_UNO_SKIA;__SKIA__;WINDOWS_WPF;</DefineConstants>
16+
<DefineConstants Condition="'$(IsGtk)' == 'true'">$(DefineConstants);HAS_UNO_SKIA;__SKIA__;__GTK__;</DefineConstants>
17+
18+
<DefineConstants Condition="$(IsAllExperimentHead) == 'true'">$(DefineConstants);ALL_SAMPLES</DefineConstants>
19+
</PropertyGroup>
20+
</Project>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!-- Imports the <MultiTarget> values for the current project. -->
2+
<Project>
3+
<PropertyGroup>
4+
<MultiTargetIsSampleProject Condition="$(MSBuildProjectName.EndsWith('.Samples')) == 'true'">true</MultiTargetIsSampleProject>
5+
</PropertyGroup>
6+
7+
<Import Project="$(MSBuildProjectDirectory)\MultiTarget.props" Condition="Exists('$(MSBuildProjectDirectory)\MultiTarget.props') AND '$(MultiTarget)' == ''" />
8+
9+
<!-- If in a sample project, pull the MultiTarget settings from the source project. -->
10+
<!-- This behavior is also implemented in GeneratedAllProjectReferences.ps1 for <ProjectReference> generation. -->
11+
<Import Project="$(MSBuildProjectDirectory)/../src/MultiTarget.props" Condition="$(MultiTargetIsSampleProject) == 'true' AND !Exists('$(MSBuildProjectDirectory)\MultiTarget.props') AND Exists('$(MSBuildProjectDirectory)/../src/MultiTarget.props') AND '$(MultiTarget)' == ''" />
12+
13+
<Import Project="$(MSBuildThisFileDirectory)\Defaults.props" Condition="'$(MultiTarget)' == ''" />
14+
</Project>

0 commit comments

Comments
 (0)