Skip to content

Commit 1825545

Browse files
committed
Clean-up projects and its files
Fix-up white-spaces and new-lines Remove un-necessary and duplicate logic Rename missed files from previous renames Remove un-used, un-necessary and duplicate files
1 parent 28032c4 commit 1825545

File tree

75 files changed

+221
-827
lines changed

Some content is hidden

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

75 files changed

+221
-827
lines changed
File renamed without changes.

Directory.Build.props

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,34 +44,34 @@
4444
<Choose>
4545
<When Condition="'$(Configuration)' == 'Debug' and '$(IsDesignProject)' != 'true'">
4646
<!-- Debug builds have this turned on by default, but it breaks our Xaml Islands Scenarios -->
47-
<PropertyGroup>
48-
<EnableTypeInfoReflection>false</EnableTypeInfoReflection>
47+
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
4948
<EnableXBindDiagnostics>false</EnableXBindDiagnostics>
49+
<EnableTypeInfoReflection>false</EnableTypeInfoReflection>
5050
</PropertyGroup>
5151
</When>
5252
</Choose>
5353

5454
<Choose>
5555
<When Condition="'$(SourceLinkEnabled)' != 'false' and '$(IsSampleProject)' != 'true'">
5656
<PropertyGroup>
57-
<!-- Optional: Declare that the Repository URL can be published to NuSpec -->
57+
<!-- Declare that the Repository URL can be published to NuSpec -->
5858
<PublishRepositoryUrl>true</PublishRepositoryUrl>
59-
<!-- Optional: Embed source files that are not tracked by the source control manager to the PDB -->
59+
<!-- Embed source files that are not tracked by the source control manager to the PDB -->
6060
<EmbedUntrackedSources>true</EmbedUntrackedSources>
61-
<!-- Optional: Include PDB in the built .nupkg -->
61+
<!-- Include PDB in the built .nupkg -->
6262
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
6363
</PropertyGroup>
6464
<ItemGroup>
65-
<PackageReference Include="Microsoft.SourceLink.AzureRepos.Git" Version="1.0.0" PrivateAssets="All"/>
66-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
65+
<PackageReference Include="Microsoft.SourceLink.AzureRepos.Git" Version="1.0.0" PrivateAssets="All" />
66+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
6767
</ItemGroup>
6868
</When>
6969
</Choose>
7070

7171
<Choose>
7272
<When Condition="'$(IsDesignProject)' != 'true'">
7373
<ItemGroup>
74-
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive"/>
74+
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
7575
</ItemGroup>
7676
</When>
7777
</Choose>
@@ -103,10 +103,10 @@
103103
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json">
104104
<Link>stylecop.json</Link>
105105
</AdditionalFiles>
106-
<None Include="$(MSBuildThisFileDirectory)license.md" Pack="true" PackagePath="\"/>
107-
<None Include="$(MSBuildThisFileDirectory)build\nuget.png" Pack="true" PackagePath="images\"/>
106+
<None Include="$(MSBuildThisFileDirectory)license.md" Pack="true" PackagePath="\" />
107+
<None Include="$(MSBuildThisFileDirectory)build\nuget.png" Pack="true" PackagePath="images\" />
108108
</ItemGroup>
109109

110-
<Import Project="$(MSBuildThisFileDirectory)build\Windows.Toolkit.VisualStudio.Design.props" Condition="'$(IsDesignProject)' == 'true'"/>
110+
<Import Project="$(MSBuildThisFileDirectory)build\Windows.Toolkit.VisualStudio.Design.props" Condition="'$(IsDesignProject)' == 'true'" />
111111

112112
</Project>

Directory.Build.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</PropertyGroup>
66

77
<Choose>
8-
<!--We'll include signing the Notifications library since we need the DLL signature to match for interop from class libraries to main projects-->
8+
<!-- We'll include signing the Notifications library since we need the DLL signature to match for interop from class libraries to main projects -->
99
<When Condition="(!$(TargetFramework.Contains(`uap10.0`)) and '$(TargetFramework)' != 'native' and '$(IsSampleProject)' != 'true') or $(MSBuildProjectName) == 'Microsoft.Toolkit.Uwp.Notifications'">
1010
<PropertyGroup>
1111
<SignAssembly>true</SignAssembly>
@@ -19,7 +19,7 @@
1919

2020
<Target Name="AddCommitHashToAssemblyAttributes" BeforeTargets="GetAssemblyAttributes">
2121
<ItemGroup>
22-
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition=" '$(SourceRevisionId)' != '' ">
22+
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(SourceRevisionId)' != ''">
2323
<_Parameter1>CommitHash</_Parameter1>
2424
<_Parameter2>$(SourceRevisionId)</_Parameter2>
2525
</AssemblyAttribute>

GazeInputTest/Properties/Default.rd.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,13 @@
1414
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
1515
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
1616
-->
17-
1817
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
1918
<Application>
2019
<!--
2120
An Assembly element with Name="*Application*" applies to all assemblies in
2221
the application package. The asterisks are not wildcards.
2322
-->
2423
<Assembly Name="*Application*" Dynamic="Required All" />
25-
26-
2724
<!-- Add your application specific runtime directives here. -->
28-
29-
3025
</Application>
3126
</Directives>

license.md renamed to License.md

File renamed without changes.

Microsoft.Toolkit.Diagnostics/Microsoft.Toolkit.Diagnostics.csproj

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,35 @@
1313
</Description>
1414
<PackageTags>Windows;Community;Toolkit;WCT;UWP;Incremental;Loading;Collection;IncrementalLoadingCollection;String;Array;extensions;helpers</PackageTags>
1515
</PropertyGroup>
16+
1617
<Choose>
17-
<When Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
18+
<When Condition="'$(TargetFramework)' == 'netstandard1.4'">
19+
<!-- .NET Standard 1.4 doesn't have the Span<T> type, ValueTuple or the [Pure] attribute -->
1820
<ItemGroup>
19-
20-
<!-- .NET Standard 1.4 doesn't have the Span<T> type, ValueTuple or the [Pure] attribute -->
2121
<PackageReference Include="System.Diagnostics.Contracts" Version="4.3.0" />
2222
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
2323
<PackageReference Include="System.Memory" Version="4.5.4" />
2424
</ItemGroup>
2525
</When>
26-
<When Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
27-
<ItemGroup>
2826

29-
<!-- .NET Standard 2.0 doesn't have the Span<T> type -->
27+
<When Condition="'$(TargetFramework)' == 'netstandard2.0'">
28+
<!-- .NET Standard 2.0 doesn't have the Span<T> type -->
29+
<ItemGroup>
3030
<PackageReference Include="System.Memory" Version="4.5.4" />
3131
</ItemGroup>
3232
</When>
33-
<When Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
33+
34+
<When Condition="'$(TargetFramework)' == 'netstandard2.1'">
3435
<PropertyGroup>
3536
<DefineConstants>NETSTANDARD2_1_OR_GREATER</DefineConstants>
3637
</PropertyGroup>
38+
<!-- .NET Standard 2.1 doesn't have the Unsafe type -->
3739
<ItemGroup>
38-
39-
<!-- .NET Standard 2.1 doesn't have the Unsafe type -->
4040
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
4141
</ItemGroup>
4242
</When>
43-
<When Condition=" '$(TargetFramework)' == 'net5.0' ">
43+
44+
<When Condition="'$(TargetFramework)' == 'net5.0'">
4445
<PropertyGroup>
4546
<DefineConstants>NETSTANDARD2_1_OR_GREATER</DefineConstants>
4647
</PropertyGroup>

Microsoft.Toolkit.HighPerformance/Microsoft.Toolkit.HighPerformance.csproj

Lines changed: 50 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,19 @@
2424
</Description>
2525
<PackageTags>Windows;Community;Toolkit;WCT;UWP;core;standard;unsafe;span;memory;string;array;stream;buffer;extensions;helpers;parallel;performance</PackageTags>
2626
</PropertyGroup>
27+
2728
<Choose>
28-
<When Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
29+
<When Condition="'$(TargetFramework)' == 'netstandard1.4'">
30+
<!--
31+
.NET Standard 1.4 lacks the [Pure] attribute, the Rectangle primitive,
32+
the Span<T> and Memory<T> types, the Vector<T> primitive and related APIs,
33+
ValueTask and ValueTask<T>, the Parallel class and the Unsafe class.
34+
We also need to reference the System.Runtime.CompilerServices.Unsafe package directly,
35+
even though System.Memory references it already, as we need a more recent version than
36+
the one bundled with it. This is so that we can use the Unsafe.Unbox<T> method,
37+
which is used by the Box<T> type in the package.
38+
-->
2939
<ItemGroup>
30-
31-
<!-- .NET Standard 1.4 lacks the [Pure] attribute, the Rectangle primitive,
32-
the Span<T> and Memory<T> types, the Vector<T> primitive and related APIs,
33-
ValueTask and ValueTask<T>, the Parallel class and the Unsafe class.
34-
We also need to reference the System.Runtime.CompilerServices.Unsafe package directly,
35-
even though System.Memory references it already, as we need a more recent version than
36-
the one bundled with it. This is so that we can use the Unsafe.Unbox<T> method,
37-
which is used by the Box<T> type in the package. -->
3840
<PackageReference Include="System.Diagnostics.Contracts" Version="4.3.0" />
3941
<PackageReference Include="System.Drawing.Primitives" Version="4.3.0" />
4042
<PackageReference Include="System.Memory" Version="4.5.4" />
@@ -44,65 +46,70 @@
4446
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
4547
</ItemGroup>
4648
</When>
47-
<When Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
48-
<ItemGroup>
4949

50-
<!-- .NET Standard 2.0 doesn't have the Span<T>, HashCode and ValueTask types -->
50+
<When Condition="'$(TargetFramework)' == 'netstandard2.0'">
51+
<!-- .NET Standard 2.0 doesn't have the Span<T>, HashCode and ValueTask types -->
52+
<ItemGroup>
5153
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.0" />
5254
<PackageReference Include="System.Memory" Version="4.5.4" />
5355
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
5456
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
5557
</ItemGroup>
5658
</When>
57-
<When Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
58-
<ItemGroup>
5959

60-
<!-- .NET Standard 2.1 doesn't have the Unsafe type -->
61-
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
62-
</ItemGroup>
63-
<PropertyGroup>
64-
65-
<!-- NETSTANDARD2_1_OR_GREATER: includes both .NET Standard 2.1 and .NET Core 3.1.
66-
This is needed because .NET Core 3.1 will be a separate package than .NET Standard 2.1. -->
60+
<When Condition="'$(TargetFramework)' == 'netstandard2.1'">
61+
<!--
62+
NETSTANDARD2_1_OR_GREATER: includes both .NET Standard 2.1 and .NET Core 3.1.
63+
This is needed because .NET Core 3.1 will be a separate package than .NET Standard 2.1.
6764
68-
<!-- SPAN_RUNTIME_SUPPORT: define a constant to indicate runtimes with runtime support for
69-
the fast Span<T> type, as well as some overloads with Span<T> parameters (eg. Stream.Write).
70-
In particular, these are runtimes which are able to create Span<T> instances from just
71-
a managed reference, which can be used to slice arbitrary objects not technically supported.
72-
This API (MemoryMarshal.CreateSpan) is not part of .NET Standard 2.0, but it is still
73-
available on .NET Core 2.1. So by using this constant, we can make sure to expose those
74-
APIs relying on that method on all target frameworks that are able to support them. -->
75-
<DefineConstants>NETSTANDARD2_1_OR_GREATER;SPAN_RUNTIME_SUPPORT</DefineConstants>
76-
</PropertyGroup>
77-
</When>
78-
<When Condition=" '$(TargetFramework)' == 'net5.0' ">
65+
SPAN_RUNTIME_SUPPORT: define a constant to indicate runtimes with runtime support for
66+
the fast Span<T> type, as well as some overloads with Span<T> parameters (eg. Stream.Write).
67+
In particular, these are runtimes which are able to create Span<T> instances from just
68+
a managed reference, which can be used to slice arbitrary objects not technically supported.
69+
This API (MemoryMarshal.CreateSpan) is not part of .NET Standard 2.0, but it is still
70+
available on .NET Core 2.1. So by using this constant, we can make sure to expose those
71+
APIs relying on that method on all target frameworks that are able to support them.
72+
-->
7973
<PropertyGroup>
8074
<DefineConstants>NETSTANDARD2_1_OR_GREATER;SPAN_RUNTIME_SUPPORT</DefineConstants>
8175
</PropertyGroup>
82-
</When>
83-
<When Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
76+
<!-- .NET Standard 2.1 doesn't have the Unsafe type -->
8477
<ItemGroup>
8578
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
8679
</ItemGroup>
80+
</When>
81+
82+
<When Condition="'$(TargetFramework)' == 'net5.0'">
8783
<PropertyGroup>
84+
<DefineConstants>NETSTANDARD2_1_OR_GREATER;SPAN_RUNTIME_SUPPORT</DefineConstants>
85+
</PropertyGroup>
86+
</When>
8887

89-
<!-- NETCORE_RUNTIME: to avoid issues with APIs that assume a specific memory layout, we define a
90-
.NET Core runtime constant to indicate either .NET Core 2.1 or .NET Core 3.1. These are
91-
runtimes with the same overall memory layout for objects (in particular: strings, SZ arrays,
92-
and ND arrays). We can use this constant to make sure that APIs that are exclusively available
93-
for .NET Standard targets do not make any assumtpion of any internals of the runtime being
94-
actually used by the consumers. .NET 5.0 would fall into this category as well, but we don't
95-
need to include that target as it offers APIs that don't require runtime-based workarounds.-->
88+
<When Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
89+
<!--
90+
NETCORE_RUNTIME: to avoid issues with APIs that assume a specific memory layout, we define a
91+
.NET Core runtime constant to indicate either .NET Core 2.1 or .NET Core 3.1. These are
92+
runtimes with the same overall memory layout for objects (in particular: strings, SZ arrays,
93+
and ND arrays). We can use this constant to make sure that APIs that are exclusively available
94+
for .NET Standard targets do not make any assumtpion of any internals of the runtime being
95+
actually used by the consumers. .NET 5.0 would fall into this category as well, but we don't
96+
need to include that target as it offers APIs that don't require runtime-based workarounds.
97+
-->
98+
<PropertyGroup>
9699
<DefineConstants>NETSTANDARD2_1_OR_GREATER;SPAN_RUNTIME_SUPPORT;NETCORE_RUNTIME</DefineConstants>
97100
</PropertyGroup>
98-
</When>
99-
<When Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
100101
<ItemGroup>
101102
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
102103
</ItemGroup>
104+
</When>
105+
106+
<When Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
103107
<PropertyGroup>
104108
<DefineConstants>SPAN_RUNTIME_SUPPORT;NETCORE_RUNTIME</DefineConstants>
105109
</PropertyGroup>
110+
<ItemGroup>
111+
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
112+
</ItemGroup>
106113
</When>
107114
</Choose>
108115

Microsoft.Toolkit.Mvvm/Microsoft.Toolkit.Mvvm.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
</PropertyGroup>
2222

2323
<!-- .NET Standard 2.0 doesn't have the Span<T> and IAsyncEnumerable<T> types -->
24-
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
24+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
2525
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="5.0.0" />
2626
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
2727
<PackageReference Include="System.Memory" Version="4.5.4" />
2828
</ItemGroup>
2929

3030
<!-- .NET Standard 2.1 doesn't have the Unsafe type -->
31-
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
31+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
3232
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
3333
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
3434
</ItemGroup>

Microsoft.Toolkit.Uwp.Connectivity/Microsoft.Toolkit.Uwp.Connectivity.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
1211
<ProjectReference Include="..\Microsoft.Toolkit.Uwp\Microsoft.Toolkit.Uwp.csproj" />
13-
1412
</ItemGroup>
1513

1614
</Project>
Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,5 @@
1-
<!--
2-
This file contains Runtime Directives, specifications about types your application accesses
3-
through reflection and other dynamic code patterns. Runtime Directives are used to control the
4-
.NET Native optimizer and ensure that it does not remove code accessed by your library. If your
5-
library does not do any reflection, then you generally do not need to edit this file. However,
6-
if your library reflects over types, especially types passed to it or derived from its types,
7-
then you should write Runtime Directives.
8-
9-
The most common use of reflection in libraries is to discover information about types passed
10-
to the library. Runtime Directives have three ways to express requirements on types passed to
11-
your library.
12-
13-
1. Parameter, GenericParameter, TypeParameter, TypeEnumerableParameter
14-
Use these directives to reflect over types passed as a parameter.
15-
16-
2. SubTypes
17-
Use a SubTypes directive to reflect over types derived from another type.
18-
19-
3. AttributeImplies
20-
Use an AttributeImplies directive to indicate that your library needs to reflect over
21-
types or methods decorated with an attribute.
22-
23-
For more information on writing Runtime Directives for libraries, please visit
24-
https://go.microsoft.com/fwlink/?LinkID=391919
25-
-->
261
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
272
<Library Name="Microsoft.Toolkit.Uwp.Connectivity">
28-
29-
<!-- add directives for your library here -->
30-
3+
<!-- add directives for your library here -->
314
</Library>
325
</Directives>

Microsoft.Toolkit.Uwp.DeveloperTools/Microsoft.Toolkit.Uwp.DeveloperTools.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
-Themes : Provides the source path of the resource dictionaries for the FocusTracker.
1111
</Description>
1212
<PackageTags>Windows;Community;Toolkit;WCT;UWP;Controls;XAML;Developer;Tools;Accessibility;Alignment;Grid;AlignmentGrid</PackageTags>
13-
<!-- ARM64 builds for managed apps use .NET Native. We can't use the Reflection Provider for that. -->
14-
<EnableTypeInfoReflection Condition="'$(Configuration)' == 'Debug'">false</EnableTypeInfoReflection>
1513
</PropertyGroup>
1614

1715
<ItemGroup>
@@ -26,4 +24,5 @@
2624
<Message Text="CSFiles: @(GeneratedCSFiles->'&quot;%(Identity)&quot;')" />
2725
<Exec Command="for %%f in (@(GeneratedCSFiles->'&quot;%(Identity)&quot;')) do echo #pragma warning disable &gt; %%f.temp &amp;&amp; type %%f &gt;&gt; %%f.temp &amp;&amp; move /y %%f.temp %%f &gt; NUL" />
2826
</Target>
27+
2928
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
22
<Library Name="Microsoft.Toolkit.Uwp.DeveloperTools">
3+
<!-- add directives for your library here -->
34
</Library>
45
</Directives>

0 commit comments

Comments
 (0)