diff --git a/dotnet/DefaultCompilationIncludes.md b/dotnet/DefaultCompilationIncludes.md index 24a4fe369f..54222fbb59 100644 --- a/dotnet/DefaultCompilationIncludes.md +++ b/dotnet/DefaultCompilationIncludes.md @@ -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 diff --git a/dotnet/targets/Microsoft.Sdk.DefaultItems.template.props b/dotnet/targets/Microsoft.Sdk.DefaultItems.template.props index d0ae75b4e7..70f91c0df1 100644 --- a/dotnet/targets/Microsoft.Sdk.DefaultItems.template.props +++ b/dotnet/targets/Microsoft.Sdk.DefaultItems.template.props @@ -55,4 +55,12 @@ true + + + + + $([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(Identity)')) + true + + diff --git a/dotnet/targets/Xamarin.Shared.Sdk.targets b/dotnet/targets/Xamarin.Shared.Sdk.targets index 555449cf76..bbe04b04cf 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.targets +++ b/dotnet/targets/Xamarin.Shared.Sdk.targets @@ -145,6 +145,7 @@ _DetectAppManifest; _CopyResourcesToBundle; + _CompileCoreMLModels; _CompileEntitlements; _CompileAppManifest; _ComputeLinkerArguments; diff --git a/tests/common/DotNet.cs b/tests/common/DotNet.cs index 8cf6749446..f9d6d9b042 100644 --- a/tests/common/DotNet.cs +++ b/tests/common/DotNet.cs @@ -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;