[msbuild] Add CoreML models to our items included by default. (#10038)

This commit is contained in:
Rolf Bjarne Kvinge 2020-11-04 16:01:43 +01:00 коммит произвёл GitHub
Родитель 354beec69c
Коммит e7dd367125
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 14 добавлений и 2 удалений

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

@ -38,6 +38,11 @@ default (as `ImageAsset` items).
All \*.png files inside \*.atlas directories in the project directory or any
subdirectory are included by default (as `AtlasTexture` items).
## Core ML Models
All \*.mlmodel files anywhere in the project directory or any subdirectory are
included by default (as `CoreMLModel` items).
## Binding projects
Default compilation includes is turned off for binding projects, because

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

@ -55,4 +55,12 @@
<IsDefaultItem>true</IsDefaultItem>
</AtlasTexture>
</ItemGroup>
<!-- Default CoreMLModel inclusion -->
<ItemGroup Condition="'$(TargetPlatformIdentifier)' == '@PLATFORM@' And '$(_EnableDefaultXamarinItems)' == 'true' ">
<CoreMLModel Include="**\*.mlmodel">
<Link>$([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(Identity)'))</Link>
<IsDefaultItem>true</IsDefaultItem>
</CoreMLModel>
</ItemGroup>
</Project>

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

@ -145,6 +145,7 @@
<CreateAppBundleDependsOn>
_DetectAppManifest;
_CopyResourcesToBundle;
_CompileCoreMLModels;
_CompileEntitlements;
_CompileAppManifest;
_ComputeLinkerArguments;

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

@ -118,8 +118,6 @@ namespace Xamarin.Tests {
return false; // TODO
} else if (components.Any (v => v.EndsWith (".appex", StringComparison.Ordinal))) {
return false; // TODO
} else if (components.Any (v => v.EndsWith (".mlmodelc", StringComparison.Ordinal))) {
return false; // TODO
}
return true;