<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UseLocallyBuiltPackage>true</UseLocallyBuiltPackage>
</PropertyGroup>
<Target Name="main" DependsOnTargets="EnsureLocalPackagesFolderExists, ShowNuGetSource">
<!-- Msbuild will process the first target in the file by default.
By creating this target, and making it depend on the two following targets,
we can ensure that they will all be executed
-->
</Target>
<PropertyGroup>
<!-- Test directory-->
<LocalPackagesDirectory>$(MSBuildProjectDirectory)/../../local-global-packages</LocalPackagesDirectory>
</PropertyGroup>
<Target Name="EnsureLocalPackagesFolderExists" BeforeTargets="Restore;CollectPackageReferences" Condition="'$(BuildingInsideVisualStudio)' == 'true'">
<Error Condition="!Exists('$(LocalPackagesDirectory)')" Text="Run Build.ps1 to create the local packages folder that this project consumes"/>
</Target>
<Target Name="ShowNuGetSource" BeforeTargets="Restore;CollectPackageReferences">
<Message Condition="$(UseLocallyBuiltPackage) == 'true'" Text="Using the locally built version of Intellenum from $([System.IO.Path]::GetFullPath('$(LocalPackagesDirectory)'))" IsCritical="true"/>
<Message Condition="$(UseLocallyBuiltPackage) != 'true'" Text="Using the official NuGet version of Intellenum" IsCritical="true"/>
</Target>
<ItemGroup>
<TestPath Include="../../../local-global-packages"/>
</ItemGroup>
<Target Name="OnlyIfExists" Condition="Exists(@(TestPath))">
<Message Text="Please run Test.ps1 to build the latest local nuget package that these tests consume" Importance="high"/>
</Target>
<ItemGroup Condition=" '$(UseLocallyBuiltPackage)' == 'true'">
<PackageReference Include="Intellenum" Version="*"/>
</ItemGroup>
<ItemGroup Condition=" '$(UseLocallyBuiltPackage)' != 'true'">
<PackageReference Include="Intellenum" Version="1.0.4"/>
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<NoWarn>$(NoWarn);CS1701;CS1702;CS1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<NoWarn>$(NoWarn);CS1701;CS1702;CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<!-- Don't include the output from a previous source generator execution into future runs; the */** trick here ensures that there's
at least one subdirectory, which is our key that it’s coming from a source generator as opposed to something that is coming from
some other tool. –>
<ItemGroup>
<PackageReference Include="Ardalis.SmartEnum" Version="8.0.0"/>
<PackageReference Include="BenchmarkDotNet" Version="0.14.0"/>
<PackageReference Include="NetEscapades.EnumGenerators" Version="1.0.0-beta07" PrivateAssets="all" ExcludeAssets="runtime"/>
</ItemGroup>