Skip to content

Commit

Permalink
[workload] Remove Microsoft.Maui.Dependencies pack
Browse files Browse the repository at this point in the history
Reduces the number of nupkgs and MSI files we produce and distribute by
moving the PackageReferences declared in Microsoft.Maui.Dependencies to
BundledVersions.targets.  Explicit package references to
`Microsoft.WindowsAppSDK` and  `Microsoft.Graphics.Win2D` have been
removed.  Referencing `Microsoft.WindwosAppSDK` directly produces the
following warning:

    warning NETSDK1023: A PackageReference for 'Microsoft.WindowsAppSDK' was included in your project. This package is implicitly referenced by the .NET SDK and you do not typically need to reference it from your project. For more information, see https://aka.ms/sdkimplicitrefs

I believe these two packages were only added to work around issues in
earlier versions of VS, and it should be safe to remove them now.
  • Loading branch information
pjcollins committed Jul 14, 2022
1 parent f327fa6 commit 0464e51
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 60 deletions.
1 change: 0 additions & 1 deletion Microsoft.Maui-mac.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"src\\Workload\\Microsoft.Maui.Controls.Runtime\\Microsoft.Maui.Controls.Runtime.csproj",
"src\\Workload\\Microsoft.Maui.Core.Ref\\Microsoft.Maui.Core.Ref.csproj",
"src\\Workload\\Microsoft.Maui.Core.Runtime\\Microsoft.Maui.Core.Runtime.csproj",
"src\\Workload\\Microsoft.Maui.Dependencies\\Microsoft.Maui.Dependencies.csproj",
"src\\Workload\\Microsoft.Maui.Essentials.Ref\\Microsoft.Maui.Essentials.Ref.csproj",
"src\\Workload\\Microsoft.Maui.Essentials.Runtime\\Microsoft.Maui.Essentials.Runtime.csproj",
"src\\Workload\\Microsoft.Maui.Sdk\\Microsoft.Maui.Sdk.csproj",
Expand Down
1 change: 0 additions & 1 deletion Microsoft.Maui.Packages-mac.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"src\\Workload\\Microsoft.Maui.Sdk\\Microsoft.Maui.Sdk.csproj",
"src\\Workload\\Microsoft.Maui.Core.Ref\\Microsoft.Maui.Core.Ref.csproj",
"src\\Workload\\Microsoft.Maui.Core.Runtime\\Microsoft.Maui.Core.Runtime.csproj",
"src\\Workload\\Microsoft.Maui.Dependencies\\Microsoft.Maui.Dependencies.csproj",
"src\\Workload\\Microsoft.Maui.Essentials.Ref\\Microsoft.Maui.Essentials.Ref.csproj",
"src\\Workload\\Microsoft.Maui.Essentials.Runtime\\Microsoft.Maui.Essentials.Runtime.csproj",
"src\\Workload\\Microsoft.NET.Sdk.Maui\\Microsoft.NET.Sdk.Maui.csproj"
Expand Down
1 change: 0 additions & 1 deletion Microsoft.Maui.Packages.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"src\\Workload\\Microsoft.Maui.Sdk\\Microsoft.Maui.Sdk.csproj",
"src\\Workload\\Microsoft.Maui.Core.Ref\\Microsoft.Maui.Core.Ref.csproj",
"src\\Workload\\Microsoft.Maui.Core.Runtime\\Microsoft.Maui.Core.Runtime.csproj",
"src\\Workload\\Microsoft.Maui.Dependencies\\Microsoft.Maui.Dependencies.csproj",
"src\\Workload\\Microsoft.Maui.Essentials.Ref\\Microsoft.Maui.Essentials.Ref.csproj",
"src\\Workload\\Microsoft.Maui.Essentials.Runtime\\Microsoft.Maui.Essentials.Runtime.csproj",
"src\\Workload\\Microsoft.Maui.Resizetizer.Sdk\\Microsoft.Maui.Resizetizer.Sdk.csproj",
Expand Down
7 changes: 0 additions & 7 deletions Microsoft.Maui.sln
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Maui.Core.Ref", "
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Maui.Core.Runtime", "src\Workload\Microsoft.Maui.Core.Runtime\Microsoft.Maui.Core.Runtime.csproj", "{73075C7E-AA0A-4FD6-BBD7-6BD3B43BC2A9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Maui.Dependencies", "src\Workload\Microsoft.Maui.Dependencies\Microsoft.Maui.Dependencies.csproj", "{582BA9EC-420C-4512-8892-37E8F6D1E70F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Maui.Essentials.Ref", "src\Workload\Microsoft.Maui.Essentials.Ref\Microsoft.Maui.Essentials.Ref.csproj", "{28B1E6A8-4EB7-4B82-9552-10C418692496}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Maui.Essentials.Runtime", "src\Workload\Microsoft.Maui.Essentials.Runtime\Microsoft.Maui.Essentials.Runtime.csproj", "{C69336DF-EE56-4236-8188-06B2A8AD8A36}"
Expand Down Expand Up @@ -304,10 +302,6 @@ Global
{73075C7E-AA0A-4FD6-BBD7-6BD3B43BC2A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{73075C7E-AA0A-4FD6-BBD7-6BD3B43BC2A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{73075C7E-AA0A-4FD6-BBD7-6BD3B43BC2A9}.Release|Any CPU.Build.0 = Release|Any CPU
{582BA9EC-420C-4512-8892-37E8F6D1E70F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{582BA9EC-420C-4512-8892-37E8F6D1E70F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{582BA9EC-420C-4512-8892-37E8F6D1E70F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{582BA9EC-420C-4512-8892-37E8F6D1E70F}.Release|Any CPU.Build.0 = Release|Any CPU
{28B1E6A8-4EB7-4B82-9552-10C418692496}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{28B1E6A8-4EB7-4B82-9552-10C418692496}.Debug|Any CPU.Build.0 = Debug|Any CPU
{28B1E6A8-4EB7-4B82-9552-10C418692496}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -531,7 +525,6 @@ Global
{C5C434A7-4E1F-456F-A23A-F2566C98301A} = {EC63FD88-5E12-46D7-B440-68F70241D987}
{359FFDAC-3E3C-4A78-98EE-9070841E5792} = {EC63FD88-5E12-46D7-B440-68F70241D987}
{73075C7E-AA0A-4FD6-BBD7-6BD3B43BC2A9} = {EC63FD88-5E12-46D7-B440-68F70241D987}
{582BA9EC-420C-4512-8892-37E8F6D1E70F} = {EC63FD88-5E12-46D7-B440-68F70241D987}
{28B1E6A8-4EB7-4B82-9552-10C418692496} = {EC63FD88-5E12-46D7-B440-68F70241D987}
{C69336DF-EE56-4236-8188-06B2A8AD8A36} = {EC63FD88-5E12-46D7-B440-68F70241D987}
{02414DF4-FBE9-400B-8F3F-40DDC7F8FEFC} = {EC63FD88-5E12-46D7-B440-68F70241D987}
Expand Down
2 changes: 0 additions & 2 deletions omnisharp.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
"src/Workload/Microsoft.Maui.Controls.Runtime/Microsoft.Maui.Controls.Runtime.csproj",
"src/Workload/Microsoft.Maui.Core.Runtime/Microsoft.Maui.Core.Runtime.csproj",
"src/Workload/Microsoft.Maui.Essentials.Ref/Microsoft.Maui.Essentials.Ref.csproj",
"src/Workload/Microsoft.Maui.Dependencies/Microsoft.Maui.Dependencies.csproj",

"Microsoft.Maui.Packages.slnf",
"Microsoft.Maui.Samples.slnf",
"Microsoft.Maui.sln",
Expand Down

This file was deleted.

37 changes: 37 additions & 0 deletions src/Workload/Microsoft.Maui.Sdk/Microsoft.Maui.Sdk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@
<_ValuesToReplace Include="MicrosoftWindowsSDKBuildToolsPackageVersion" PropertyName="MicrosoftWindowsSDKBuildToolsPackageVersion" />
<_ValuesToReplace Include="MicrosoftExtensionsPackageVersion" PropertyName="MicrosoftExtensionsPackageVersion" />
<_ValuesToReplace Include="MicrosoftExtensionsServicingPackageVersion" PropertyName="MicrosoftExtensionsServicingPackageVersion" />
<_ValuesToReplace Include="MicrosoftMauiGraphicsVersion" PropertyName="MicrosoftMauiGraphicsVersion" />
<_ValuesToReplace Include="TizenUIExtensionsVersion" PropertyName="TizenUIExtensionsVersion" />
<_ValuesToReplace Include="_XamarinAndroidGlideVersion" PropertyName="_XamarinAndroidGlideVersion" />
<_ValuesToReplace Include="_XamarinAndroidXSecurityVersion" PropertyName="_XamarinAndroidXSecurityVersion" />
<_ValuesToReplace Include="_XamarinGoogleCryptoTinkAndroidVersion" PropertyName="_XamarinGoogleCryptoTinkAndroidVersion" />
</ItemGroup>

<Import Project="$(MauiRootDirectory)eng/ReplaceText.targets" />
Expand All @@ -79,6 +84,38 @@
SourceFiles="Sdk/BundledVersions.in.targets"
DestinationFiles="$(IntermediateOutputPath)BundledVersions.targets"
/>
<XmlPeek
XmlInputPath="$(MauiRootDirectory)eng\AndroidX.targets"
Query="/Project/ItemGroup/PackageReference[@Update='Xamarin.AndroidX.Browser']/@Version">
<Output TaskParameter="Result" PropertyName="_XamarinAndroidXBrowserVersion" />
</XmlPeek>
<XmlPeek
XmlInputPath="$(MauiRootDirectory)eng\AndroidX.targets"
Query="/Project/ItemGroup/PackageReference[@Update='Xamarin.AndroidX.Legacy.Support.V4']/@Version">
<Output TaskParameter="Result" PropertyName="_XamarinAndroidXLegacySupportV4Version" />
</XmlPeek>
<XmlPeek
XmlInputPath="$(MauiRootDirectory)eng\AndroidX.targets"
Query="/Project/ItemGroup/PackageReference[@Update='Xamarin.AndroidX.Lifecycle.LiveData']/@Version">
<Output TaskParameter="Result" PropertyName="_XamarinAndroidXLifecycleLiveDataVersion" />
</XmlPeek>
<XmlPeek
XmlInputPath="$(MauiRootDirectory)eng\AndroidX.targets"
Query="/Project/ItemGroup/PackageReference[@Update='Xamarin.AndroidX.Navigation.UI']/@Version">
<Output TaskParameter="Result" PropertyName="_XamarinAndroidXNavigationVersion" />
</XmlPeek>
<XmlPeek
XmlInputPath="$(MauiRootDirectory)eng\AndroidX.targets"
Query="/Project/ItemGroup/PackageReference[@Update='Xamarin.Google.Android.Material']/@Version">
<Output TaskParameter="Result" PropertyName="_XamarinGoogleAndroidMaterialVersion" />
</XmlPeek>
<ItemGroup>
<_ValuesToReplace Include="_XamarinAndroidXBrowserVersion" PropertyName="_XamarinAndroidXBrowserVersion" />
<_ValuesToReplace Include="_XamarinAndroidXLegacySupportV4Version" PropertyName="_XamarinAndroidXLegacySupportV4Version" />
<_ValuesToReplace Include="_XamarinAndroidXLifecycleLiveDataVersion" PropertyName="_XamarinAndroidXLifecycleLiveDataVersion" />
<_ValuesToReplace Include="_XamarinAndroidXNavigationVersion" PropertyName="_XamarinAndroidXNavigationVersion" />
<_ValuesToReplace Include="_XamarinGoogleAndroidMaterialVersion" PropertyName="_XamarinGoogleAndroidMaterialVersion" />
</ItemGroup>
<ReplaceText
Input="$(IntermediateOutputPath)BundledVersions.targets"
Output="$(IntermediateOutputPath)BundledVersions.targets"
Expand Down
48 changes: 47 additions & 1 deletion src/Workload/Microsoft.Maui.Sdk/Sdk/BundledVersions.in.targets
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,62 @@
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" '$(UseMaui)' == 'true' or '$(UseMauiCore)' == 'true' or '$(UseMauiEssentials)' == 'true' ">
<PackageReference Include="Microsoft.Maui.Dependencies" Version="$(MauiVersion)" IsImplicitlyDefined="true">
<PackageReference Include="Microsoft.Maui.Graphics" Version="@MicrosoftMauiGraphicsVersion@" IsImplicitlyDefined="true">
<PrivateAssets Condition=" '$(OutputType)' == 'Library' and '$(AndroidApplication)' != 'true' ">all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" ('$(UseMaui)' == 'true' or '$(UseMauiCore)' == 'true' or '$(UseMauiEssentials)' == 'true') and ('$(TargetPlatformIdentifier)' == 'android') ">
<PackageReference Include="Xamarin.Android.Glide" Version="@_XamarinAndroidGlideVersion@" IsImplicitlyDefined="true">
<PrivateAssets Condition=" '$(OutputType)' == 'Library' and '$(AndroidApplication)' != 'true' ">all</PrivateAssets>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Browser" Version="@_XamarinAndroidXBrowserVersion@" IsImplicitlyDefined="true">
<PrivateAssets Condition=" '$(OutputType)' == 'Library' and '$(AndroidApplication)' != 'true' ">all</PrivateAssets>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="@_XamarinAndroidXLegacySupportV4Version@" IsImplicitlyDefined="true">
<PrivateAssets Condition=" '$(OutputType)' == 'Library' and '$(AndroidApplication)' != 'true' ">all</PrivateAssets>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="@_XamarinAndroidXLifecycleLiveDataVersion@" IsImplicitlyDefined="true">
<PrivateAssets Condition=" '$(OutputType)' == 'Library' and '$(AndroidApplication)' != 'true' ">all</PrivateAssets>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Navigation.UI" Version="@_XamarinAndroidXNavigationVersion@" IsImplicitlyDefined="true">
<PrivateAssets Condition=" '$(OutputType)' == 'Library' and '$(AndroidApplication)' != 'true' ">all</PrivateAssets>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Navigation.Fragment" Version="@_XamarinAndroidXNavigationVersion@" IsImplicitlyDefined="true">
<PrivateAssets Condition=" '$(OutputType)' == 'Library' and '$(AndroidApplication)' != 'true' ">all</PrivateAssets>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Navigation.Runtime" Version="@_XamarinAndroidXNavigationVersion@" IsImplicitlyDefined="true">
<PrivateAssets Condition=" '$(OutputType)' == 'Library' and '$(AndroidApplication)' != 'true' ">all</PrivateAssets>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Navigation.Common" Version="@_XamarinAndroidXNavigationVersion@" IsImplicitlyDefined="true">
<PrivateAssets Condition=" '$(OutputType)' == 'Library' and '$(AndroidApplication)' != 'true' ">all</PrivateAssets>
</PackageReference>
<PackageReference Include="Xamarin.Google.Android.Material" Version="@_XamarinGoogleAndroidMaterialVersion@" IsImplicitlyDefined="true">
<PrivateAssets Condition=" '$(OutputType)' == 'Library' and '$(AndroidApplication)' != 'true' ">all</PrivateAssets>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Security.SecurityCrypto" Version="@_XamarinAndroidXSecurityVersion@" IsImplicitlyDefined="true">
<PrivateAssets Condition=" '$(OutputType)' == 'Library' and '$(AndroidApplication)' != 'true' ">all</PrivateAssets>
</PackageReference>
<PackageReference Include="Xamarin.Google.Crypto.Tink.Android" Version="@_XamarinGoogleCryptoTinkAndroidVersion@" IsImplicitlyDefined="true">
<PrivateAssets Condition=" '$(OutputType)' == 'Library' and '$(AndroidApplication)' != 'true' ">all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" ('$(UseMaui)' == 'true' or '$(UseMauiCore)' == 'true' or '$(UseMauiEssentials)' == 'true') and ('$(TargetPlatformIdentifier)' == 'tizen') ">
<PackageReference Include="Tizen.UIExtensions.ElmSharp" Version="@TizenUIExtensionsVersion@" IsImplicitlyDefined="true">
<PrivateAssets Condition=" '$(OutputType)' == 'Library' ">all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Maui.Graphics.Skia" Version="@MicrosoftMauiGraphicsVersion@" IsImplicitlyDefined="true">
<PrivateAssets Condition=" '$(OutputType)' == 'Library' ">all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" '$(UseMaui)' == 'true' and '$(UsingMicrosoftNETSdkRazor)' == 'true' ">
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)" IsImplicitlyDefined="true">
<PrivateAssets Condition=" '$(OutputType)' == 'Library' and '$(AndroidApplication)' != 'true' ">all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" ('$(UseMaui)' == 'true' or '$(UseMauiCore)' == 'true') and ('$(TargetPlatformIdentifier)' == 'windows') ">
<PackageReference Include="Microsoft.Maui.Graphics.Win2D.WinUI.Desktop" Version="@MicrosoftMauiGraphicsVersion@" IsImplicitlyDefined="true">
<PrivateAssets Condition=" '$(OutputType)' == 'Library' ">all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="@MicrosoftWindowsSDKBuildToolsPackageVersion@" IsImplicitlyDefined="true" PrivateAssets="all" />
</ItemGroup>

Expand Down
5 changes: 0 additions & 5 deletions src/Workload/Microsoft.NET.Sdk.Maui/WorkloadManifest.in.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"abstract": true,
"description": ".NET MAUI SDK Core Packages",
"packs": [
"Microsoft.Maui.Dependencies",
"Microsoft.Maui.Sdk",
"Microsoft.Maui.Sdk-@MAUI_PREVIOUS_DOTNET_VERSION@",
"Microsoft.Maui.Graphics",
Expand Down Expand Up @@ -224,10 +223,6 @@
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Dependencies": {
"kind": "library",
"version": "@VERSION@"
},
"Microsoft.Maui.Essentials.Ref.any": {
"kind": "framework",
"version": "@VERSION@"
Expand Down
1 change: 0 additions & 1 deletion src/Workload/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ The idea, is a project to be able to set `$(UseMaui)`:
* `Microsoft.Maui.Core.Runtime.[platform]`
* `Microsoft.Maui.Controls.Ref.[platform]`
* `Microsoft.Maui.Controls.Runtime.[platform]`
* `Microsoft.Maui.Dependencies`
* `Microsoft.Maui.Essentials.Ref.[platform]`
* `Microsoft.Maui.Essentials.Runtime.[platform]`
* `Microsoft.Maui.Templates`
Expand Down

0 comments on commit 0464e51

Please sign in to comment.