TDLR: Microsoft.Maui.* NuGet packages are removed in favor of .NET
Workloads.

See `src/Workloads/README.md` for full details.

The idea, is a project to be able to set `$(UseMaui)`:

    <Project Sdk="Microsoft.NET.Sdk">
      <PropertyGroup>
        <TargetFramework>net6.0-android</TargetFramework>
        <OutputType>Exe</OutputType>
        <UseMaui>true</UseMaui>
      </PropertyGroup>
    </Project>

`$(UseMaui)` automatically brings in the following workload packs:

* `Microsoft.NET.Sdk.Maui`
* `Microsoft.Maui.Controls.Sdk`
* `Microsoft.Maui.Resizetizer.Sdk`
* `Microsoft.Maui.Core.Ref.[platform]`
* `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.Extensions`
* `Microsoft.Maui.Templates`

BlazorWebView is an addition to MAUI, project can currently opt into
it by adding `.Razor` to the `Sdk` attribute.

`<Project Sdk="Microsoft.NET.Sdk.Razor">` sets
`$(UsingMicrosoftNETSdkRazor)`, which triggers the MAUI workload to
include:

* `Microsoft.AspNetCore.Components.WebView.Maui`

This will automatically add these dependencies:

    <PackageReference Include="Microsoft.AspNetCore.Authorization" />
    <PackageReference Include="Microsoft.AspNetCore.Components.WebView" />
    <PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" />
    <PackageReference Include="Microsoft.JSInterop" />

If you are a .NET 6 project, but don't want to use
Microsoft.Maui.Controls you could bring in partial parts of MAUI.

`$(UseMauiAssets)` brings in `Microsoft.Maui.Resizetizer.Sdk`.

`$(UseMauiCore)` brings in:

* `Microsoft.Maui.Core.Ref.[platform]`
* `Microsoft.Maui.Core.Runtime.[platform]`

`$(UseMauiEssentials)` brings in:

* `Microsoft.Maui.Essentials.Ref.[platform]`
* `Microsoft.Maui.Essentials.Runtime.[platform]`

Special files:

* `AutoImport.props` - defines the default includes (or wildcards) for
  Maui projects will go. Note that this is imported by *all* .NET 6
  project types -- *even non-mobile ones*.
* `WorkloadManifest.json` - general .NET workload configuration
* `WorkloadManifest.targets` - imports `Microsoft.Maui.Controls.Sdk` when
  `$(UseMaui)` is `true`. Note that this is imported by *all* .NET 6
  project types -- *even non-mobile ones*.

For further details about .NET Workloads, see these .NET design docs:

* [.NET Optional SDK Workloads](https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workloads.md)
* [Workload Resolvers](https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workload-resolvers.md)
* [Workload Manifests](b82449a228/accepted/2020/workloads/workload-manifest.md)
This commit is contained in:
Jonathan Peppers 2021-06-16 11:59:53 -05:00 коммит произвёл GitHub
Родитель baffb3edfe
Коммит 3f78ce00ab
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
67 изменённых файлов: 1493 добавлений и 198 удалений

Просмотреть файл

@ -1,3 +1,7 @@
<!--
NOTE: this file is only used by projects in the dotnet/maui repo directly.
AutoImport.props should be used by the .NET 6 workload when $(UseMaui) is true.
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Condition="'$(EnableDefaultItems)'=='True' And '$(EnableDefaultXamlItems)'=='True' And '$(EnableDefaultEmbeddedResourceItems)'=='True'">

Просмотреть файл

@ -1,3 +1,8 @@
<!--
NOTE: this file is only used by projects in the dotnet/maui repo directly.
AutoImport.props should be used by the .NET 6 workload when $(UseMaui) is true.
-->
<!-- "Single Project" support - all <ItemGroup/>'s must check if $(EnableDefaultItems) and $(SingleProject) are true -->
<Project>

Просмотреть файл

@ -9,7 +9,7 @@
The actual item groups are in a separate conditionally-imported file as they use constructs that
are not compatible with older MSBuild versions.
-->
<Import Project="$(MSBuildThisFileDirectory)Microsoft.Maui.Controls.DefaultItems.props" Condition="'$(MSBuildSDKsPath)'!=''" />
<Import Project="$(MSBuildThisFileDirectory)Microsoft.Maui.Controls.DefaultItems.props" Condition="'$(UsingMicrosoftMauiControlsSdk)' != 'true' and '$(MSBuildSDKsPath)' != ''" />
<PropertyGroup>
<_IsHotRestartDefined>$([System.Text.RegularExpressions.Regex]::IsMatch('$(DefineConstants.Trim())', '(^|;)HOTRESTART($|;)'))</_IsHotRestartDefined>

Просмотреть файл

@ -210,6 +210,7 @@
Targets="GetMauiItems"
Projects="@(ProjectReference)"
BuildInParallel="true"
Properties="TargetFramework=$(TargetFramework)"
SkipNonexistentProjects="true"
SkipNonexistentTargets="true">
<Output

Просмотреть файл

@ -33,12 +33,16 @@
</PropertyGroup>
<PropertyGroup>
<MauiRootDirectory>$(MSBuildThisFileDirectory)</MauiRootDirectory>
<MauiNuSpecDirectory>$(MSBuildThisFileDirectory).nuspec/</MauiNuSpecDirectory>
<DotNetOutputPath>$(MSBuildThisFileDirectory)bin/</DotNetOutputPath>
<DotNetTempDirectory>$(DotNetOutputPath)temp/</DotNetTempDirectory>
<DotNetDirectory>$(DotNetOutputPath)dotnet/</DotNetDirectory>
<DotNetToolPath>$(DotNetDirectory)dotnet</DotNetToolPath>
<DotNetPacksDirectory>$(DotNetDirectory)packs/</DotNetPacksDirectory>
<DotNetLibraryPacksDirectory>$(DotNetDirectory)library-packs/</DotNetLibraryPacksDirectory>
<DotNetSdkManifestsDirectory>$(DotNetDirectory)sdk-manifests/$(DotNetPreviewVersionBand)/</DotNetSdkManifestsDirectory>
<DotNetTemplatePacksDirectory>$(DotNetDirectory)template-packs/</DotNetTemplatePacksDirectory>
<_MauiBuildTasksLocation>$(_MauiBuildTasksLocation)</_MauiBuildTasksLocation>
<_MauiBuildTasksLocation Condition="'$(_MauiBuildTasksLocation)' == ''">$(MSBuildThisFileDirectory).nuspec\</_MauiBuildTasksLocation>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

Просмотреть файл

@ -44,8 +44,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SingleProject", "SingleProj
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Resizetizer", "src\SingleProject\Resizetizer\src\Resizetizer.csproj", "{9909F93F-C085-4F76-B92A-5D8C516BF47D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Package-net6", "src\Package\Package-net6.csproj", "{5BEB3326-79B4-438C-BF65-274202F387EC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.Xaml-net6", "src\Controls\src\Xaml\Controls.Xaml-net6.csproj", "{CC3D4667-D94E-4276-9311-6439BFD075E4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Maui.Templates", "src\Templates\src\Microsoft.Maui.Templates.csproj", "{DAAC2822-63B6-4DE0-83AE-04873CD2F364}"
@ -92,6 +90,30 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Compon
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebViewAppShared", "src\BlazorWebView\samples\WebViewAppShared\WebViewAppShared.csproj", "{9F1E0CE0-BF56-433F-8238-6C2B880EEF18}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Workload", "Workload", "{EC63FD88-5E12-46D7-B440-68F70241D987}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Maui.Controls.Ref", "src\Workload\Microsoft.Maui.Controls.Ref\Microsoft.Maui.Controls.Ref.csproj", "{91B7E807-1026-4238-A7C2-D7A02C66F141}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Maui.Controls.Runtime", "src\Workload\Microsoft.Maui.Controls.Runtime\Microsoft.Maui.Controls.Runtime.csproj", "{9D8171BD-0F66-4D97-9A38-46800FC6B710}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Maui.Controls.Sdk", "src\Workload\Microsoft.Maui.Controls.Sdk\Microsoft.Maui.Controls.Sdk.csproj", "{C5C434A7-4E1F-456F-A23A-F2566C98301A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Maui.Core.Ref", "src\Workload\Microsoft.Maui.Core.Ref\Microsoft.Maui.Core.Ref.csproj", "{359FFDAC-3E3C-4A78-98EE-9070841E5792}"
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}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Maui.Resizetizer.Sdk", "src\Workload\Microsoft.Maui.Resizetizer.Sdk\Microsoft.Maui.Resizetizer.Sdk.csproj", "{02414DF4-FBE9-400B-8F3F-40DDC7F8FEFC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.Maui", "src\Workload\Microsoft.NET.Sdk.Maui\Microsoft.NET.Sdk.Maui.csproj", "{081EE5E5-69D4-493C-9EB4-47423C4728AB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Maui.Extensions", "src\Workload\Microsoft.Maui.Extensions\Microsoft.Maui.Extensions.csproj", "{6EDE0C1B-B718-4331-99BA-423042CDBE24}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -149,10 +171,6 @@ Global
{9909F93F-C085-4F76-B92A-5D8C516BF47D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9909F93F-C085-4F76-B92A-5D8C516BF47D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9909F93F-C085-4F76-B92A-5D8C516BF47D}.Release|Any CPU.Build.0 = Release|Any CPU
{5BEB3326-79B4-438C-BF65-274202F387EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5BEB3326-79B4-438C-BF65-274202F387EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5BEB3326-79B4-438C-BF65-274202F387EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5BEB3326-79B4-438C-BF65-274202F387EC}.Release|Any CPU.Build.0 = Release|Any CPU
{CC3D4667-D94E-4276-9311-6439BFD075E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CC3D4667-D94E-4276-9311-6439BFD075E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC3D4667-D94E-4276-9311-6439BFD075E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -211,6 +229,50 @@ Global
{9F1E0CE0-BF56-433F-8238-6C2B880EEF18}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9F1E0CE0-BF56-433F-8238-6C2B880EEF18}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9F1E0CE0-BF56-433F-8238-6C2B880EEF18}.Release|Any CPU.Build.0 = Release|Any CPU
{91B7E807-1026-4238-A7C2-D7A02C66F141}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{91B7E807-1026-4238-A7C2-D7A02C66F141}.Debug|Any CPU.Build.0 = Debug|Any CPU
{91B7E807-1026-4238-A7C2-D7A02C66F141}.Release|Any CPU.ActiveCfg = Release|Any CPU
{91B7E807-1026-4238-A7C2-D7A02C66F141}.Release|Any CPU.Build.0 = Release|Any CPU
{9D8171BD-0F66-4D97-9A38-46800FC6B710}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9D8171BD-0F66-4D97-9A38-46800FC6B710}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9D8171BD-0F66-4D97-9A38-46800FC6B710}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9D8171BD-0F66-4D97-9A38-46800FC6B710}.Release|Any CPU.Build.0 = Release|Any CPU
{C5C434A7-4E1F-456F-A23A-F2566C98301A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C5C434A7-4E1F-456F-A23A-F2566C98301A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C5C434A7-4E1F-456F-A23A-F2566C98301A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C5C434A7-4E1F-456F-A23A-F2566C98301A}.Release|Any CPU.Build.0 = Release|Any CPU
{359FFDAC-3E3C-4A78-98EE-9070841E5792}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{359FFDAC-3E3C-4A78-98EE-9070841E5792}.Debug|Any CPU.Build.0 = Debug|Any CPU
{359FFDAC-3E3C-4A78-98EE-9070841E5792}.Release|Any CPU.ActiveCfg = Release|Any CPU
{359FFDAC-3E3C-4A78-98EE-9070841E5792}.Release|Any CPU.Build.0 = Release|Any CPU
{73075C7E-AA0A-4FD6-BBD7-6BD3B43BC2A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{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
{28B1E6A8-4EB7-4B82-9552-10C418692496}.Release|Any CPU.Build.0 = Release|Any CPU
{C69336DF-EE56-4236-8188-06B2A8AD8A36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C69336DF-EE56-4236-8188-06B2A8AD8A36}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C69336DF-EE56-4236-8188-06B2A8AD8A36}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C69336DF-EE56-4236-8188-06B2A8AD8A36}.Release|Any CPU.Build.0 = Release|Any CPU
{02414DF4-FBE9-400B-8F3F-40DDC7F8FEFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{02414DF4-FBE9-400B-8F3F-40DDC7F8FEFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{02414DF4-FBE9-400B-8F3F-40DDC7F8FEFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{02414DF4-FBE9-400B-8F3F-40DDC7F8FEFC}.Release|Any CPU.Build.0 = Release|Any CPU
{081EE5E5-69D4-493C-9EB4-47423C4728AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{081EE5E5-69D4-493C-9EB4-47423C4728AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{081EE5E5-69D4-493C-9EB4-47423C4728AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{081EE5E5-69D4-493C-9EB4-47423C4728AB}.Release|Any CPU.Build.0 = Release|Any CPU
{6EDE0C1B-B718-4331-99BA-423042CDBE24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6EDE0C1B-B718-4331-99BA-423042CDBE24}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6EDE0C1B-B718-4331-99BA-423042CDBE24}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6EDE0C1B-B718-4331-99BA-423042CDBE24}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -249,6 +311,17 @@ Global
{A8E9400E-70DD-421F-8609-1C2FA4AE8E71} = {1614D1A4-5C3D-4D5B-8C89-426E37A564EF}
{5256004D-AA93-4C44-A59E-026E12756BD1} = {1614D1A4-5C3D-4D5B-8C89-426E37A564EF}
{9F1E0CE0-BF56-433F-8238-6C2B880EEF18} = {A8E9400E-70DD-421F-8609-1C2FA4AE8E71}
{91B7E807-1026-4238-A7C2-D7A02C66F141} = {EC63FD88-5E12-46D7-B440-68F70241D987}
{9D8171BD-0F66-4D97-9A38-46800FC6B710} = {EC63FD88-5E12-46D7-B440-68F70241D987}
{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}
{081EE5E5-69D4-493C-9EB4-47423C4728AB} = {EC63FD88-5E12-46D7-B440-68F70241D987}
{6EDE0C1B-B718-4331-99BA-423042CDBE24} = {EC63FD88-5E12-46D7-B440-68F70241D987}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0B8ABEAD-D2B5-4370-A187-62B5ABE4EE50}

Просмотреть файл

@ -38,8 +38,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SingleProject", "SingleProj
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Resizetizer", "src\SingleProject\Resizetizer\src\Resizetizer.csproj", "{9909F93F-C085-4F76-B92A-5D8C516BF47D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Package-net6", "src\Package\Package-net6.csproj", "{5BEB3326-79B4-438C-BF65-274202F387EC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.Xaml-net6", "src\Controls\src\Xaml\Controls.Xaml-net6.csproj", "{CC3D4667-D94E-4276-9311-6439BFD075E4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Maui.Templates", "src\Templates\src\Microsoft.Maui.Templates.csproj", "{DAAC2822-63B6-4DE0-83AE-04873CD2F364}"
@ -109,10 +107,6 @@ Global
{9909F93F-C085-4F76-B92A-5D8C516BF47D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9909F93F-C085-4F76-B92A-5D8C516BF47D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9909F93F-C085-4F76-B92A-5D8C516BF47D}.Release|Any CPU.Build.0 = Release|Any CPU
{5BEB3326-79B4-438C-BF65-274202F387EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5BEB3326-79B4-438C-BF65-274202F387EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5BEB3326-79B4-438C-BF65-274202F387EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5BEB3326-79B4-438C-BF65-274202F387EC}.Release|Any CPU.Build.0 = Release|Any CPU
{CC3D4667-D94E-4276-9311-6439BFD075E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CC3D4667-D94E-4276-9311-6439BFD075E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC3D4667-D94E-4276-9311-6439BFD075E4}.Release|Any CPU.ActiveCfg = Release|Any CPU

Просмотреть файл

@ -0,0 +1,12 @@
{
"solution": {
"path": "Microsoft.Maui-net6.sln",
"projects": [
"src\\Controls\\samples\\Controls.Sample.Droid\\Maui.Controls.Sample.Droid-net6.csproj",
"src\\Controls\\samples\\Controls.Sample.MacCatalyst\\Maui.Controls.Sample.MacCatalyst-net6.csproj",
"src\\Controls\\samples\\Controls.Sample.SingleProject\\Maui.Controls.Sample.SingleProject.csproj",
"src\\Controls\\samples\\Controls.Sample.iOS\\Maui.Controls.Sample.iOS-net6.csproj",
"src\\Controls\\samples\\Controls.Sample\\Maui.Controls.Sample-net6.csproj"
]
}
}

Просмотреть файл

@ -1,11 +1,14 @@
<Project>
<PropertyGroup Condition="'$(TargetFramework.Contains(net6.0))' == 'true'">
<PropertyGroup>
<_UseNet6Packages Condition=" '$(TargetFramework.Contains(net6.0))' == 'true' or '$(PackageType)' == 'DotnetPlatform' ">true</_UseNet6Packages>
</PropertyGroup>
<PropertyGroup Condition=" '$(_UseNet6Packages)' == 'true' ">
<_MicrosoftHostingVersion>6.0.0-preview.5.21301.5</_MicrosoftHostingVersion>
<_MicrosoftDependencyInjectionVersion>$(_MicrosoftHostingVersion)</_MicrosoftDependencyInjectionVersion>
<_MicrosoftFileProvidersVersion>6.0.0-preview.5.21301.5</_MicrosoftFileProvidersVersion>
<_MicrosoftSystemCodeDomVersion>6.0.0-preview.5.21301.5</_MicrosoftSystemCodeDomVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework.Contains(net6.0))' != 'true'">
<PropertyGroup Condition=" '$(_UseNet6Packages)' != 'true' ">
<_MicrosoftHostingVersion>5.0.0</_MicrosoftHostingVersion>
<_MicrosoftDependencyInjectionVersion>5.0.1</_MicrosoftDependencyInjectionVersion>
<_MicrosoftFileProvidersVersion>5.0.6</_MicrosoftFileProvidersVersion>
@ -25,6 +28,10 @@
<MtouchExtraArgs>$(MtouchExtraArgs) --setenv:MONO_THREADS_SUSPEND=preemptive</MtouchExtraArgs>
</PropertyGroup>
<ItemGroup>
<PackageReference
Update="Reloadify3000"
Version="1.0.6"
/>
<PackageReference
Update="Microsoft.Maui.Graphics"
Version="$(_MicrosoftMauiGraphics)"

20
eng/ReplaceText.targets Normal file
Просмотреть файл

@ -0,0 +1,20 @@
<Project>
<UsingTask TaskName="ReplaceText"
TaskFactory="RoslynCodeTaskFactory"
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<ParameterGroup>
<Input ParameterType="System.String" Required="true" />
<Output ParameterType="System.String" Required="true" />
<OldValue ParameterType="System.String" Required="true" />
<NewValue ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Using Namespace="System.IO" />
<Code Type="Fragment" Language="cs">
<![CDATA[
File.WriteAllText(Output, File.ReadAllText(Input).Replace(OldValue, NewValue));
]]>
</Code>
</Task>
</UsingTask>
</Project>

Просмотреть файл

@ -256,13 +256,11 @@ stages:
- script: dotnet cake --configuration=Release
displayName: pack nugets
- task: CopyFiles@2
displayName: 'Copy SignList.xml Files'
condition: always()
displayName: 'Copy files to staging'
inputs:
Contents: |
**/Microsoft.Maui.*.nupkg
**/Microsoft.Maui.*.snupkg
**/Microsoft.AspNetCore.Components.WebView.*.nupkg
**/Microsoft.AspNetCore.Components.WebView.*.snupkg
artifacts/*nupkg
**/SignList.xml
TargetFolder: $(build.artifactstagingdirectory)
flattenFolders: true
@ -281,15 +279,15 @@ stages:
ArtifactName: ${{ BuildPlatform.artifact }}
- stage: build_net6
displayName: Build .NET 6
dependsOn: []
displayName: .NET 6 Samples
dependsOn: pack_net6
jobs:
- ${{ each BuildPlatform in parameters.BuildPlatforms }}:
- ${{ each BuildCondition in parameters.BuildConfigurations }}:
- job: build_net6_${{ BuildPlatform.name }}_${{ BuildCondition }}
workspace:
clean: all
displayName: Build .NET 6 (${{ BuildPlatform.name }} | ${{ BuildCondition }})
displayName: .NET 6 Samples (${{ BuildPlatform.name }} | ${{ BuildCondition }})
timeoutInMinutes: 120
condition: or(
${{ parameters.BuildEverything }},
@ -328,22 +326,19 @@ stages:
displayName: configure vsmac xcode
- script: echo '##vso[task.setvariable variable=JI_JAVA_HOME]$(JAVA_HOME_11_X64)'
displayName: set JI_JAVA_HOME
- ${{ if eq(BuildPlatform.name, 'windows') }}:
- task: xamops.azdevex.provisionator-task.provisionator@1
displayName: 'Provision VSWindows'
inputs:
provisioning_script: $(provisionator.vs2019)
- task: DownloadPipelineArtifact@2
displayName: download nuget
inputs:
artifact: nuget
patterns: '**/*.nupkg'
path: $(System.DefaultWorkingDirectory)/artifacts
- pwsh: |
& dotnet build src/DotNet/DotNet.csproj -bl:$(LogDirectory)/$(BuildConfiguration)-dotnet.binlog
& dotnet build src/DotNet/DotNet.csproj -p:InstallWorkloadPacks=false -bl:$(LogDirectory)/$(BuildConfiguration)-dotnet.binlog
$env:PATH = (Join-Path '$(System.DefaultWorkingDirectory)' 'bin/dotnet') + [IO.Path]::PathSeparator + $env:PATH
& $(DotNet.Path) build Microsoft.Maui.BuildTasks-net6.sln -c $(BuildConfiguration) -bl:$(LogDirectory)/$(BuildConfiguration)-buildtasks.binlog
& $(DotNet.Path) build src/Controls/samples/Controls.Sample.Droid/Maui.Controls.Sample.Droid-net6.csproj -c $(BuildConfiguration) -bl:$(LogDirectory)/$(BuildConfiguration)-android.binlog
& $(DotNet.Path) build src/Controls/samples/Controls.Sample.iOS/Maui.Controls.Sample.iOS-net6.csproj -c $(BuildConfiguration) -bl:$(LogDirectory)/$(BuildConfiguration)-iOS.binlog
& $(DotNet.Path) build src/Controls/samples/Controls.Sample.MacCatalyst/Maui.Controls.Sample.MacCatalyst-net6.csproj -c $(BuildConfiguration) -bl:$(LogDirectory)/$(BuildConfiguration)-MacCatalyst.binlog
& $(DotNet.Path) build src/Controls/samples/Controls.Sample.SingleProject/Maui.Controls.Sample.SingleProject.csproj -c $(BuildConfiguration) -bl:$(LogDirectory)/$(BuildConfiguration)-SingleProject.binlog
& $(DotNet.Path) build Microsoft.Maui-net6.sln -c $(BuildConfiguration) -bl:$(LogDirectory)/$(BuildConfiguration).binlog
& $(DotNet.Path) build src/DotNet/DotNet.csproj -t:Install -bl:$(LogDirectory)/$(BuildConfiguration)-dotnet-install.binlog
& $(DotNet.Path) build Microsoft.Maui.Samples-net6.slnf -c $(BuildConfiguration) -p:UseWorkload=true -bl:$(LogDirectory)/$(BuildConfiguration)-samples.binlog
displayName: build samples
errorActionPreference: stop
- task: PublishBuildArtifacts@1

Просмотреть файл

@ -33,7 +33,10 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Controls\src\Core\Controls.Core-net6.csproj" />
<ProjectReference Include="..\..\..\Core\src\Core-net6.csproj" />
<ProjectReference Include="..\..\..\Controls\src\Core\Controls.Core-net6.csproj" PrivateAssets="all" />
<ProjectReference Include="..\..\..\Core\src\Core-net6.csproj" PrivateAssets="all" />
</ItemGroup>
<Import Project="$(MauiRootDirectory)src\Workload\Shared\LibraryPacks.targets" />
</Project>

Просмотреть файл

@ -3,7 +3,7 @@
<TargetFramework>net6.0-android</TargetFramework>
<RootNamespace>Microsoft.Maui.Controls.Compatibility.Android</RootNamespace>
<AssemblyName>Microsoft.Maui.Controls.Compatibility.Android.FormsViewGroup</AssemblyName>
<OutputType>Library</OutputType>
<IsPackable>false</IsPackable>
<Nullable>disable</Nullable>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -8,9 +8,7 @@
<AndroidRoot>Android\</AndroidRoot>
<iOSRoot>iOS\</iOSRoot>
<WindowsRoot>WinUI\</WindowsRoot>
</PropertyGroup>
<PropertyGroup>
<PackageId>Microsoft.Maui.Controls.Compatibility</PackageId>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.Contains('-windows')) == true ">

Просмотреть файл

@ -2,12 +2,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.1;netstandard2.0;$(MauiPlatforms)</TargetFrameworks>
<AssemblyName>Microsoft.Maui.Controls.Maps</AssemblyName>
</PropertyGroup>
<PropertyGroup>
<PackageId>Microsoft.Maui.Controls.Maps</PackageId>
</PropertyGroup>
<PropertyGroup>
<Description>Provides Maps support for Microsoft MAUI Controls</Description>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Core\Controls.Core-net6.csproj" />

Просмотреть файл

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0-android</TargetFramework>
@ -14,11 +14,12 @@
<AndroidEnvironment Include="environment.txt" />
</ItemGroup>
<ItemGroup>
<ItemGroup Condition=" '$(UseMaui)' != 'true' ">
<ProjectReference Include="..\..\..\Core\src\Core-net6.csproj" />
<ProjectReference Include="..\..\..\Compatibility\Core\src\Compatibility-net6.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Controls.Sample\Maui.Controls.Sample-net6.csproj" />
<PackageReference Include="Xamarin.AndroidX.Browser" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0-maccatalyst</TargetFramework>
@ -9,10 +9,12 @@
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<ItemGroup Condition=" '$(UseMaui)' != 'true' ">
<ProjectReference Include="..\..\src\Core\Controls.Core-net6.csproj" />
<ProjectReference Include="..\..\..\Core\src\Core-net6.csproj" />
<ProjectReference Include="..\..\..\Compatibility\Core\src\Compatibility-net6.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Controls.Sample\Maui.Controls.Sample-net6.csproj" />
</ItemGroup>

Просмотреть файл

@ -12,7 +12,7 @@
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<ItemGroup Condition=" '$(UseMaui)' != 'true' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" />
<ProjectReference Include="..\..\..\Compatibility\Core\src\Compatibility-net6.csproj" />
@ -27,6 +27,6 @@
<MauiSplashScreen Include="Resources\AppIcons\appicon_foreground.svg" Color="#FF69B4" />
</ItemGroup>
<Import Project="..\..\..\BlazorWebView\src\Maui\build\Microsoft.AspNetCore.Components.WebView.Maui.targets" />
<Import Condition=" '$(UseMaui)' != 'true' " Project="..\..\..\BlazorWebView\src\Maui\build\Microsoft.AspNetCore.Components.WebView.Maui.targets" />
</Project>

Просмотреть файл

@ -10,18 +10,17 @@
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup>
<ItemGroup Condition=" '$(UseMaui)' != 'true' " >
<PackageReference Include="Microsoft.ProjectReunion" />
<PackageReference Include="Microsoft.ProjectReunion.Foundation" />
<PackageReference Include="Microsoft.ProjectReunion.WinUI" />
<PackageReference Include="Microsoft.Graphics.Win2D" />
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Compatibility\Core\src\Compatibility-net6.csproj" />
<ProjectReference Include="..\..\..\Core\src\Core-net6.csproj" />
<ProjectReference Include="..\..\src\Core\Controls.Core-net6.csproj" />
</ItemGroup>
<ItemGroup>
<Manifest Include="$(ApplicationManifest)" />
<ProjectReference Include="..\Controls.Sample\Maui.Controls.Sample-net6.csproj" />
</ItemGroup>

Просмотреть файл

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0-ios</TargetFramework>
@ -9,10 +9,12 @@
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<ItemGroup Condition=" '$(UseMaui)' != 'true' ">
<ProjectReference Include="..\..\src\Core\Controls.Core-net6.csproj" />
<ProjectReference Include="..\..\..\Core\src\Core-net6.csproj" />
<ProjectReference Include="..\..\..\Compatibility\Core\src\Compatibility-net6.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Controls.Sample\Maui.Controls.Sample-net6.csproj" />
</ItemGroup>

Просмотреть файл

@ -14,14 +14,17 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" />
<PackageReference Include="Microsoft.Extensions.Logging" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" />
</ItemGroup>
<ItemGroup Condition=" '$(UseMaui)' != 'true' ">
<PackageReference Include="Microsoft.Extensions.Configuration" />
<PackageReference Include="Microsoft.Extensions.Logging" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.Contains('-windows')) == true ">
<ItemGroup Condition="'$(UseMaui)' != 'true' and $(TargetFramework.Contains('-windows')) == true ">
<PackageReference Include="Microsoft.ProjectReunion" />
<PackageReference Include="Microsoft.ProjectReunion.Foundation" />
<PackageReference Include="Microsoft.ProjectReunion.WinUI" />
@ -30,6 +33,8 @@
<ItemGroup>
<ProjectReference Include="..\..\..\BlazorWebView\samples\MauiRazorClassLibrarySample\MauiRazorClassLibrarySample.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(UseMaui)' != 'true' ">
<ProjectReference Include="..\..\..\BlazorWebView\src\Maui\Microsoft.AspNetCore.Components.WebView.Maui.csproj" />
<ProjectReference Include="..\..\..\Essentials\src\Essentials-net6.csproj" />
<ProjectReference Include="..\..\src\Core\Controls.Core-net6.csproj" />
@ -49,5 +54,6 @@
<AndroidResource Remove="Resources\**" />
</ItemGroup>
<Import Project="..\..\..\BlazorWebView\src\Maui\build\Microsoft.AspNetCore.Components.WebView.Maui.targets" />
<Import Condition=" '$(UseMaui)' != 'true' " Project="..\..\..\BlazorWebView\src\Maui\build\Microsoft.AspNetCore.Components.WebView.Maui.targets" />
</Project>

Просмотреть файл

@ -1,8 +1,16 @@
<Project>
<PropertyGroup>
<SampleProject>true</SampleProject>
<UseMaui Condition=" '$(UseWorkload)' == 'true' ">true</UseMaui>
</PropertyGroup>
<Import Project="..\..\..\Directory.Build.props" />
<Import Project="$(_MauiBuildTasksLocation)Microsoft.Maui.Core.props"/>
<Import Project="$(_MauiBuildTasksLocation)Microsoft.Maui.Controls.props"/>
<Import Project="../../../Directory.Build.props" />
<!--
We don't want to use cached Microsoft.Maui.* runtime packs.
This can be removed when we get: https://github.com/dotnet/sdk/issues/14044
-->
<PropertyGroup Condition=" '$(UseMaui)' == 'true' ">
<RestoreNoCache>true</RestoreNoCache>
<RestorePackagesPath>$(MauiRootDirectory)packages/</RestorePackagesPath>
</PropertyGroup>
<Import Project="Maui.InTree.props" Condition=" '$(UseMaui)' != 'true' " />
</Project>

Просмотреть файл

@ -1,15 +1,4 @@
<Project>
<Import Project="$(_MauiBuildTasksLocation)Microsoft.Maui.Controls.targets" Condition="'$(BuildingInsideVisualStudio)' == 'true' AND Exists('$(_MauiBuildTasksLocation)Microsoft.Maui.Controls.Build.Tasks.dll')" />
<Import Project="$(_MauiBuildTasksLocation)Microsoft.Maui.Controls.targets" Condition="'$(BuildingInsideVisualStudio)' != 'true'" />
<Import Project="$(_MauiBuildTasksLocation)Microsoft.Maui.Resizetizer.targets" Condition="'$(BuildingInsideVisualStudio)' == 'true' AND Exists('$(_MauiBuildTasksLocation)Microsoft.Maui.Resizetizer.dll')" />
<Import Project="$(_MauiBuildTasksLocation)Microsoft.Maui.Resizetizer.targets" Condition="'$(BuildingInsideVisualStudio)' != 'true'" />
<Import Project="$(_MauiBuildTasksLocation)Microsoft.Maui.Core.targets" />
<Import Project="..\..\..\Directory.Build.targets" />
<ItemGroup Condition="'$(BuildForNet6)' != 'true'">
<ProjectReference Include="$(MSBuildThisFileDirectory)\..\src\SourceGen\Controls.SourceGen.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>
<ItemGroup Condition="'$(BuildForNet6)' == 'true'">
<ProjectReference Include="$(MSBuildThisFileDirectory)\..\src\SourceGen\Controls.SourceGen-net6.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>
<Import Project="Maui.InTree.targets" Condition=" '$(UseMaui)' != 'true' " />
<Import Project="../../../Directory.Build.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,4 @@
<Project>
<Import Project="$(_MauiBuildTasksLocation)Microsoft.Maui.Core.props"/>
<Import Project="$(_MauiBuildTasksLocation)Microsoft.Maui.Controls.props"/>
</Project>

Просмотреть файл

@ -0,0 +1,13 @@
<Project>
<Import Project="$(_MauiBuildTasksLocation)Microsoft.Maui.Controls.targets" Condition="'$(BuildingInsideVisualStudio)' == 'true' AND Exists('$(_MauiBuildTasksLocation)Microsoft.Maui.Controls.Build.Tasks.dll')" />
<Import Project="$(_MauiBuildTasksLocation)Microsoft.Maui.Controls.targets" Condition="'$(BuildingInsideVisualStudio)' != 'true'" />
<Import Project="$(_MauiBuildTasksLocation)Microsoft.Maui.Resizetizer.targets" Condition="'$(BuildingInsideVisualStudio)' == 'true' AND Exists('$(_MauiBuildTasksLocation)Microsoft.Maui.Resizetizer.dll')" />
<Import Project="$(_MauiBuildTasksLocation)Microsoft.Maui.Resizetizer.targets" Condition="'$(BuildingInsideVisualStudio)' != 'true'" />
<Import Project="$(_MauiBuildTasksLocation)Microsoft.Maui.Core.targets" />
<ItemGroup Condition="'$(BuildForNet6)' != 'true'">
<ProjectReference Include="$(MSBuildThisFileDirectory)\..\src\SourceGen\Controls.SourceGen.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>
<ItemGroup Condition="'$(BuildForNet6)' == 'true'">
<ProjectReference Include="$(MSBuildThisFileDirectory)\..\src\SourceGen\Controls.SourceGen-net6.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>
</Project>

Просмотреть файл

@ -19,6 +19,7 @@
<StrongNamerKeyFile>..\..\..\..\eng\microsoft.maui.controls.snk</StrongNamerKeyFile>
<DefineConstants Condition=" '$(_DisableStrongNamer)' != 'True' ">$(DefineConstants);STRONG_NAME</DefineConstants> -->
<IsTrimmable>false</IsTrimmable>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
@ -33,13 +34,6 @@
<!-- <PackageReference Include="StrongNamer" Version="0.2.5" PrivateAssets="all" GeneratePathProperty="true" /> -->
</ItemGroup>
<PropertyGroup>
<PackageId>Microsoft.Maui.Controls.Build.Tasks</PackageId>
<IncludeBuildOutput>False</IncludeBuildOutput>
<NoWarn>$(NoWarn);NU5100;NU5128;</NoWarn>
<IncludeSymbols>False</IncludeSymbols>
</PropertyGroup>
<ItemGroup>
<None Include="$(TargetPath)" Visible="False" Pack="True" PackagePath="buildTransitive" />

Просмотреть файл

@ -4,9 +4,8 @@
<RootNamespace>Microsoft.Maui.Controls</RootNamespace>
<AssemblyName>Microsoft.Maui.Controls</AssemblyName>
<Nullable>disable</Nullable>
<NoWarn>$(NoWarn);NU5128</NoWarn>
<IsPackable>false</IsPackable>
<_MauiDesignDllBuild Condition=" '$(OS)' != 'Unix' And '$(MSBuildRuntimeType)' == 'Full'">True</_MauiDesignDllBuild>
<PackageId>Microsoft.Maui.Controls</PackageId>
<GitInfoReportImportance>high</GitInfoReportImportance>
</PropertyGroup>

Просмотреть файл

@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<AssemblyName>Microsoft.Maui.Controls.SourceGen</AssemblyName>
<RootNamespace>Microsoft.Maui.Controls.SourceGen</RootNamespace>
<PackageId>Microsoft.Maui.Controls.SourceGen</PackageId>
<IsPackable>false</IsPackable>
<NoWarn>$(NoWarn);NU5128;</NoWarn>
</PropertyGroup>

Просмотреть файл

@ -5,6 +5,7 @@
<Nullable>enable</Nullable>
<AssemblyName>Microsoft.Maui.Controls.SourceGen</AssemblyName>
<RootNamespace>Microsoft.Maui.Controls.SourceGen</RootNamespace>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -3,8 +3,9 @@
<TargetFrameworks>netstandard2.0;$(MauiPlatforms)</TargetFrameworks>
<AssemblyName>Microsoft.Maui.Controls.Xaml</AssemblyName>
<RootNamespace>Microsoft.Maui.Controls.Xaml</RootNamespace>
<IsPackable>false</IsPackable>
<_MauiDesignDllBuild Condition=" '$(OS)' != 'Unix' And '$(MSBuildRuntimeType)' == 'Full'">True</_MauiDesignDllBuild>
<NoWarn>$(NoWarn);CA2200;NU5128</NoWarn>
<NoWarn>$(NoWarn);CA2200</NoWarn>
<PackageId>Microsoft.Maui.Controls.Xaml</PackageId>
</PropertyGroup>

Просмотреть файл

@ -4,9 +4,7 @@
<RootNamespace>Microsoft.Maui</RootNamespace>
<AssemblyName>Microsoft.Maui</AssemblyName>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<PackageId>Microsoft.Maui.Core</PackageId>
<IsPackable>false</IsPackable>
</PropertyGroup>
<Import Project="..\..\..\.nuspec\Microsoft.Maui.Controls.MultiTargeting.targets" />
<ItemGroup>
@ -19,7 +17,7 @@
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
<PackageReference Include="Microsoft.Maui.Graphics" />
<PackageReference Include="Reloadify3000" Version="1.0.6" />
<PackageReference Include="Reloadify3000" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.Contains('-android'))">
<PackageReference Include="Xamarin.Android.Glide" />

Просмотреть файл

@ -5,9 +5,6 @@
<AssemblyName>Microsoft.Maui</AssemblyName>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<PackageId>Microsoft.Maui</PackageId>
</PropertyGroup>
<Import Project="..\..\..\.nuspec\Microsoft.Maui.Controls.MultiTargeting.targets" />
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" />
@ -15,7 +12,7 @@
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
<PackageReference Include="Microsoft.Maui.Graphics" />
<PackageReference Include="Reloadify3000" Version="1.0.6" />
<PackageReference Include="Reloadify3000" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('MonoAndroid'))">
<PackageReference Include="Xamarin.Android.Glide" />

Просмотреть файл

@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>false</IsPackable>
<InstallWorkloadPacks Condition=" '$(InstallWorkloadPacks)' == '' ">true</InstallWorkloadPacks>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('windows'))">
<DotNetInstallScriptUrl>https://dot.net/v1/dotnet-install.ps1</DotNetInstallScriptUrl>
@ -25,8 +26,84 @@
_AcquirePacks;
</_ProvisionDependsOn>
</PropertyGroup>
<!-- Build target provisions ./bin/dotnet/ -->
<Target Name="_Provision" BeforeTargets="Build" DependsOnTargets="$(_ProvisionDependsOn)" />
<!--
Install target takes artifacts/*.nupkg and installs them to the current 'dotnet'.
Running this with ./bin/dotnet/dotnet will work without elevation.
For a system install, you will need to run this in an admin command-prompt on Windows, or use 'sudo' on Mac.
-->
<Target Name="Install" DependsOnTargets="SetVersions">
<Error
Condition=" '$(MSBuildRuntimeType)' != 'Core' "
Text="You should only run this target with 'dotnet build'."
/>
<PropertyGroup>
<_InstallTempDirectory>$(DotNetTempDirectory)install/</_InstallTempDirectory>
</PropertyGroup>
<!-- Setup Microsoft.NET.Sdk.Maui/WorkloadManifest.* -->
<ItemGroup>
<_PackagesToUnzip Include="$(PackageOutputPath)/Microsoft.NET.Sdk.Maui.Manifest-$(DotNetPreviewVersionBand).*.nupkg" />
</ItemGroup>
<Unzip
SourceFiles="@(_PackagesToUnzip)"
DestinationFolder="$(_InstallTempDirectory)"
/>
<ItemGroup>
<_WorkloadFiles Include="$(_InstallTempDirectory)data/WorkloadManifest.*" />
</ItemGroup>
<CopyWorkloadFiles
Name="Microsoft.NET.Sdk.Maui"
Files="@(_WorkloadFiles)"
WorkloadDirectory="$(MSBuildExtensionsPath)../../sdk-manifests/$(DotNetPreviewVersionBand)"
VersionBand="$(DotNetPreviewVersionBand)"
/>
<RemoveDir Directories="$(_InstallTempDirectory)" />
<!-- Run 'dotnet workload install' -->
<PropertyGroup>
<_ThisDotNet>$(MSBuildExtensionsPath)../../dotnet</_ThisDotNet>
<_NuGetConfig>$(DotNetTempDirectory)NuGet.config</_NuGetConfig>
<_NuGetContent>
<![CDATA[
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="local" value="$(PackageOutputPath)" />
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
<add key="xamarin" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/xamarin-impl/nuget/v3/index.json" />
</packageSources>
</configuration>
]]>
</_NuGetContent>
</PropertyGroup>
<WriteLinesToFile File="$(_NuGetConfig)" Lines="$(_NuGetContent)" Overwrite="true" />
<Exec
WorkingDirectory="$(DotNetTempDirectory)"
Command="&quot;$(_ThisDotNet)&quot; workload install maui --skip-manifest-update --verbosity diag"
/>
<Delete Files="$(_NuGetConfig)" />
<!--
HACK: temporarily put runtime packs in 'library-packs', until they can be resolved from 'packs'
See: https://github.com/dotnet/sdk/issues/14044
-->
<ItemGroup>
<_RuntimePacks Include="$(PackageOutputPath)/*.Runtime.*.nupkg" />
<_RuntimePacks Include="$(PackageOutputPath)/Microsoft.Maui.Extensions.*.nupkg" />
</ItemGroup>
<Copy SourceFiles="@(_RuntimePacks)" DestinationFolder="$(MSBuildExtensionsPath)../../library-packs" SkipUnchangedFiles="true" />
</Target>
<!-- Eventually replaced by eng/Version.targets -->
<Target Name="SetVersions" />
<PropertyGroup>
<!-- These files should invalidate ./bin/dotnet completely -->
<_Inputs>
@ -88,6 +165,7 @@
</Target>
<Target Name="_AcquirePacks"
Condition=" '$(InstallWorkloadPacks)' == 'true' "
Inputs="$(_Inputs);Dependencies/Packs.csproj"
Outputs="$(DotNetPacksDirectory).stamp">
<Exec
@ -102,6 +180,7 @@
TaskFactory="RoslynCodeTaskFactory"
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<ParameterGroup>
<Name ParameterType="System.String" />
<Files ParameterType="System.String[]" Required="true" />
<WorkloadDirectory ParameterType="System.String" Required="true" />
<VersionBand ParameterType="System.String" Required="true" />
@ -113,7 +192,7 @@
// This is only in C#, because the equivalent MSBuild XML would not be pretty.
foreach (var file in Files)
{
var name = Directory.GetParent (file).Parent.Parent.Name;
var name = string.IsNullOrEmpty(Name) ? Directory.GetParent (file).Parent.Parent.Name : Name;
var directory = Path.Combine(WorkloadDirectory, name.Replace($".manifest-{VersionBand}", ""));
Directory.CreateDirectory(directory);
var destination = Path.Combine(directory, Path.GetFileName(file));

Просмотреть файл

@ -5,9 +5,7 @@
<RootNamespace>Microsoft.Maui.Essentials</RootNamespace>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<WarningsNotAsErrors>BI1234</WarningsNotAsErrors>
</PropertyGroup>
<PropertyGroup>
<PackageId>Microsoft.Maui.Essentials</PackageId>
<IsPackable>false</IsPackable>
</PropertyGroup>
<Import Project="..\..\..\.nuspec\Microsoft.Maui.Controls.MultiTargeting.targets" />
<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'android' ">

Просмотреть файл

@ -1,34 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;$(MauiPlatforms)</TargetFrameworks>
<RootNamespace>Microsoft.Maui</RootNamespace>
<AssemblyName>Microsoft.Maui.Package</AssemblyName>
<Nullable>enable</Nullable>
<IncludeBuildOutput>False</IncludeBuildOutput>
<NoWarn>$(NoWarn);NU5100;NU5128;</NoWarn>
</PropertyGroup>
<PropertyGroup>
<PackageId>Microsoft.Maui</PackageId>
<IncludeSymbols>False</IncludeSymbols>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Core\src\Core-net6.csproj" />
<ProjectReference Include="..\Controls\src\Build.Tasks\Controls.Build.Tasks-net6.csproj" />
<ProjectReference Include="..\Controls\src\Core\Controls.Core-net6.csproj" />
<ProjectReference Include="..\Controls\src\Xaml\Controls.Xaml-net6.csproj" />
<ProjectReference Include="..\Essentials\src\Essentials-net6.csproj" />
<ProjectReference Include="..\SingleProject\Resizetizer\src\Resizetizer.csproj" />
<ProjectReference Include="..\Controls\src\SourceGen\Controls.SourceGen-net6.csproj"/>
</ItemGroup>
<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'android' ">
<ProjectReference Include="..\Compatibility\Core\src\Android.FormsViewGroup\Compatibility.Android.FormsViewGroup-net6.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'android' Or '$(TargetPlatformIdentifier)' == 'ios' Or '$(TargetPlatformIdentifier)' == 'maccatalyst' Or '$(TargetPlatformIdentifier)' == 'windows' ">
<ProjectReference Include="..\Compatibility\Core\src\Compatibility-net6.csproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -6,16 +6,10 @@
<AssemblyName>Microsoft.Maui.Resizetizer</AssemblyName>
<!--<Nullable>enable</Nullable>-->
<LangVersion>9.0</LangVersion>
<IncludeBuildOutput>False</IncludeBuildOutput>
<NoWarn>$(NoWarn);NU5100;NU5128;</NoWarn>
<IsPackable>false</IsPackable>
<IsTrimmable>false</IsTrimmable>
</PropertyGroup>
<PropertyGroup>
<PackageId>Microsoft.Maui.Resizetizer</PackageId>
<IncludeSymbols>False</IncludeSymbols>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\MauiSplash.storyboard" LogicalName="MauiSplash.storyboard" />
</ItemGroup>
@ -50,27 +44,7 @@
<None Include="$(PkgNewtonsoft_Json)\lib\netstandard2.0\Newtonsoft.Json.dll" Visible="False" Pack="True" PackagePath="buildTransitive" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Fizzler" Version="1.2.0" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="HarfBuzzSharp" Version="2.6.1.7" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="HarfBuzzSharp.NativeAssets.Linux" Version="2.6.1.7" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="Microsoft.Build.Framework" Version="16.7.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="16.7.0" PrivateAssets="all" />
<PackageReference Include="SkiaSharp" Version="2.80.2" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.80.2" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="2.80.2" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="Svg.Skia" Version="0.4.1" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="Svg.Custom" Version="0.4.1" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="Svg.Picture" Version="0.4.1" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="System.Memory" Version="4.5.4" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="System.Buffers" Version="4.5.1" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="System.IO.UnmanagedMemoryStream" Version="4.3.0" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.7.1" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="System.ObjectModel" Version="4.3.0" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="Svg2VectorDrawable.Net" Version="0.3.0" GeneratePathProperty="true" PrivateAssets="all" />
</ItemGroup>
<Import Project="ResizetizerPackages.projitems" />
<Target Name="_CopyToNuspecDir" AfterTargets="Build">
<ItemGroup>

Просмотреть файл

@ -0,0 +1,23 @@
<Project>
<ItemGroup>
<PackageReference Include="Fizzler" Version="1.2.0" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="HarfBuzzSharp" Version="2.6.1.7" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="HarfBuzzSharp.NativeAssets.Linux" Version="2.6.1.7" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="Microsoft.Build.Framework" Version="16.7.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="16.7.0" PrivateAssets="all" />
<PackageReference Include="SkiaSharp" Version="2.80.2" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.80.2" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="2.80.2" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="Svg.Skia" Version="0.4.1" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="Svg.Custom" Version="0.4.1" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="Svg.Picture" Version="0.4.1" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="System.Memory" Version="4.5.4" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="System.Buffers" Version="4.5.1" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="System.IO.UnmanagedMemoryStream" Version="4.3.0" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.7.1" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="System.ObjectModel" Version="4.3.0" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="Svg2VectorDrawable.Net" Version="0.3.0" GeneratePathProperty="true" PrivateAssets="all" />
</ItemGroup>
</Project>

Просмотреть файл

@ -7,13 +7,13 @@
<Title>.NET MAUI Templates</Title>
<Authors>Microsoft</Authors>
<Description>Templates for .NET MAUI.</Description>
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
<IncludeContentInPack>true</IncludeContentInPack>
<IncludeBuildOutput>false</IncludeBuildOutput>
<IncludeSymbols>false</IncludeSymbols>
<ContentTargetFolders>content</ContentTargetFolders>
<!-- This project has no .NET assemblies, so disable the warning for that -->
<NoWarn>$(NoWarn);NU5128</NoWarn>
<BeforePack>_UpdateTemplateVersions</BeforePack>
</PropertyGroup>
<ItemGroup>
@ -21,28 +21,15 @@
<Compile Remove="**\*" />
</ItemGroup>
<!-- Eventually replaced by eng/Version.targets -->
<Target Name="SetVersions" />
<Target Name="_UpdateTemplateVersions" DependsOnTargets="SetVersions">
<PropertyGroup>
<PackageReferenceVersion Condition="'$(PackageReferenceVersion)' == ''">$(PackageVersion)</PackageReferenceVersion>
</PropertyGroup>
<Target Name="_CopyToTemplatePacks" AfterTargets="Pack">
<ItemGroup>
<_TemplateJsonFile Include="templates\*\.template.config\template.json" />
<_TemplateJsonFileWithContent
Include="@(_TemplateJsonFile)"
Contents="$([System.IO.File]::ReadAllText('%(FullPath)').Replace('MAUI_VERSION_VALUE', '$(PackageReferenceVersion)'))" />
</ItemGroup>
<WriteLinesToFile
File="@(_TemplateJsonFileWithContent -> '$(IntermediateOutputPath)%(Identity)')"
Lines="%(Contents)"
Overwrite="true" />
<ItemGroup>
<FileWrites Include="@(_TemplateJsonFile -> '$(IntermediateOutputPath)%(Identity)')" />
<Content Remove="@(_TemplateJsonFile)" />
<Content Include="@(_TemplateJsonFile -> '$(IntermediateOutputPath)%(Identity)')" PackagePath="$(ContentTargetFolders)\%(Identity)" Pack="true" />
<_PackagesToCopy Include="$(PackageOutputPath)/$(PackageId).*.nupkg" />
</ItemGroup>
<Copy
SourceFiles="@(_PackagesToCopy)"
DestinationFolder="$(DotNetTemplatePacksDirectory)"
SkipUnchangedFiles="true"
/>
</Target>
</Project>

Просмотреть файл

@ -4,6 +4,7 @@
<!-- iOS, Android, MacCatalyst -->
<TargetFrameworks>net6.0-ios;net6.0-android;net6.0-maccatalyst</TargetFrameworks>
<OutputType>Exe</OutputType>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<RootNamespace>MauiApp1</RootNamespace>
@ -36,12 +37,6 @@
<MauiFont Include="Resources\Fonts\*" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="MAUI_VERSION" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="MICROSOFT_EXTENSIONS_VERSION" />
<PackageReference Include="Microsoft.Maui" Version="MAUI_VERSION" />
</ItemGroup>
<PropertyGroup>
<InvariantGlobalization Condition="$(TargetFramework.Contains('-maccatalyst'))">true</InvariantGlobalization>
<RuntimeIdentifier Condition="$(TargetFramework.Contains('-ios'))">iossimulator-x64</RuntimeIdentifier>

Просмотреть файл

@ -4,6 +4,7 @@
<!-- iOS, Android, MacCatalyst -->
<TargetFrameworks>net6.0-ios;net6.0-android;net6.0-maccatalyst</TargetFrameworks>
<OutputType>Exe</OutputType>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<RootNamespace>MauiApp1</RootNamespace>
@ -36,10 +37,6 @@
<MauiFont Include="Resources\Fonts\*" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Maui" Version="MAUI_VERSION" />
</ItemGroup>
<PropertyGroup>
<InvariantGlobalization Condition="$(TargetFramework.Contains('-maccatalyst'))">true</InvariantGlobalization>
<RuntimeIdentifier Condition="$(TargetFramework.Contains('-ios'))">iossimulator-x64</RuntimeIdentifier>

Просмотреть файл

@ -0,0 +1,33 @@
<Project Sdk="Microsoft.Build.NoTargets">
<Import Project="../Shared/Common.targets" />
<Import Project="../Shared/Frameworks.targets" />
<PropertyGroup>
<OutputPath Condition=" '$(MauiPlatformName)' != '' ">$(DotNetPacksDirectory)$(PackageId)/$(PackageVersion)/</OutputPath>
</PropertyGroup>
<!-- Android-only files -->
<ItemGroup Condition=" '$(MauiPlatformName)' == 'android' ">
<_AndroidFiles Include="$(MauiRootDirectory)src/Compatibility/Core/src/Android.FormsViewGroup/bin/$(Configuration)/net6.0-android/ref/Microsoft.Maui.Controls.Compatibility.Android.FormsViewGroup.dll" />
<_AndroidFiles Include="$(MauiRootDirectory)src/Compatibility/Core/src/Android.FormsViewGroup/bin/$(Configuration)/net6.0-android/Microsoft.Maui.Controls.Compatibility.Android.FormsViewGroup.aar" />
<_AndroidFiles Include="$(MauiRootDirectory)src/Compatibility/Core/src/bin/$(Configuration)/net6.0-android/Microsoft.Maui.Controls.Compatibility.aar" />
<None Include="@(_AndroidFiles)" FullTfm="net6.0-android30.0" Tfm="net6.0-android" Profile="Android" />
</ItemGroup>
<ItemGroup>
<None Include="@(_TargetPlatform->'$(MauiRootDirectory)src/Compatibility/Core/src/bin/$(Configuration)/%(Tfm)/ref/Microsoft.Maui.Controls.Compatibility.dll')" />
<None Include="@(_TargetPlatform->'$(MauiRootDirectory)src/Controls/src/Core/bin/$(Configuration)/%(Tfm)/ref/Microsoft.Maui.Controls.dll')" />
<None Include="@(_TargetPlatform->'$(MauiRootDirectory)src/Controls/src/Xaml/bin/$(Configuration)/%(Tfm)/ref/Microsoft.Maui.Controls.Xaml.dll')" />
<None Update="@(None)" CopyToOutputDirectory="PreserveNewest" Visible="false" Link="ref/%(FullTfm)/%(FileName)%(Extension)" />
<_PackageFiles Include="@(None)" PackagePath="ref/%(FullTfm)" TargetPath="ref/%(FullTfm)" />
</ItemGroup>
<ItemGroup Condition=" '$(MauiPlatformName)' == '' ">
<ProjectReference Include="../../../src/Controls/src/Core/Controls.Core-net6.csproj" />
<ProjectReference Include="../../../src/Controls/src/Xaml/Controls.Xaml-net6.csproj" />
<ProjectReference Include="../../../src/Compatibility/Core/src/Compatibility-net6.csproj" />
<ProjectReference Include="../../../src/Compatibility/Core/src/Android.FormsViewGroup/Compatibility.Android.FormsViewGroup-net6.csproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,27 @@
<Project Sdk="Microsoft.Build.NoTargets">
<Import Project="../Shared/Common.targets" />
<Import Project="../Shared/Frameworks.targets" />
<!-- Android-only files -->
<ItemGroup Condition=" '$(MauiPlatformName)' == 'android' ">
<_AndroidFiles Include="$(MauiRootDirectory)src/Compatibility/Core/src/Android.FormsViewGroup/bin/$(Configuration)/net6.0-android/Microsoft.Maui.Controls.Compatibility.Android.FormsViewGroup.dll" />
<None Include="@(_AndroidFiles)" FullTfm="net6.0-android30.0" Tfm="net6.0-android" Profile="Android" />
</ItemGroup>
<ItemGroup>
<None Include="@(_TargetPlatform->'$(MauiRootDirectory)src/Compatibility/Core/src/bin/$(Configuration)/%(Tfm)/Microsoft.Maui.Controls.Compatibility.dll')" />
<None Include="@(_TargetPlatform->'$(MauiRootDirectory)src/Controls/src/Core/bin/$(Configuration)/%(Tfm)/Microsoft.Maui.Controls.dll')" />
<None Include="@(_TargetPlatform->'$(MauiRootDirectory)src/Controls/src/Xaml/bin/$(Configuration)/%(Tfm)/Microsoft.Maui.Controls.Xaml.dll')" />
<None Update="@(None)" CopyToOutputDirectory="PreserveNewest" Visible="false" Link="lib/%(FullTfm)/%(FileName)%(Extension)" />
<_PackageFiles Include="@(None)" PackagePath="lib/%(FullTfm)" TargetPath="lib/%(FullTfm)" />
</ItemGroup>
<ItemGroup Condition=" '$(MauiPlatformName)' == '' ">
<ProjectReference Include="$(MauiRootDirectory)src/Controls/src/Core/Controls.Core-net6.csproj" />
<ProjectReference Include="$(MauiRootDirectory)src/Controls/src/Xaml/Controls.Xaml-net6.csproj" />
<ProjectReference Include="$(MauiRootDirectory)src/Compatibility/Core/src/Compatibility-net6.csproj" />
<ProjectReference Include="$(MauiRootDirectory)src/Compatibility/Core/src/Android.FormsViewGroup/Compatibility.Android.FormsViewGroup-net6.csproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,71 @@
<Project Sdk="Microsoft.Build.NoTargets">
<Import Project="../Shared/Common.targets" />
<PropertyGroup>
<OutputPath>$(DotNetPacksDirectory)$(PackageId)/$(PackageVersion)/</OutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Maui.Graphics" GeneratePathProperty="true" />
<PackageReference Include="Mono.Cecil" Version="0.11.3" GeneratePathProperty="true" />
<PackageReference Include="System.CodeDom" Version="4.7.0" GeneratePathProperty="true" />
</ItemGroup>
<ItemGroup>
<None Remove="**/*.in.*" />
<None Update="@(None)" PackagePath="" />
<_Files Include="$(MauiNuSpecDirectory)Microsoft.Maui.Controls.props" />
<_Files Include="$(MauiNuSpecDirectory)Microsoft.Maui.Controls.targets" />
<_Files Include="$(MauiNuSpecDirectory)Microsoft.Maui.Controls.DefaultItems.targets" />
<_Files Include="$(MauiNuSpecDirectory)Microsoft.Maui.Controls.SingleProject.targets" />
<_Files Include="$(PkgMicrosoft_Maui_Graphics)/lib/netstandard2.0/Microsoft.Maui.Graphics.dll" />
<_Files Include="$(PkgMono_Cecil)/lib/netstandard2.0/Mono.Cecil.dll" />
<_Files Include="$(PkgMono_Cecil)/lib/netstandard2.0/Mono.Cecil.Mdb.dll" />
<_Files Include="$(PkgMono_Cecil)/lib/netstandard2.0/Mono.Cecil.Pdb.dll" />
<_Files Include="$(PkgMono_Cecil)/lib/netstandard2.0/Mono.Cecil.Rocks.dll" />
<_Files Include="$(PkgSystem_CodeDom)/lib/netstandard2.0/System.CodeDom.dll" />
<_Files Include="$(MauiRootDirectory)src/Core/src/bin/$(Configuration)/netstandard2.0/Microsoft.Maui.dll" />
<_Files Include="$(MauiRootDirectory)src/Controls/src/Core/bin/$(Configuration)/netstandard2.0/Microsoft.Maui.Controls.dll" />
<_Files Include="$(MauiRootDirectory)src/Controls/src/Xaml/bin/$(Configuration)/netstandard2.0/Microsoft.Maui.Controls.Xaml.dll" />
<_Files Include="$(MauiRootDirectory)src/Controls/src/Build.Tasks/bin/$(Configuration)/netstandard2.0/Microsoft.Maui.Controls.Build.Tasks.dll" />
<_Files Include="$(MauiRootDirectory)src/Controls/src/SourceGen/bin/$(Configuration)/netstandard2.0/Microsoft.Maui.Controls.SourceGen.dll" />
<None Include="@(_Files)" PackagePath="targets" Link="targets/%(FileName)%(Extension)" Visible="false" />
<None Update="@(None)" CopyToOutputDirectory="PreserveNewest" Pack="true" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(MauiRootDirectory)src/Controls/src/Build.Tasks/Controls.Build.Tasks-net6.csproj" />
<ProjectReference Include="$(MauiRootDirectory)src/Controls/src/SourceGen/Controls.SourceGen-net6.csproj" />
</ItemGroup>
<Import Project="$(MauiRootDirectory)eng/ReplaceText.targets" />
<!-- Eventually replaced by eng/Version.targets -->
<Target Name="SetVersions" />
<Target Name="_GenerateBundledVersions"
BeforeTargets="Build;AssignTargetPaths"
DependsOnTargets="SetVersions"
Inputs="$(MSBuildProjectFile);Sdk/BundledVersions.in.targets"
Outputs="$(IntermediateOutputPath)BundledVersions.targets">
<ReplaceText
Input="Sdk/BundledVersions.in.targets"
Output="$(IntermediateOutputPath)BundledVersions.targets"
OldValue="@VERSION@"
NewValue="$(PackageVersion)"
/>
<ItemGroup>
<None
Include="$(IntermediateOutputPath)BundledVersions.targets"
Link="targets/BundledVersions.targets"
CopyToOutputDirectory="PreserveNewest"
Pack="true"
PackagePath="targets"
Visible="false"
/>
<FileWrites Include="$(IntermediateOutputPath)BundledVersions.targets" />
</ItemGroup>
</Target>
</Project>

Просмотреть файл

@ -0,0 +1,77 @@
<!-- all <ItemGroup/>'s must check if $(EnableDefaultMauiItems) is true -->
<Project>
<!-- Default .NET MAUI files-->
<ItemGroup Condition=" '$(EnableDefaultMauiItems)' == 'true' and '$(EnableDefaultEmbeddedResourceItems)' == 'true' ">
<MauiXaml Condition=" '$(EnableDefaultXamlItems)' == 'true' " Include="**\*.xaml" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);$(DefaultWebContentItemExcludes)" />
<MauiCss Condition=" '$(EnableDefaultCssItems)' == 'true' " Include="**\*.css" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);$(DefaultWebContentItemExcludes)" />
</ItemGroup>
<!--
*SingleProject*
all <ItemGroup/>'s must check if $(SingleProject) is true
-->
<!-- Android -->
<ItemGroup Condition=" '$(EnableDefaultMauiItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'android' and '$(MonoAndroidResourcePrefix)' != '' ">
<AndroidResource Include="$(MonoAndroidResourcePrefix)/*/*.xml" />
<AndroidResource Include="$(MonoAndroidResourcePrefix)/*/*.axml" />
<AndroidResource Include="$(MonoAndroidResourcePrefix)/*/*.png" />
<AndroidResource Include="$(MonoAndroidResourcePrefix)/*/*.jpg" />
<AndroidResource Include="$(MonoAndroidResourcePrefix)/*/*.gif" />
<AndroidResource Include="$(MonoAndroidResourcePrefix)/font/*.ttf" />
<AndroidResource Include="$(MonoAndroidResourcePrefix)/font/*.otf" />
<AndroidResource Include="$(MonoAndroidResourcePrefix)/font/*.ttc" />
<AndroidResource Include="$(MonoAndroidResourcePrefix)/raw/*" Exclude="$(MonoAndroidResourcePrefix)/raw/.*" />
<AndroidAsset Include="$(MonoAndroidAssetsPrefix)/**/*" Exclude="$(MonoAndroidAssetsPrefix)/**/.*/**" />
</ItemGroup>
<!-- iOS -->
<ItemGroup Condition=" '$(EnableDefaultMauiItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'ios' and '$(iOSProjectFolder)' != '' ">
<None Include="$(iOSProjectFolder)Info.plist" LogicalName="Info.plist" />
<ImageAsset
Include="$(iOSProjectFolder)**/*.xcassets/**/*.png;$(iOSProjectFolder)**/*.xcassets/*/*.jpg;$(iOSProjectFolder)**/*.xcassets/**/*.pdf;$(iOSProjectFolder)**/*.xcassets/**/*.json"
Exclude="$(_SingleProjectiOSExcludes)"
Link="%(RecursiveDir)%(FileName)%(Extension)"
Visible="false"
IsDefaultItem="true"
/>
<SceneKitAsset
Include="$(iOSProjectFolder)**/*.scnassets/*"
Exclude="$(_SingleProjectiOSExcludes)"
Link="%(RecursiveDir)%(FileName)%(Extension)"
IsDefaultItem="true"
/>
<InterfaceDefinition
Include="$(iOSProjectFolder)**/*.storyboard;$(iOSProjectFolder)**/*.xib"
Exclude="$(_SingleProjectiOSExcludes)"
Link="%(RecursiveDir)%(FileName)%(Extension)"
IsDefaultItem="true"
/>
</ItemGroup>
<!-- MacCatalyst -->
<ItemGroup Condition=" '$(EnableDefaultMauiItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'maccatalyst' and '$(MacCatalystProjectFolder)' != '' ">
<None Include="$(MacCatalystProjectFolder)Info.plist" LogicalName="Info.plist" />
<ImageAsset
Include="$(MacCatalystProjectFolder)**/*.xcassets/**/*.png;$(MacCatalystProjectFolder)**/*.xcassets/*/*.jpg;$(MacCatalystProjectFolder)**/*.xcassets/**/*.pdf;$(MacCatalystProjectFolder)**/*.xcassets/**/*.json"
Exclude="$(_SingleProjectMacCatalystExcludes)"
Link="%(RecursiveDir)%(FileName)%(Extension)"
Visible="false"
IsDefaultItem="true"
/>
<SceneKitAsset
Include="$(MacCatalystProjectFolder)**/*.scnassets/*"
Exclude="$(_SingleProjectMacCatalystExcludes)"
Link="%(RecursiveDir)%(FileName)%(Extension)"
IsDefaultItem="true"
/>
<InterfaceDefinition
Include="$(MacCatalystProjectFolder)**/*.storyboard;$(MacCatalystProjectFolder)**/*.xib"
Exclude="$(_SingleProjectMacCatalystExcludes)"
Link="%(RecursiveDir)%(FileName)%(Extension)"
IsDefaultItem="true"
/>
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,70 @@
<Project>
<PropertyGroup>
<MicrosoftMauiSdkVersion Condition=" '$(MicrosoftMauiSdkVersion)' == '' ">@VERSION@</MicrosoftMauiSdkVersion>
</PropertyGroup>
<!-- Framework references -->
<ItemGroup>
<_MauiRuntimeIdentifiers Include="android;ios;maccatalyst;windows" />
<KnownFrameworkReference
Condition=" '$(UseMaui)' == 'true' or '$(UseMauiCore)' == 'true' "
Include="Microsoft.Maui.Extensions"
TargetFramework="net6.0"
RuntimeFrameworkName="Microsoft.Maui.Extensions"
DefaultRuntimeFrameworkVersion="$(MicrosoftMauiSdkVersion)"
LatestRuntimeFrameworkVersion="$(MicrosoftMauiSdkVersion)"
TargetingPackName="Microsoft.Maui.Extensions"
TargetingPackVersion="$(MicrosoftMauiSdkVersion)"
RuntimePackNamePatterns="Microsoft.Maui.Extensions"
RuntimePackRuntimeIdentifiers="any"
/>
<KnownFrameworkReference
Condition=" '$(UseMaui)' == 'true' or '$(UseMauiCore)' == 'true' "
Include="Microsoft.Maui.Core"
TargetFramework="net6.0"
RuntimeFrameworkName="Microsoft.Maui.Core"
DefaultRuntimeFrameworkVersion="$(MicrosoftMauiSdkVersion)"
LatestRuntimeFrameworkVersion="$(MicrosoftMauiSdkVersion)"
TargetingPackName="Microsoft.Maui.Core.Ref.$(TargetPlatformIdentifier.ToLowerInvariant())"
TargetingPackVersion="$(MicrosoftMauiSdkVersion)"
RuntimePackNamePatterns="Microsoft.Maui.Core.Runtime.**RID**"
RuntimePackRuntimeIdentifiers="@(_MauiRuntimeIdentifiers)"
Profile="$(TargetPlatformIdentifier)"
/>
<KnownFrameworkReference
Condition=" '$(UseMaui)' == 'true' "
Include="Microsoft.Maui.Controls"
TargetFramework="net6.0"
RuntimeFrameworkName="Microsoft.Maui.Controls"
DefaultRuntimeFrameworkVersion="$(MicrosoftMauiSdkVersion)"
LatestRuntimeFrameworkVersion="$(MicrosoftMauiSdkVersion)"
TargetingPackName="Microsoft.Maui.Controls.Ref.$(TargetPlatformIdentifier.ToLowerInvariant())"
TargetingPackVersion="$(MicrosoftMauiSdkVersion)"
RuntimePackNamePatterns="Microsoft.Maui.Controls.Runtime.**RID**"
RuntimePackRuntimeIdentifiers="@(_MauiRuntimeIdentifiers)"
Profile="$(TargetPlatformIdentifier)"
/>
<KnownFrameworkReference
Condition=" '$(UseMaui)' == 'true' or '$(UseMauiEssentials)' == 'true' "
Include="Microsoft.Maui.Essentials"
TargetFramework="net6.0"
RuntimeFrameworkName="Microsoft.Maui.Essentials"
DefaultRuntimeFrameworkVersion="$(MicrosoftMauiSdkVersion)"
LatestRuntimeFrameworkVersion="$(MicrosoftMauiSdkVersion)"
TargetingPackName="Microsoft.Maui.Essentials.Ref.$(TargetPlatformIdentifier.ToLowerInvariant())"
TargetingPackVersion="$(MicrosoftMauiSdkVersion)"
RuntimePackNamePatterns="Microsoft.Maui.Essentials.Runtime.**RID**"
RuntimePackRuntimeIdentifiers="@(_MauiRuntimeIdentifiers)"
Profile="$(TargetPlatformIdentifier)"
/>
</ItemGroup>
<!-- These implicit <PackageReference/> pull dependencies from NuGet transitively -->
<ItemGroup Condition=" '$(UseMaui)' == 'true' or '$(UseMauiCore)' == 'true' or '$(UseMauiEssentials)' == 'true' ">
<PackageReference Include="Microsoft.Maui.Dependencies" Version="$(MicrosoftMauiSdkVersion)" IsImplicitlyDefined="true" />
</ItemGroup>
<ItemGroup Condition=" '$(UseMaui)' == 'true' and '$(UsingMicrosoftNETSdkRazor)' == 'true' ">
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MicrosoftMauiSdkVersion)" IsImplicitlyDefined="true" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,14 @@
<Project>
<PropertyGroup>
<EnableDefaultMauiItems Condition=" '$(EnableDefaultMauiItems)' == '' ">$(EnableDefaultItems)</EnableDefaultMauiItems>
<EnableDefaultXamlItems Condition=" '$(EnableDefaultXamlItems)' == '' ">$(EnableDefaultMauiItems)</EnableDefaultXamlItems>
<EnableDefaultCssItems Condition=" '$(EnableDefaultCssItems)' == '' ">$(EnableDefaultMauiItems)</EnableDefaultCssItems>
<EnableDefaultEmbeddedResourceItems Condition=" '$(EnableDefaultEmbeddedResourceItems)' == '' ">$(EnableDefaultMauiItems)</EnableDefaultEmbeddedResourceItems>
</PropertyGroup>
<Import Project="../targets/Microsoft.Maui.Controls.targets" />
<ItemGroup Condition=" '$(DisableMauiAnalyzers)' != 'true' ">
<Analyzer Include="$(MSBuildThisFileDirectory)../targets/Microsoft.Maui.Controls.dll" />
<Analyzer Include="$(MSBuildThisFileDirectory)../targets/Microsoft.Maui.Controls.Xaml.dll" />
<Analyzer Include="$(MSBuildThisFileDirectory)../targets/Microsoft.Maui.Controls.SourceGen.dll" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,18 @@
<Project>
<PropertyGroup>
<UsingMicrosoftMauiControlsSdk>true</UsingMicrosoftMauiControlsSdk>
</PropertyGroup>
<!--
We aren't supposed to set properties in AutoImport.props
Importing Microsoft.Maui.Controls.props here instead.
-->
<Import Project="../targets/Microsoft.Maui.Controls.props" />
<!-- Imported last -->
<PropertyGroup>
<AfterMicrosoftNETSdkTargets>$(AfterMicrosoftNETSdkTargets);$(MSBuildThisFileDirectory)Microsoft.Maui.Controls.Sdk.After.targets</AfterMicrosoftNETSdkTargets>
</PropertyGroup>
</Project>

Просмотреть файл

@ -0,0 +1,37 @@
<Project>
<ItemGroup Condition=" '$(DisableImplicitFrameworkReferences)' != 'true' ">
<FrameworkReference
Condition=" '$(UseMaui)' == 'true' or '$(UseMauiCore)' == 'true' "
Include="Microsoft.Maui.Extensions"
IsImplicitlyDefined="true"
Pack="false"
PrivateAssets="All"
/>
<FrameworkReference
Condition=" '$(UseMaui)' == 'true' or '$(UseMauiCore)' == 'true' "
Include="Microsoft.Maui.Core"
IsImplicitlyDefined="true"
Pack="false"
PrivateAssets="All"
/>
<FrameworkReference
Condition=" '$(UseMaui)' == 'true' "
Include="Microsoft.Maui.Controls"
IsImplicitlyDefined="true"
Pack="false"
PrivateAssets="All"
/>
<FrameworkReference
Condition=" '$(UseMaui)' == 'true' or '$(UseMauiEssentials)' == 'true' "
Include="Microsoft.Maui.Essentials"
IsImplicitlyDefined="true"
Pack="false"
PrivateAssets="All"
/>
</ItemGroup>
<Import Project="../targets/BundledVersions.targets" />
<Import Project="Microsoft.Maui.Controls.Sdk.targets" Condition=" '$(UseMaui)' == 'true' " />
</Project>

Просмотреть файл

@ -0,0 +1,26 @@
<Project Sdk="Microsoft.Build.NoTargets">
<Import Project="../Shared/Common.targets" />
<Import Project="../Shared/Frameworks.targets" />
<PropertyGroup>
<OutputPath Condition=" '$(MauiPlatformName)' != '' ">$(DotNetPacksDirectory)$(PackageId)/$(PackageVersion)/</OutputPath>
</PropertyGroup>
<!-- Android-only files -->
<ItemGroup Condition=" '$(MauiPlatformName)' == 'android' ">
<_AndroidFiles Include="$(MauiRootDirectory)src/Core/src/bin/$(Configuration)/net6.0-android/Microsoft.Maui.aar" />
<None Include="@(_AndroidFiles)" FullTfm="net6.0-android30.0" Tfm="net6.0-android" Profile="Android" />
</ItemGroup>
<ItemGroup>
<None Include="@(_TargetPlatform->'$(MauiRootDirectory)src/Core/src/bin/$(Configuration)/%(Tfm)/ref/Microsoft.Maui.dll')" />
<None Update="@(None)" CopyToOutputDirectory="PreserveNewest" Visible="false" Link="ref/%(FullTfm)/%(FileName)%(Extension)" />
<_PackageFiles Include="@(None)" PackagePath="ref/%(FullTfm)" TargetPath="ref/%(FullTfm)" />
</ItemGroup>
<ItemGroup Condition=" '$(MauiPlatformName)' == '' ">
<ProjectReference Include="$(MauiRootDirectory)src/Core/src/Core-net6.csproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.Build.NoTargets">
<Import Project="../Shared/Common.targets" />
<Import Project="../Shared/Frameworks.targets" />
<ItemGroup>
<None Include="@(_TargetPlatform->'$(MauiRootDirectory)src/Core/src/bin/$(Configuration)/%(Tfm)/Microsoft.Maui.dll')" />
<None Update="@(None)" CopyToOutputDirectory="PreserveNewest" Visible="false" Link="lib/%(FullTfm)/%(FileName)%(Extension)" />
<_PackageFiles Include="@(None)" PackagePath="lib/%(FullTfm)" TargetPath="lib/%(FullTfm)" />
</ItemGroup>
<ItemGroup Condition=" '$(MauiPlatformName)' == '' ">
<ProjectReference Include="$(MauiRootDirectory)src/Core/src/Core-net6.csproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,36 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageId>$(MSBuildProjectName)</PackageId>
<TargetFrameworks>$(MauiPlatforms)</TargetFrameworks>
<IncludeBuildOutput>false</IncludeBuildOutput>
<GenerateDependencyFile>false</GenerateDependencyFile>
<IncludeSymbols>false</IncludeSymbols>
<NoWarn>$(NoWarn);NU5128</NoWarn>
</PropertyGroup>
<Import Project="../Shared/LibraryPacks.targets" />
<Import Project="../Shared/WinUI.targets" />
<ItemGroup>
<PackageReference Include="Microsoft.Maui.Graphics" />
<PackageReference Include="Reloadify3000" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'android' ">
<PackageReference Include="Xamarin.Android.Glide" />
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" />
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" />
<PackageReference Include="Xamarin.AndroidX.Navigation.UI" />
<PackageReference Include="Xamarin.AndroidX.Navigation.Fragment" />
<PackageReference Include="Xamarin.AndroidX.Navigation.Runtime" />
<PackageReference Include="Xamarin.AndroidX.Navigation.Common" />
<PackageReference Include="Xamarin.Google.Android.Material" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == '$(WindowsTargetFramework)' ">
<PackageReference Include="Microsoft.ProjectReunion" />
<PackageReference Include="Microsoft.ProjectReunion.Foundation" />
<PackageReference Include="Microsoft.ProjectReunion.WinUI" />
<PackageReference Include="Microsoft.Graphics.Win2D" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,26 @@
<Project Sdk="Microsoft.Build.NoTargets">
<Import Project="../Shared/Common.targets" />
<Import Project="../Shared/Frameworks.targets" />
<PropertyGroup>
<OutputPath Condition=" '$(MauiPlatformName)' != '' ">$(DotNetPacksDirectory)$(PackageId)/$(PackageVersion)/</OutputPath>
</PropertyGroup>
<!-- Android-only files -->
<ItemGroup Condition=" '$(MauiPlatformName)' == 'android' ">
<_AndroidFiles Include="$(MauiRootDirectory)src/Essentials/src/bin/$(Configuration)/net6.0-android/Microsoft.Maui.Essentials.aar" />
<None Include="@(_AndroidFiles)" FullTfm="net6.0-android30.0" Tfm="net6.0-android" Profile="Android" />
</ItemGroup>
<ItemGroup>
<None Include="@(_TargetPlatform->'$(MauiRootDirectory)src/Essentials/src/bin/$(Configuration)/%(Tfm)/ref/Microsoft.Maui.Essentials.dll')" />
<None Update="@(None)" CopyToOutputDirectory="PreserveNewest" Visible="false" Link="ref/%(FullTfm)/%(FileName)%(Extension)" />
<_PackageFiles Include="@(None)" PackagePath="ref/%(FullTfm)" TargetPath="ref/%(FullTfm)" />
</ItemGroup>
<ItemGroup Condition=" '$(MauiPlatformName)' == '' ">
<ProjectReference Include="$(MauiRootDirectory)src/Essentials/src/Essentials-net6.csproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.Build.NoTargets">
<Import Project="../Shared/Common.targets" />
<Import Project="../Shared/Frameworks.targets" />
<ItemGroup>
<None Include="@(_TargetPlatform->'$(MauiRootDirectory)src/Essentials/src/bin/$(Configuration)/%(Tfm)/Microsoft.Maui.Essentials.dll')" />
<None Update="@(None)" CopyToOutputDirectory="PreserveNewest" Visible="false" Link="lib/%(FullTfm)/%(FileName)%(Extension)" />
<_PackageFiles Include="@(None)" PackagePath="lib/%(FullTfm)" TargetPath="lib/%(FullTfm)" />
</ItemGroup>
<ItemGroup Condition=" '$(MauiPlatformName)' == '' ">
<ProjectReference Include="$(MauiRootDirectory)src/Essentials/src/Essentials-net6.csproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,26 @@
<Project Sdk="Microsoft.Build.NoTargets">
<Import Project="../Shared/Common.targets" />
<Import Project="../Shared/FrameworkList.targets" />
<PropertyGroup>
<OutputPath>$(DotNetPacksDirectory)$(PackageId)/$(PackageVersion)/</OutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" GeneratePathProperty="true" />
<_ExtensionsFiles Include="$(PkgMicrosoft_Extensions_Configuration)/lib/netstandard2.0/Microsoft.Extensions.Configuration.dll" />
<_ExtensionsFiles Include="$(PkgMicrosoft_Extensions_DependencyInjection)/lib/netstandard2.1/Microsoft.Extensions.DependencyInjection.dll" />
<_ExtensionsFiles Include="$(PkgMicrosoft_Extensions_Hosting_Abstractions)/lib/netstandard2.1/Microsoft.Extensions.Hosting.Abstractions.dll" />
<_ExtensionsFiles Include="$(PkgMicrosoft_Extensions_FileProviders_Embedded)/lib/netstandard2.0/Microsoft.Extensions.FileProviders.Embedded.dll" />
<_ExtensionsFiles Include="$(PkgMicrosoft_Extensions_Logging_Abstractions)/lib/netstandard2.0/Microsoft.Extensions.Logging.Abstractions.dll" />
<None Include="@(_ExtensionsFiles)" FullTfm="@(_TargetPlatform->'%(FullTfm)')" Tfm="@(_TargetPlatform->'%(Tfm)')" Profile="@(_TargetPlatform->'%(Profile)')" />
<None Update="@(None)" CopyToOutputDirectory="PreserveNewest" Visible="false" Link="lib/net6.0/%(FileName)%(Extension)" />
<_PackageFiles Include="@(None)" PackagePath="lib/net6.0" TargetPath="lib/net6.0" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,54 @@
<Project Sdk="Microsoft.Build.NoTargets">
<Import Project="../Shared/Common.targets" />
<Import Project="$(MauiRootDirectory)src/SingleProject/Resizetizer/src/ResizetizerPackages.projitems" />
<PropertyGroup>
<OutputPath>$(DotNetPacksDirectory)$(PackageId)/$(PackageVersion)/</OutputPath>
</PropertyGroup>
<ItemGroup>
<!-- Default @(None) items go in the root of the .nupkg -->
<None Update="@(None)" PackagePath="" />
<_Files Include="$(MauiNuSpecDirectory)Microsoft.Maui.Resizetizer.targets" />
<_Files Include="$(MauiRootDirectory)src\SingleProject\Resizetizer\src\bin\$(Configuration)\netstandard2.0\Microsoft.Maui.Resizetizer.dll" />
<_Files Include="$(PkgSystem_Memory)\lib\netstandard2.0\System.Memory.dll" />
<_Files Include="$(PkgSystem_Buffers)\lib\netstandard2.0\System.Buffers.dll" />
<_Files Include="$(PkgSystem_Numerics_Vectors)\lib\netstandard2.0\System.Numerics.Vectors.dll" />
<_Files Include="$(PkgSystem_Runtime_CompilerServices_Unsafe)\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll" />
<_Files Include="$(PkgSystem_ObjectModel)\lib\netstandard1.3\System.ObjectModel.dll" />
<_Files Include="$(PkgSvg_Custom)\lib\net461\Svg.Custom.dll" />
<_Files Include="$(PkgSvg_Picture)\lib\net461\Svg.Picture.dll" />
<_Files Include="$(PkgSvg_Skia)\lib\net461\Svg.Skia.dll" />
<_Files Include="$(PkgFizzler)\lib\netstandard2.0\Fizzler.dll" />
<_Files Include="$(PkgSystem_IO_UnmanagedMemoryStream)\lib\netstandard1.3\System.IO.UnmanagedMemoryStream.dll" />
<_Files Include="$(PkgSkiaSharp)\lib\net462\SkiaSharp.dll" />
<_Files Include="$(PkgSkiaSharp)\runtimes\osx\native\libSkiaSharp.dylib" />
<_Files Include="$(PkgSkiaSharp)\runtimes\win-x86\native\libSkiaSharp.dll" Arch="x86/" />
<_Files Include="$(PkgSkiaSharp)\runtimes\win-x64\native\libSkiaSharp.dll" Arch="x64/" />
<_Files Include="$(PkgSkiaSharp)\runtimes\win-arm64\native\libSkiaSharp.dll" Arch="arm64/" />
<_Files Include="$(PkgSkiaSharp_NativeAssets_Linux_NoDependencies)\runtimes\linux-arm\native\libSkiaSharp.so" Arch="arm/" />
<_Files Include="$(PkgSkiaSharp_NativeAssets_Linux_NoDependencies)\runtimes\linux-arm64\native\libSkiaSharp.so" Arch="arm64/" />
<_Files Include="$(PkgSkiaSharp_NativeAssets_Linux_NoDependencies)\runtimes\linux-musl-x64\native\libSkiaSharp.so" Arch="musl-x64/" />
<_Files Include="$(PkgSkiaSharp_NativeAssets_Linux_NoDependencies)\runtimes\linux-x64\native\libSkiaSharp.so" Arch="x64/" />
<_Files Include="$(PkgSkiaSharp_HarfBuzz)\lib\net462\SkiaSharp.HarfBuzz.dll" />
<_Files Include="$(PkgHarfBuzzSharp)\lib\net462\HarfBuzzSharp.dll" />
<_Files Include="$(PkgHarfBuzzSharp)\runtimes\osx\native\libHarfBuzzSharp.dylib" />
<_Files Include="$(PkgHarfBuzzSharp)\runtimes\win-x86\native\libHarfBuzzSharp.dll" Arch="x86/" />
<_Files Include="$(PkgHarfBuzzSharp)\runtimes\win-x64\native\libHarfBuzzSharp.dll" Arch="x64/" />
<_Files Include="$(PkgHarfBuzzSharp)\runtimes\win-arm64\native\libHarfBuzzSharp.dll" Arch="arm64/" />
<_Files Include="$(PkgHarfBuzzSharp_NativeAssets_Linux)\runtimes\linux-arm\native\libHarfBuzzSharp.so" Arch="arm/" />
<_Files Include="$(PkgHarfBuzzSharp_NativeAssets_Linux)\runtimes\linux-arm64\native\libHarfBuzzSharp.so" Arch="arm64/" />
<_Files Include="$(PkgHarfBuzzSharp_NativeAssets_Linux)\runtimes\linux-musl-x64\native\libHarfBuzzSharp.so" Arch="musl-x64/" />
<_Files Include="$(PkgHarfBuzzSharp_NativeAssets_Linux)\runtimes\linux-x64\native\libHarfBuzzSharp.so" Arch="x64/" />
<_Files Include="$(PkgSvg2VectorDrawable_Net)\lib\netstandard2.0\Svg2VectorDrawable.Net.dll" />
<_Files Include="$(PkgNewtonsoft_Json)\lib\netstandard2.0\Newtonsoft.Json.dll" />
<None Include="@(_Files)" PackagePath="targets/%(Arch)" Link="targets/%(Arch)%(FileName)%(Extension)" Visible="false" />
<None Update="@(None)" CopyToOutputDirectory="PreserveNewest" Pack="true" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(MauiRootDirectory)src/SingleProject/Resizetizer/src/Resizetizer.csproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1 @@
<Project />

Просмотреть файл

@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<AfterMicrosoftNETSdkTargets>$(AfterMicrosoftNETSdkTargets);$(MSBuildThisFileDirectory)../targets/Microsoft.Maui.Resizetizer.targets</AfterMicrosoftNETSdkTargets>
</PropertyGroup>
</Project>

Просмотреть файл

@ -0,0 +1,37 @@
<Project Sdk="Microsoft.Build.NoTargets">
<Import Project="../Shared/Common.targets" />
<PropertyGroup>
<PackageId>$(PackageId).Manifest-$(DotNetPreviewVersionBand)</PackageId>
</PropertyGroup>
<Import Project="$(MauiRootDirectory)eng/ReplaceText.targets" />
<ItemGroup>
<None Update="WorkloadManifest.targets" CopyToOutputDirectory="PreserveNewest" Pack="true" PackagePath="data" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../Microsoft.Maui.*/*.csproj" />
</ItemGroup>
<!-- Eventually replaced by eng/Version.targets -->
<Target Name="SetVersions" />
<Target Name="_GenerateWorkloadManifest" BeforeTargets="Build;AssignTargetPaths" DependsOnTargets="SetVersions" Inputs="$(MSBuildProjectFile);WorkloadManifest.in.json" Outputs="$(IntermediateOutputPath)WorkloadManifest.json">
<ReplaceText Input="WorkloadManifest.in.json" Output="$(IntermediateOutputPath)WorkloadManifest.json" OldValue="@VERSION@" NewValue="$(PackageVersion)" />
<ItemGroup>
<None Include="$(IntermediateOutputPath)WorkloadManifest.json" Link="WorkloadManifest.json" CopyToOutputDirectory="PreserveNewest" Pack="true" PackagePath="data" Visible="false" />
<FileWrites Include="$(IntermediateOutputPath)WorkloadManifest.json" />
</ItemGroup>
</Target>
<Target Name="_CopyManifest" AfterTargets="Build">
<ItemGroup>
<_Files Include="$(OutputPath)WorkloadManifest.*" />
</ItemGroup>
<Copy SourceFiles="@(_Files)" DestinationFolder="$(DotNetSdkManifestsDirectory)$(MSBuildProjectName.ToLowerInvariant())" />
</Target>
</Project>

Просмотреть файл

@ -0,0 +1,216 @@
{
"version": "@VERSION@",
"workloads": {
"maui": {
"description": ".NET MAUI SDK for all platforms",
"extends": [
"maui-mobile",
"maui-desktop"
]
},
"maui-mobile": {
"description": ".NET MAUI SDK for Mobile",
"extends": [
"maui-android",
"maui-ios"
]
},
"maui-desktop": {
"description": ".NET MAUI SDK for Desktop",
"extends": [
"maui-maccatalyst",
"maui-windows"
]
},
"maui-core": {
"description": ".NET MAUI SDK Core Packages",
"packs": [
"Microsoft.AspNetCore.Components.WebView.Maui",
"Microsoft.Maui.Dependencies",
"Microsoft.Maui.Controls.Sdk",
"Microsoft.Maui.Extensions",
"Microsoft.Maui.Resizetizer.Sdk",
"Microsoft.Maui.Templates"
]
},
"maui-android": {
"description": ".NET MAUI SDK for Android",
"extends": [
"maui-core",
"microsoft-android-sdk-full"
],
"packs": [
"Microsoft.Maui.Core.Ref.android",
"Microsoft.Maui.Core.Runtime.android",
"Microsoft.Maui.Controls.Ref.android",
"Microsoft.Maui.Controls.Runtime.android",
"Microsoft.Maui.Essentials.Ref.android",
"Microsoft.Maui.Essentials.Runtime.android"
]
},
"maui-maccatalyst": {
"description": ".NET MAUI SDK for Mac Catalyst",
"extends": [
"maui-core",
"microsoft-maccatalyst-sdk-full"
],
"packs": [
"Microsoft.Maui.Core.Ref.maccatalyst",
"Microsoft.Maui.Core.Runtime.maccatalyst",
"Microsoft.Maui.Controls.Ref.maccatalyst",
"Microsoft.Maui.Controls.Runtime.maccatalyst",
"Microsoft.Maui.Essentials.Ref.maccatalyst",
"Microsoft.Maui.Essentials.Runtime.maccatalyst"
]
},
"maui-ios": {
"description": ".NET MAUI SDK for iOS",
"extends": [
"maui-core",
"microsoft-ios-sdk-full"
],
"packs": [
"Microsoft.Maui.Core.Ref.ios",
"Microsoft.Maui.Core.Runtime.ios",
"Microsoft.Maui.Controls.Ref.ios",
"Microsoft.Maui.Controls.Runtime.ios",
"Microsoft.Maui.Essentials.Ref.ios",
"Microsoft.Maui.Essentials.Runtime.ios"
]
},
"maui-windows": {
"description": ".NET MAUI SDK for Windows",
"extends": [ "maui-core" ],
"packs": [
"Microsoft.Maui.Core.Ref.windows",
"Microsoft.Maui.Core.Runtime.windows",
"Microsoft.Maui.Controls.Ref.windows",
"Microsoft.Maui.Controls.Runtime.windows",
"Microsoft.Maui.Essentials.Ref.windows",
"Microsoft.Maui.Essentials.Runtime.windows"
]
}
},
"packs": {
"Microsoft.AspNetCore.Components.WebView.Maui": {
"kind": "library",
"version": "@VERSION@"
},
"Microsoft.Maui.Core.Ref.android": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Core.Ref.maccatalyst": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Core.Ref.ios": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Core.Ref.windows": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Core.Runtime.android": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Core.Runtime.maccatalyst": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Core.Runtime.ios": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Core.Runtime.windows": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Controls.Ref.android": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Controls.Ref.maccatalyst": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Controls.Ref.ios": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Controls.Ref.windows": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Controls.Runtime.android": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Controls.Runtime.maccatalyst": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Controls.Runtime.ios": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Controls.Runtime.windows": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Dependencies": {
"kind": "library",
"version": "@VERSION@"
},
"Microsoft.Maui.Essentials.Ref.android": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Essentials.Ref.maccatalyst": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Essentials.Ref.ios": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Essentials.Ref.windows": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Essentials.Runtime.android": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Essentials.Runtime.maccatalyst": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Essentials.Runtime.ios": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Essentials.Runtime.windows": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Extensions": {
"kind": "framework",
"version": "@VERSION@"
},
"Microsoft.Maui.Controls.Sdk": {
"kind": "sdk",
"version": "@VERSION@"
},
"Microsoft.Maui.Resizetizer.Sdk": {
"kind": "sdk",
"version": "@VERSION@"
},
"Microsoft.Maui.Templates": {
"kind": "template",
"version": "@VERSION@"
}
}
}

Просмотреть файл

@ -0,0 +1,10 @@
<Project>
<Import
Condition=" '$(UseMaui)' == 'true' or '$(UseMauiCore)' == 'true' or '$(UseMauiEssentials)' == 'true' "
Project="Sdk.targets" Sdk="Microsoft.Maui.Controls.Sdk"
/>
<Import
Condition=" '$(UseMaui)' == 'true' or '$(UseMauiAssets)' == 'true' "
Project="Sdk.targets" Sdk="Microsoft.Maui.Resizetizer.Sdk"
/>
</Project>

204
src/Workload/README.md Normal file
Просмотреть файл

@ -0,0 +1,204 @@
# .NET MAUI Workloads
.NET Workloads are a new concept in .NET 6.
The idea, is a project to be able to set `$(UseMaui)`:
```xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios</TargetFrameworks>
<OutputType>Exe</OutputType>
<UseMaui>true</UseMaui>
</PropertyGroup>
</Project>
```
`$(UseMaui)` automatically brings in the following workload packs:
* `Microsoft.NET.Sdk.Maui`
* `Microsoft.Maui.Controls.Sdk`
* `Microsoft.Maui.Resizetizer.Sdk`
* `Microsoft.Maui.Core.Ref.[platform]`
* `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.Extensions`
* `Microsoft.Maui.Templates`
BlazorWebView is an addition to MAUI, project can currently opt into
it by adding `.Razor` to the `Sdk` attribute.
`<Project Sdk="Microsoft.NET.Sdk.Razor">` sets
`$(UsingMicrosoftNETSdkRazor)`, which triggers the MAUI workload to
include:
* `Microsoft.AspNetCore.Components.WebView.Maui`
This will automatically add these dependencies:
```xml
<PackageReference Include="Microsoft.AspNetCore.Authorization" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" />
<PackageReference Include="Microsoft.JSInterop" />
```
If you are a .NET 6 project, but don't want to use
Microsoft.Maui.Controls you could bring in partial parts of MAUI.
`$(UseMauiAssets)` brings in `Microsoft.Maui.Resizetizer.Sdk`.
`$(UseMauiCore)` brings in:
* `Microsoft.Maui.Core.Ref.[platform]`
* `Microsoft.Maui.Core.Runtime.[platform]`
`$(UseMauiEssentials)` brings in:
* `Microsoft.Maui.Essentials.Ref.[platform]`
* `Microsoft.Maui.Essentials.Runtime.[platform]`
Special files:
* `AutoImport.props` - defines the default includes (or wildcards) for
Maui projects will go. Note that this is imported by *all* .NET 6
project types -- *even non-mobile ones*.
* `WorkloadManifest.json` - general .NET workload configuration
* `WorkloadManifest.targets` - imports `Microsoft.Maui.Controls.Sdk` when
`$(UseMaui)` is `true`. Note that this is imported by *all* .NET 6
project types -- *even non-mobile ones*.
For further details about .NET Workloads, see these .NET design docs:
* [.NET Optional SDK Workloads](https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workloads.md)
* [Workload Resolvers](https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workload-resolvers.md)
* [Workload Manifests](https://github.com/mhutch/designs/blob/b82449a228c0addb95b5a4995bb838749ea6f8cc/accepted/2020/workloads/workload-manifest.md)
## .NET MAUI Workload Ids
A .NET "workload" is a collection of packs.
.NET MAUI will have several workload ids depending on what needs to be
installed:
* `maui`: everything
* `maui-mobile`: iOS & Android
* `maui-desktop`: Mac Catalyst & Windows
* `maui-core`: required by all platforms
* `maui-android`
* `maui-maccatalyst`
* `maui-macos`
* `maui-windows`
Eventually, Android will have a `microsoft-android-sdk-minimal`
workload id that excludes AOT compilers. We'll need to modify some of
the MAUI workload ids when this is available.
These ids will not map exactly to the Visual Studio Installer's
concept of a "workload". Consider the following diagram for what .NET
developers would get from the choices of `mobile`, `maui`, or
`desktop`:
![Workload Diagram](docs/workload-diagram.png)
## Using the .NET MAUI Workload
After you've done a build, such as:
```dotnetcli
$ dotnet cake
```
You'll have various `artifacts/*.nupkg` files produced, as well as the
proper files copied to `./bin/dotnet`.
At this point, you can build the samples using `-p:UseWorkload=true`.
This uses the workload instead of the `<ProjectReference/>` that are
declared:
```dotnetcli
$ git clean -dxf src/Controls/samples/
$ ./bin/dotnet/dotnet build Microsoft.Maui.Samples-net6.slnf -p:UseWorkload=true
```
### Install System-Wide
Once you have `artifacts/*.nupkg` locally, you can install them in a
system-wide dotnet install in `/usr/local/share/dotnet/` or
`C:\Program Files\dotnet\`.
On macOS, you could do:
```dotnetcli
$ sudo dotnet build src/DotNet/DotNet.csproj -t:Install
```
On Windows, you would use an Administrator command prompt:
```dotnetcli
> dotnet build src/DotNet/DotNet.csproj -t:Install
```
`DotNet.csproj` will install the workload in the instance of `dotnet`
that you run it under.
### CI for dotnet/maui
On CI in order to test the workload, we download the `.nupkg` files to
`artifacts` and provision a .NET 6 without mobile workload packs via
`-p:InstallWorkloadPacks=false`:
```dotnetcli
$ dotnet build src/DotNet/DotNet.csproj -p:InstallWorkloadPacks=false
```
Next, we can use the new `Install` target to extract from `artifacts/*.nupkg`:
```dotnetcli
$ ./bin/dotnet/dotnet build src/DotNet/DotNet.csproj -t:Install
```
Then we can build samples with `-p:UseWorkload=true`:
```dotnetcli
$ ./bin/dotnet/dotnet build Microsoft.Maui.Samples-net6.slnf -p:UseWorkload=true
```
## Cleanup .NET 6 installs & workloads
Sometimes your .NET 6 install might get "hosed", so these are some
quick instructions on how to uninstall .NET 6 and all workloads to
start fresh.
By default .NET 6 is installed in:
* Windows: `C:\Program Files\dotnet\`
* macOS: `/usr/local/share/dotnet/`
On Windows, start by going to `Control Panel` > `Programs and
Features` and uninstall .NET 6. Files will still be left behind after
doing this. macOS doesn't really have a way to uninstall `.pkg` files,
so we'll just be deleting files manually.
Manually remove these directories:
* `dotnet/library-packs`
* `dotnet/metadata`
* `dotnet/packs/Microsoft.Android.*`
* `dotnet/packs/Microsoft.iOS.*`
* `dotnet/packs/Microsoft.MacCatalyst.*`
* `dotnet/packs/Microsoft.macOS.*`
* `dotnet/packs/Microsoft.Maui.*`
* `dotnet/packs/Microsoft.tvOS.*`
* `dotnet/sdk/6.0.100-*`
* `dotnet/sdk-manifests`
* `dotnet/template-packs`
These folders are all .NET 6 specific, so they won't affect .NET 5 or
older versions.
After this you can install .NET 6 with a fresh install of your choice.

Просмотреть файл

@ -0,0 +1,12 @@
<Project>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageType>DotnetPlatform</PackageType>
<PackageId>$(MSBuildProjectName)</PackageId>
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<GenerateDependencyFile>false</GenerateDependencyFile>
<IncludeSymbols>false</IncludeSymbols>
<NoWarn>$(NoWarn);NU5100;NU5128;NU5130;NU5131</NoWarn>
</PropertyGroup>
</Project>

Просмотреть файл

@ -0,0 +1,45 @@
<Project>
<ItemGroup>
<_FrameworkListFile Condition=" !$(MSBuildProjectName.Contains('.Runtime')) " Include="$(IntermediateOutputPath)FrameworkList.xml" />
<_FrameworkListFile Condition=" !$(MSBuildProjectName.Contains('.Ref')) " Include="$(IntermediateOutputPath)RuntimeList.xml" />
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.21169.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21169.1" PrivateAssets="all" />
</ItemGroup>
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk" Version="6.0.0-beta.21065.3" />
<UsingTask TaskName="CreateFrameworkListFile" AssemblyFile="$(DotNetBuildTasksSharedFrameworkTaskFile)"/>
<!-- https://github.com/dotnet/runtime/blob/0647ec314948904319da5eb15e9931f7c85ed1e2/src/installer/pkg/projects/Directory.Build.targets#L281 -->
<Target Name="_GenerateFrameworkListFile"
BeforeTargets="Build;AssignTargetPaths">
<ItemGroup>
<_RootAttribute Include="Name" Value=".NET MAUI" />
<_RootAttribute Include="TargetFrameworkIdentifier" Value=".NETCoreApp" />
<_RootAttribute Include="TargetFrameworkVersion" Value="6.0" />
<_RootAttribute Include="FrameworkName" Value="$(MSBuildProjectName.Replace('.Ref','').Replace('.Runtime',''))" />
<_AssemblyFiles Include="@(_PackageFiles->WithMetadataValue('Extension', '.dll'))" />
<_Classifications Include="@(_AssemblyFiles->'%(FileName)%(Extension)'->Distinct())" Profile="@(_TargetPlatform->'%(Profile)')" />
</ItemGroup>
<!-- https://github.com/dotnet/arcade/blob/1924d7ea148c9f26ca3d82b60f0a775a5389ed22/src/Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk/src/CreateFrameworkListFile.cs -->
<CreateFrameworkListFile
Files="@(_AssemblyFiles)"
FileClassifications="@(_Classifications)"
TargetFile="%(_FrameworkListFile.Identity)"
TargetFilePrefixes="ref;lib"
RootAttributes="@(_RootAttribute)"
/>
<ItemGroup>
<FileWrites Include="@(_FrameworkListFile)" />
<Content Include="@(_FrameworkListFile)" CopyToOutputDirectory="PreserveNewest" Pack="true" PackagePath="data" Link="data/%(FileName)%(Extension)" />
</ItemGroup>
</Target>
<!--
HACK: temporarily put runtime packs in 'library-packs', until they can be resolved from 'packs'
See: https://github.com/dotnet/sdk/issues/14044
-->
<Import Condition=" !$(MSBuildProjectName.Contains('.Ref')) " Project="LibraryPacks.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,53 @@
<Project>
<PropertyGroup Condition=" '$(MauiPlatformName)' != '' ">
<!-- NOTE: $(MauiPlatformName) is expected to be passed in: android, maccatalyst, ios, or windows -->
<PackageId>$(PackageId).$(MauiPlatformName)</PackageId>
</PropertyGroup>
<PropertyGroup Condition=" '$(MauiPlatformName)' == '' ">
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<_TargetPlatform
Condition=" '$(MauiPlatformName)' == 'android' "
Include="net6.0-android30.0"
FullTfm="%(Identity)"
Tfm="net6.0-android"
Profile="Android"
/>
<_TargetPlatform
Condition=" '$(MauiPlatformName)' == 'ios' "
Include="net6.0-ios13.6"
FullTfm="%(Identity)"
Tfm="net6.0-ios"
Profile="iOS"
/>
<_TargetPlatform
Condition=" '$(MauiPlatformName)' == 'maccatalyst' "
Include="net6.0-maccatalyst13.5"
FullTfm="%(Identity)"
Tfm="net6.0-maccatalyst"
Profile="MacCatalyst"
/>
<_TargetPlatform
Condition=" '$(MauiPlatformName)' == 'windows' "
Include="$(WindowsTargetFramework)"
FullTfm="%(Identity)"
Tfm="$(WindowsTargetFramework)"
Profile="Windows"
/>
</ItemGroup>
<Import Condition=" '$(MauiPlatformName)' != '' " Project="FrameworkList.targets" />
<ItemGroup>
<_Platforms Include="android;maccatalyst;ios" />
<_Platforms Include="windows" Condition=" '$(BuildForWinUI)' == 'true' or '$(Packing)' == 'true' " />
</ItemGroup>
<Target Name="_PackPerPlatform" Condition=" '$(MauiPlatformName)' == '' " AfterTargets="Build">
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="Pack" Properties="MauiPlatformName=%(_Platforms.Identity)" />
</Target>
</Project>

Просмотреть файл

@ -0,0 +1,14 @@
<Project>
<Target Name="_CopyToLibraryPacks" AfterTargets="Pack" Condition=" '$(IsPackable)' == 'true' ">
<ItemGroup>
<_PackagesToCopy Include="$(PackageOutputPath)/$(PackageId).*.nupkg" />
</ItemGroup>
<Copy
SourceFiles="@(_PackagesToCopy)"
DestinationFolder="$(DotNetLibraryPacksDirectory)"
SkipUnchangedFiles="true"
/>
</Target>
</Project>

Просмотреть файл

@ -0,0 +1,7 @@
<Project>
<Target Name="_WinUIFix" BeforeTargets="_GetSdkToolsPathsFromSdk" Condition="$(TargetFramework.Contains('-windows'))">
<PropertyGroup>
<TargetPlatformIdentifierAdjusted>UAP</TargetPlatformIdentifierAdjusted>
</PropertyGroup>
</Target>
</Project>

Двоичные данные
src/Workload/docs/workload-diagram.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 89 KiB