Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Centrally manage NuGet dependencies and its versions #4181

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# Working folders
~build/
~publish/
~packages/

# User-specific files
*.suo
*.user
Expand All @@ -18,7 +23,6 @@
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
Expand Down
13 changes: 7 additions & 6 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<Project>

<Import Project="Directory.Solution.props" />

<PropertyGroup>
<RepositoryDirectory>$(MSBuildThisFileDirectory)</RepositoryDirectory>
<BuildToolsDirectory>$(RepositoryDirectory)build\</BuildToolsDirectory>
Expand All @@ -11,7 +13,6 @@
<When Condition="$(IsCoreProject)">
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageOutputPath>$(RepositoryDirectory)bin\nupkg</PackageOutputPath>
<GenerateLibraryLayout Condition="$(IsUwpProject)">true</GenerateLibraryLayout>
<TreatWarningsAsErrors Condition="'$(Configuration)' == 'Release'">true</TreatWarningsAsErrors>
</PropertyGroup>
Expand All @@ -30,8 +31,8 @@
<PropertyGroup>
<!-- Code CS8002 is a warning for strong named -> non-strong-named reference. This is valid for platforms other than .NET Framework (and is needed for the UWP targets. -->
<NoWarn>$(NoWarn);CS8002</NoWarn>
<!-- For including default @(Page) and @(Resource) items via 'MSBuild.Sdk.Extras' Sdk package. Also provides up to date check and file nesting -->
<ExtrasEnableDefaultXamlItems>true</ExtrasEnableDefaultXamlItems>
<!-- For including default @(Page) and @(Resource) items via 'MSBuild.NET.Extras.Sdk' Sdk package. Also provides up to date check and file nesting -->
<EnableDefaultXamlItems>true</EnableDefaultXamlItems>
</PropertyGroup>
</When>
</Choose>
Expand All @@ -47,15 +48,15 @@
<EnableTypeInfoReflection>false</EnableTypeInfoReflection>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" />
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="All" />
</ItemGroup>
</When>
</Choose>

<Import Project="$(BuildToolsDirectory)Windows.Toolkit.VisualStudio.Design.props" Condition="$(IsDesignProject)" />

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="All" />
<PackageReference Include="Nerdbank.GitVersioning" PrivateAssets="All" />
</ItemGroup>

<Choose>
Expand All @@ -69,7 +70,7 @@
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>
</When>
</Choose>
Expand Down
101 changes: 101 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<Project>

<PropertyGroup Label="Core">
<NETStandardImplicitPackageVersion>2.0.3</NETStandardImplicitPackageVersion>
</PropertyGroup>

<ItemGroup Label="Core">
<!-- UWP SDK -->
<PackageVersion Include="Win2D.uwp" Version="1.26.0" />
<PackageVersion Include="ColorCode.UWP" Version="2.0.12" />
<PackageVersion Include="Microsoft.UI.Xaml" Version="2.7.1" />
<PackageVersion Include="Microsoft.Xaml.Behaviors.Uwp.Managed" Version="2.0.1" />
<PackageVersion Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
<!-- MSBuild .NET Extras SDK refernces the following package implicitly -->
<PackageVersion Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.13" Condition="'$(UsingMSBuildNETExtrasSdk)' != 'true'" />
<!-- C# Compiler SDK -->
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.0.1" />
<!-- Visual Studio DesignTime SDK -->
<PackageVersion Include="Microsoft.VisualStudio.DesignTools.Extensibility" Version="16.4.29519.181" />
</ItemGroup>

<ItemGroup Label="Toolkit">
<PackageVersion Include="Microsoft.Toolkit" Version="7.1.2" />
<PackageVersion Include="Microsoft.Toolkit.Diagnostics" Version="7.1.2" />
<PackageVersion Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" />
</ItemGroup>

<ItemGroup Label="Global">
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.4.255" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.1.118" />
</ItemGroup>

<ItemGroup Label="Samples">
<!-- Store Services SDK -->
<PackageVersion Include="Microsoft.Services.Store.Engagement" Version="10.1901.28001" />
<!-- Forms and Graph Toolkit -->
<PackageVersion Include="Microsoft.Toolkit.Forms.UI.XamlHost" Version="6.1.3" />
<PackageVersion Include="Microsoft.Toolkit.Graph.Controls" Version="7.0.0-preview2" />
<PackageVersion Include="Microsoft.Toolkit.Win32.UI.XamlApplication" Version="6.1.3" />
<!-- Monaco JS Text Editor for WinRT JS -->
<PackageVersion Include="Monaco.Editor" Version="0.9.0-beta" />
</ItemGroup>

<ItemGroup Label="Tests">
<!-- MSTest -->
<PackageVersion Include="MSTest.TestAdapter" Version="2.2.9" />
<PackageVersion Include="MSTest.TestFramework" Version="2.2.9" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<!-- Test Helpers -->
<PackageVersion Include="FluentAssertions" Version="6.6.0" />
<!-- DO NOT UPGRADE: This version is used for upgrade testing between 6.1.1 and 7.0.0 for the Object Serializers -->
<PackageVersion Include="Newtonsoft.Json" Version="10.0.3" Pin="true" />
<!-- WinUI Test Infra -->
<PackageVersion Include="MUXAppTestHelpers" Version="0.0.4" />
<PackageVersion Include="MUXTestInfra.TAEF" Version="0.0.4" />
<PackageVersion Include="MUXTestInfra.MSTest" Version="0.0.4" />
<PackageVersion Include="MUXCustomBuildTasks" Version="1.0.67" />
<PackageVersion Include="TAEF.Redist.Wlk" Version="10.57.200928001" />
<!-- Windows App Test Infra -->
<PackageVersion Include="Microsoft.Windows.Apps.Test" Version="1.0.181205002" />
</ItemGroup>

<ItemGroup Label="System">
<!-- BCL Extensions -->
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="5.0.0" />
<PackageVersion Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
<!-- Dependency Injection -->
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" />
<!-- Windows Registry -->
<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.0" />
<!-- Annotations -->
<PackageVersion Include="System.ComponentModel.Annotations" Version="5.0.0" />
<!-- Diagnostics -->
<PackageVersion Include="System.Diagnostics.Contracts" Version="4.3.0" />
<PackageVersion Include="System.Diagnostics.Process" Version="4.3.0" />
<!-- Drawing -->
<PackageVersion Include="System.Drawing.Common" Version="5.0.3" />
<PackageVersion Include="System.Drawing.Primitives" Version="4.3.0" />
<!-- Memory -->
<PackageVersion Include="System.Memory" Version="4.5.4" />
<!-- Numerics -->
<PackageVersion Include="System.Numerics.Vectors" Version="4.5.0" />
<!-- Reflection -->
<PackageVersion Include="System.Reflection.Emit" Version="4.7.0" />
<PackageVersion Include="System.Reflection.TypeExtensions" Version="4.7.0" />
<!-- Runtime -->
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
<PackageVersion Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
<!-- Tasks -->
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageVersion Include="System.Threading.Tasks.Parallel" Version="4.3.0" />
<!-- Text - JSON -->
<PackageVersion Include="System.Text.Json" Version="5.0.2" />
<!-- Text - XML -->
<PackageVersion Include="System.Xml.ReaderWriter" Version="4.3.1" />
<PackageVersion Include="System.Xml.XPath.XmlDocument" Version="4.3.0" />
</ItemGroup>

</Project>
14 changes: 14 additions & 0 deletions Directory.Solution.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project>

<PropertyGroup>
<ManagePackageVersionsCentrally>True</ManagePackageVersionsCentrally>
<RestoreUseStaticGraphEvaluation>True</RestoreUseStaticGraphEvaluation>
</PropertyGroup>

<!-- Options that are supported only when using the Full MSBuild! -->
<PropertyGroup Condition="'$(MSBuildRuntimeType)' == 'Full'">
<!-- Static Graph Restore doesn't yet support targets like uap10.0 framework -->
<RestoreUseStaticGraphEvaluation>False</RestoreUseStaticGraphEvaluation>
</PropertyGroup>

</Project>
28 changes: 9 additions & 19 deletions GazeInputTest/GazeInputTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,15 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
Expand All @@ -42,17 +40,15 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
Expand All @@ -63,17 +59,15 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>ARM64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
<OutputPath>bin\ARM64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM64</PlatformTarget>
Expand All @@ -84,17 +78,15 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
Expand Down Expand Up @@ -141,9 +133,7 @@
</Page>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.2.12</Version>
</PackageReference>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.Input.GazeInteraction\Microsoft.Toolkit.Uwp.Input.GazeInteraction.csproj">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project Sdk="MSBuild.NET.Extras.Sdk">

<PropertyGroup>
<TargetFrameworks>uap10.0.17763</TargetFrameworks>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project Sdk="MSBuild.NET.Extras.Sdk">

<PropertyGroup>
<TargetFrameworks>uap10.0.17763</TargetFrameworks>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project Sdk="MSBuild.NET.Extras.Sdk">

<PropertyGroup>
<TargetFrameworks>uap10.0.17134</TargetFrameworks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// See the LICENSE file in the project root for more information.

using System;
#if WINDOWS_UWP
#if WINDOWS_UAP
using Windows.Data.Xml.Dom;
#endif

Expand Down Expand Up @@ -80,7 +80,7 @@ public override string ToString()
return GetContent();
}

#if WINDOWS_UWP
#if WINDOWS_UAP
/// <summary>
/// Retrieves the notification XML content as a WinRT Xml document.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

#if WINDOWS_UWP
#if WINDOWS_UAP
using Windows.Data.Xml.Dom;
#endif

Expand Down Expand Up @@ -62,7 +62,7 @@ public override string ToString()
return GetContent();
}

#if WINDOWS_UWP
#if WINDOWS_UAP
/// <summary>
/// Retrieves the notification Xml content as a WinRT Xml document.
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions Microsoft.Toolkit.Uwp.Notifications/Common/BaseElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.IO;
using System.Text;

#if WINDOWS_UWP
#if WINDOWS_UAP
using Windows.Data.Xml.Dom;
#endif

Expand Down Expand Up @@ -40,7 +40,7 @@ public string GetContent()
}
}

#if WINDOWS_UWP
#if WINDOWS_UAP
/// <summary>
/// Retrieves the notification XML content as a WinRT XML document.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

#if WINDOWS_UWP
#if WINDOWS_UAP
using Windows.Data.Xml.Dom;
#endif

Expand All @@ -19,7 +19,7 @@ public interface INotificationContent
/// <returns>The notification Xml content as a string.</returns>
string GetContent();

#if WINDOWS_UWP
#if WINDOWS_UAP
/// <summary>
/// Retrieves the notification Xml content as a WinRT Xml document.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
#if WINDOWS_UWP
#if WINDOWS_UAP

#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// See the LICENSE file in the project root for more information.

using System;
#if WINDOWS_UWP
#if WINDOWS_UAP

#endif

Expand Down
Loading