This change makes sure the mobile build task assembly is properly imported, corrections on the LLVM path, and other small minor tweaks.
<DirectPInvokes Include="libSystem.Security.Cryptography.Native.Android" />
</ItemGroup>
+ <PropertyGroup>
+ <_CompilerBinaryPath>@(MonoAotCrossCompiler->WithMetadataValue('RuntimeIdentifier','$(TargetOS.ToLowerInvariant())-$(TargetArchitecture.ToLowerInvariant())'))</_CompilerBinaryPath>
+ <_MonoLLVMPath>$(MonoAotCrossDir)</_MonoLLVMPath>
+ <_MonoLLVMPath Condition="'$(_MonoLLVMPath)' == '' and '$(MonoEnableLLVM)' == 'true'">$([System.IO.Path]::GetDirectoryName("$(_CompilerBinaryPath)"))</_MonoLLVMPath>
+ </PropertyGroup>
+
<MonoAOTCompiler
AotModulesTablePath="$(_AotModuleTablePath)"
AsPrefix="$(_AsPrefixPath)"
Assemblies="@(_AotInputAssemblies)"
- CompilerBinaryPath="@(MonoAotCrossCompiler->WithMetadataValue('RuntimeIdentifier','$(TargetOS.ToLowerInvariant())-$(TargetArchitecture.ToLowerInvariant())'))"
+ CompilerBinaryPath="$(_CompilerBinaryPath)"
DirectPInvokes="@(DirectPInvokes)"
DirectPInvokeLists="@(DirectPInvokeLists)"
EnableUnmanagedCallersOnlyMethodsExport="$(_EnableUnmanagedCallersOnlyMethodsExport)"
IntermediateOutputPath="$(_MobileIntermediateOutputPath)"
LibraryFormat="$(_AotLibraryFormat)"
- LLVMPath="$(MonoAotCrossDir)"
+ LLVMPath="$(_MonoLLVMPath)"
MibcProfilePath="@(ProfiledAOTProfilePaths)"
Mode="$(_AOTMode)"
OutputDir="$(_MobileIntermediateOutputPath)"
<RuntimeComponentList Remove="marshal-ilgen" />
</ItemGroup>
- <PropertyGroup Condition="'$(ForceAllComponents)'!='true'">
+ <PropertyGroup Condition="'$(ForceAllComponents)'!='true' and '@(RuntimeComponentList->Count())' > 0">
<RuntimeComponents>@(RuntimeComponentList)</RuntimeComponents>
</PropertyGroup>
</Target>
<DirectPInvokes Include="libSystem.Security.Cryptography.Native.Apple" />
</ItemGroup>
+ <PropertyGroup>
+ <_CompilerBinaryPath>@(MonoAotCrossCompiler->WithMetadataValue('RuntimeIdentifier','$(TargetOS.ToLowerInvariant())-$(TargetArchitecture.ToLowerInvariant())'))</_CompilerBinaryPath>
+ <_MonoLLVMPath>$(MonoAotCrossDir)</_MonoLLVMPath>
+ <_MonoLLVMPath Condition="'$(_MonoLLVMPath)' == '' and '$(MonoEnableLLVM)' == 'true'">$([System.IO.Path]::GetDirectoryName("$(_CompilerBinaryPath)"))</_MonoLLVMPath>
+ </PropertyGroup>
+
<MonoAOTCompiler Condition="'$(RunAOTCompilation)' == 'true'"
AotModulesTablePath="$(_AotModuleTablePath)"
AotModulesTableLanguage="ObjC"
Assemblies="@(_AotInputAssemblies)"
- CompilerBinaryPath="@(MonoAotCrossCompiler->WithMetadataValue('RuntimeIdentifier','$(TargetOS.ToLowerInvariant())-$(TargetArchitecture.ToLowerInvariant())'))"
+ CompilerBinaryPath="$(_CompilerBinaryPath)"
DedupAssembly="$(_iOSLikeDedupAssembly)"
DirectPInvokes="@(DirectPInvokes)"
DirectPInvokeLists="@(DirectPInvokeLists)"
EnableUnmanagedCallersOnlyMethodsExport="$(_EnableUnmanagedCallersOnlyMethodsExport)"
IntermediateOutputPath="$(_MobileIntermediateOutputPath)"
- LLVMPath="$(MonoAotCrossDir)"
+ LLVMPath="$(_MonoLLVMPath)"
Mode="$(_AOTMode)"
OutputDir="$(_MobileIntermediateOutputPath)"
OutputType="AsmOnly"
<_TasksDir Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tasks\${TargetFrameworkForNETCoreTasks}\</_TasksDir>
<_TasksDir Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tasks\${TargetFrameworkForNETFrameworkTasks}\</_TasksDir>
- <GenerateAppBundle>false</GenerateAppBundle>
+ <GenerateAppBundle Condition="'$(GenerateAppBundle)' == ''">true</GenerateAppBundle>
<NativeLib Condition="'$(NativeLib)' == ''">shared</NativeLib>
<LibraryBuilderTasksAssemblyPath>$(_TasksDir)LibraryBuilder.dll</LibraryBuilderTasksAssemblyPath>
+ <MobileBuildTasksAssemblyPath>$(_TasksDir)MobileBuildTasks.dll</MobileBuildTasksAssemblyPath>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)\LibraryBuilder.props" />
/// Path to store build artifacts
/// </summary>
[Required]
- [NotNull]
- public string? OutputDirectory { get; set; }
+ public string OutputDirectory { get; set; } = ""!;
/// <summary>
/// OS + architecture runtime identifier
/// <summary>
/// Diagnostic ports configuration string
/// </summary>
- public string? DiagnosticPorts { get; set; } = ""!;
+ public string DiagnosticPorts { get; set; } = ""!;
protected List<CompiledAssembly> CompiledAssemblies { get; set; }
/// The name of the library being generated
/// </summary>
[Required]
- [NotNull]
- public string? Name { get; set; }
+ public string? Name { get; set; } = ""!;
/// <summary>
/// The name of the OS being targeted
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>$(TargetFrameworkForNETCoreTasks)</TargetFramework>
+ <TargetFrameworks>$(TargetFrameworkForNETCoreTasks);$(TargetFrameworkForNETFrameworkTasks)</TargetFrameworks>
<OutputType>Library</OutputType>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<Compile Include="..\Common\Builders\CompiledAssembly.cs" />
<Compile Include="..\Common\LogAsErrorException.cs" />
<Compile Include="..\AppleAppBuilder\TargetOS.cs" />
- <Compile Include="..\AppleAppBuilder\Xcode.cs" />
</ItemGroup>
<Target Name="GetFilesToPackage" Returns="@(FilesToPackage)">
<ItemGroup>
- <FilesToPackage Include="$(OutputPath)$(MSBuildProjectName)*"
- TargetPath="tasks\$(TargetFrameworkForNETCoreTasks)" />
+ <_PublishFramework Remove="@(_PublishFramework)" />
+ <_PublishFramework Include="$(TargetFrameworks)" />
+
+ <!-- Copies every assembly that is in the artifacts/bin/MonoTargetsTasks/ subfolders. Be careful not to include too much. -->
+ <FilesToPackage Include="$(OutputPath)%(_PublishFramework.Identity)\*.dll" TargetPath="tasks\%(_PublishFramework.Identity)" />
+ <FilesToPackage Include="$(OutputPath)%(_PublishFramework.Identity)\*.pdb" TargetPath="tasks\%(_PublishFramework.Identity)" />
</ItemGroup>
</Target>
throw new ArgumentException ("must be a non-empty string", nameof (version));
}
- int tagIdx = ver.IndexOf('-');
+ int tagIdx = ver!.IndexOf('-');
if (tagIdx >= 0)
{
Tag = ver.Substring(tagIdx + 1);
<PropertyGroup>
<TargetFrameworks>$(TargetFrameworkForNETCoreTasks);$(TargetFrameworkForNETFrameworkTasks)</TargetFrameworks>
<Nullable>enable</Nullable>
- <NoWarn>$(NoWarn),CA1050</NoWarn>
- <!-- Ignore nullable warnings on net4* -->
- <NoWarn Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">$(NoWarn),CS8604,CS8602</NoWarn>
- <NoWarn Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) != '.NETFramework'">$(NoWarn),CA1850</NoWarn>
+ <NoWarn>$(NoWarn),CA1050,CA1850</NoWarn>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<Compile Include="..\Common\IsExternalInit.cs" />