maui-linux/Directory.Build.props

24 строки
1.5 KiB
Plaintext
Исходник Обычный вид История

<Project>
<PropertyGroup>
<__XFBuildTasksLocation>$(_XFBuildTasksLocation)</__XFBuildTasksLocation>
2018-12-10 23:35:09 +03:00
<__XFBuildTasksLocation Condition="'$(__XFBuildTasksLocation)' == '' AND '$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory).nuspec\netstandard2.0\</__XFBuildTasksLocation>
<__XFBuildTasksLocation Condition="'$(__XFBuildTasksLocation)' == ''">$(MSBuildThisFileDirectory).nuspec\net46\</__XFBuildTasksLocation>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>portable</DebugType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<Company>Microsoft</Company>
<Product>Xamarin.Forms</Product>
<LangVersion>7.3</LangVersion>
[build] cleanup MSBuild settings for faster builds (#7381) Context: https://devblogs.microsoft.com/xamarin/optimize-xamarin-android-builds/ The goal here is to improve the developer loop on Android when working on Xamarin.Forms using a few settings for `Debug` builds: * Enable Fast Deployment * `AndroidLinkMode=None` * `DebugType=portable` * `ProduceReferenceAssembly=True` in netstandard projects After these changes changes: Before: Time Elapsed 00:00:37.15 After: Time Elapsed 00:00:15.79 This was just running: msbuild Xamarin.Forms.ControlGallery.Android\Xamarin.Forms.ControlGallery.Android.csproj I was using VS 2019 16.2 on Windows, changing a XAML file. So one thing to note is that `AndroidLinkMode=Full` was used the UITests running on CI are using `Debug` builds. I used a `Condition` to check the `$(CI)` variable, so UITests will be unaffected. Other cleanup: * Explicitly set both `AndroidUseSharedRuntime` and `EmbedAssembliesIntoApk` * `AndroidSupportedAbis` only needs to be specified for `Release` builds. `Debug` builds will detect the attached device/emulator and use the appropriate ABI. * `JavaMaximumHeapSize` can be removed, it defaults to `1G`. * Removed other weird/old/empty MSBuild properties. Rely on `Directory.Build.props`: * `DebugType` is already defined, so we can remove these. * `ProduceReferenceAssembly` can be set if `UsingMicrosoftNETSdk=True`, I could not check `TargetFramework` at this stage, evaluation, since it was blank. This sets the value for all netstandard/SDK-style projects. ~~ [ControlGallery] assembly-level [Preserve] ~~ Context: https://github.com/xamarin/Xamarin.Forms/blob/d7a9c85774502b98460fc740068e264f332bfd82/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla25234.cs#L13 There was also some concern where needing `[Preserve]` attributes would only be found when the CI is running. You don't want to wait 3+ hours to know if you made a small mistake. This adds `[assembly:Preserve]` to the ControlGallery project, so this should be less likely to occur in the future.
2019-09-06 17:07:34 +03:00
<ProduceReferenceAssembly Condition="'$(UsingMicrosoftNETSdk)' == 'True' AND '$(Configuration)' == 'Debug'">True</ProduceReferenceAssembly>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-*" PrivateAssets="All"/>
</ItemGroup>
<!-- This target is replaced by GitInfo when restored. Allows Version.targets to rely on it before restore. -->
<Target Name="GitVersion" />
<Import Condition="'$(EnvironmentBuildPropsImported)' != 'True'" Project="Environment.Build.props" />
</Project>