Where to set PublishReadyToRun?

Viewed 633

I have read in the documentation that if I want to compile using AoT (ahead of time) I have to add this settings in the .csproj file of the application.

  <PropertyGroup>
    <PublishReadyToRun>true</PublishReadyToRun>
  </PropertyGroup>

But I have another property group, is this:

  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>netcoreapp3.0</TargetFramework>
    <UseWPF>true</UseWPF>
  </PropertyGroup>

So my doubt if I have to create a new prperty group or I can set the setting in the existing propery gorup, for example below UseWPF.

Thanks.

1 Answers

It does not matter if you have one or multiple PropertyGroup elements. Normally you would only create more than one if you either want to separate elements explicitly or you want them only used depending on (e. g.) the current configuration. In that case you would annotate them like this:

<PropertyGroup Condition="'$(Configuration)' == 'DEBUG'" >
    <OutputPath>$(OutputPath)\debug</OutputPath>
</PropertyGroup>
Related