Skip to content

Commit

Permalink
Use "MSBuild.NET.Extras.Sdk"
Browse files Browse the repository at this point in the history
This replacement for "MSBuild.Sdk.Extras" contains fixes around UWP project setup and build!
  • Loading branch information
Nirmal4G committed Aug 14, 2021
1 parent ccde6ae commit a3e0d80
Show file tree
Hide file tree
Showing 21 changed files with 25 additions and 28 deletions.
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,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 Down
3 changes: 2 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
<PackageVersion Include="Microsoft.UI.Xaml" Version="2.6.1" />
<PackageVersion Include="Microsoft.Xaml.Behaviors.Uwp.Managed" Version="2.0.1" />
<PackageVersion Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
<PackageVersion Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.12" />
<!-- MSBuild Extras SDK uses implicit package reference -->
<PackageVersion Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.12" Condition="'$(UsingMSBuildNETExtrasSdk)' != 'true'"/>
<!-- C# Compiler SDK -->
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="3.10.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.10.0" />
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
@@ -1,4 +1,4 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project Sdk="MSBuild.NET.Extras.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard1.4;uap10.0.19041;net461;netcoreapp3.1;net5.0;net5.0-windows10.0.17763.0;native</TargetFrameworks>
Expand Down Expand Up @@ -31,7 +31,6 @@
<TargetFrameworkIdentifier>.NETCore</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
<LanguageTargets>$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets</LanguageTargets>
<ExtrasImplicitPlatformPackageIsPrivate>true</ExtrasImplicitPlatformPackageIsPrivate>

<!-- Need to override the built-in implicit defines for UAP or it'll be NETCORE5_0. This makes it UAP10_0_10240_0 to match the rest -->
<ImplicitFrameworkDefine Condition="'$(DisableImplicitFrameworkDefines)' != 'true'">UAP$(TargetPlatformMinVersion.Replace('.', '_'))</ImplicitFrameworkDefine>
Expand Down Expand Up @@ -60,10 +59,6 @@
<PackageReference Include="System.Drawing.Common" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'native'">
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="$(ExtrasUwpMetaPackageVersion)" PrivateAssets="All" IsImplicitlyDefined="true" />
</ItemGroup>

<!-- Native (C++) doesn't need 'System.ValueTuple' (plus it's incompatible with this package) -->
<ItemGroup Condition="'$(TargetFramework)' != 'native'">
<PackageReference Include="System.ValueTuple" />
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>
<UseWindowsDesktopSdk>true</UseWindowsDesktopSdk>
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.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.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.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>
<IncludeBuildOutput>false</IncludeBuildOutput>
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
2 changes: 1 addition & 1 deletion Microsoft.Toolkit.Uwp.UI/Microsoft.Toolkit.Uwp.UI.csproj
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>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
2 changes: 1 addition & 1 deletion Microsoft.Toolkit.Uwp/Microsoft.Toolkit.Uwp.csproj
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
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"msbuild-sdks": {
"MSBuild.Sdk.Extras": "3.0.22"
"MSBuild.NET.Extras.Sdk": "1.3.0-dev.23"
}
}
5 changes: 3 additions & 2 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="AzureLatest" value="https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-MainLatest/nuget/v3/index.json" protocolVersion="3" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="MSBuild-SDKs" value="https://myget.org/F/msbuild-sdks/api/v3/index.json" />
<add key="MUX-Shared" value="https://pkgs.dev.azure.com/ms/microsoft-ui-xaml/_packaging/MUX-Shared/nuget/v3/index.json" />
<add key="AzureLatest" value="https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-MainLatest/nuget/v3/index.json" />
</packageSources>
<disabledPackageSources>
<clear />
Expand Down

0 comments on commit a3e0d80

Please sign in to comment.