dotnet / docs

This repository contains .NET Documentation.
https://learn.microsoft.com/dotnet
Creative Commons Attribution 4.0 International
4.27k stars 5.9k forks source link

Deterministic default is not `false` for MAUI projects #33380

Open StingyJack opened 1 year ago

StingyJack commented 1 year ago

The deterministic section says that the default value is false, however after creating a new MAUI project this setting is implicitly true. Unchecking the property value in the VS project property pages and saving the csproj results in a set of build conditions being generated to set this value to explicitly false.

    <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0-android|AnyCPU'">
      <Deterministic>False</Deterministic>
    </PropertyGroup>

    <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net6.0-android|AnyCPU'">
      <Deterministic>False</Deterministic>
    </PropertyGroup>

    <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0-ios|AnyCPU'">
      <Deterministic>False</Deterministic>
    </PropertyGroup>

    <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net6.0-ios|AnyCPU'">
      <Deterministic>False</Deterministic>
    </PropertyGroup>

    <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0-maccatalyst|AnyCPU'">
      <Deterministic>False</Deterministic>
    </PropertyGroup>

    <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net6.0-maccatalyst|AnyCPU'">
      <Deterministic>False</Deterministic>
    </PropertyGroup>

    <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0-windows10.0.19041.0|AnyCPU'">
      <Deterministic>False</Deterministic>
    </PropertyGroup>

    <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net6.0-windows10.0.19041.0|AnyCPU'">
      <Deterministic>False</Deterministic>
    </PropertyGroup>

Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

BillWagner commented 1 year ago

@chsienki Did the default change here?

Youssef1313 commented 1 year ago

The default is true on the dotnet/sdk side:

https://github.com/dotnet/sdk/blob/7a21ca118f165bc921d53f97c7c78517b874942f/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.props#L34

It has been true for very long.

StingyJack commented 1 year ago

From https://github.com/dotnet/sdk/commit/b6b101d676657968d606beedc2cc87b1707ec3cb

@srivatsn - I know this was a while ago and you have moved on from that team, but do you recall the reason for it?