<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <ItemGroup Condition="$(Configuration) != 'Release'">
    <Compile Remove="EmbeddedSentryConfiguration.Secret.cs" />
    <None Include="EmbeddedSentryConfiguration.Secret.cs" />
  </ItemGroup>

  <ItemGroup Condition="$(Configuration) == 'Release'">
    <Compile Remove="EmbeddedSentryConfiguration.SecretNonRelease.cs" />
    <None Include="EmbeddedSentryConfiguration.SecretNonRelease.cs" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Sentry" Version="4.1.2" />
  </ItemGroup>

  <Target Condition="$(Configuration) != 'Release'" Name="PreBuild" BeforeTargets="PreBuildEvent">
    <Exec Command="if not exist &quot;$(ProjectDir)EmbeddedSentryConfiguration.SecretNonRelease.cs&quot; echo public partial class EmbeddedSentryConfiguration { private static readonly string __dsn = &quot;&quot;; }&gt;&quot;$(ProjectDir)EmbeddedSentryConfiguration.SecretNonRelease.cs&quot;" />
  </Target>

</Project>
