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

  <PropertyGroup>
    <Description>A CSharpCodeMatcher which can be used to match WireMock.Net Requests using C# code.</Description>
    <AssemblyTitle>WireMock.Net.Matchers.CSharpCode</AssemblyTitle>
    <Authors>Stef Heyenrath</Authors>
    <TargetFrameworks>net451;net452;net46;net461;netstandard1.3;netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
    <PackageTags>wiremock;matchers;matcher;csharp;csharpcode</PackageTags>
    <RootNamespace>WireMock</RootNamespace>
    <ProjectGuid>{B6269AAC-170A-4346-8B9A-444DED3D9A44}</ProjectGuid>
    <PublishRepositoryUrl>true</PublishRepositoryUrl>
    <AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
    <EmbedUntrackedSources>true</EmbedUntrackedSources>
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
    <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
    <CodeAnalysisRuleSet>../WireMock.Net/WireMock.Net.ruleset</CodeAnalysisRuleSet>
    <SignAssembly>true</SignAssembly>
    <AssemblyOriginatorKeyFile>../WireMock.Net/WireMock.Net.snk</AssemblyOriginatorKeyFile>
    <!--<DelaySign>true</DelaySign>-->
    <PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
    <PackageLicenseExpression>MIT</PackageLicenseExpression>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
    <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
  </PropertyGroup>

  <!-- https://github.com/aspnet/RoslynCodeDomProvider/issues/51 -->
  <!-- This is needed else we cannot build net452 in Azure DevOps Pipeline -->
  <Target Name="CheckIfShouldKillVBCSCompiler" />

  <ItemGroup>
    <PackageReference Include="JetBrains.Annotations" Version="2022.3.1" PrivateAssets="All" />
    <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />

    <ProjectReference Include="..\WireMock.Net\WireMock.Net.csproj" />
  </ItemGroup>

  <ItemGroup Condition=" '$(TargetFramework)' == 'net451' or '$(TargetFramework)' == 'net452' ">
    <PackageReference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" Version="3.6.0" />
  </ItemGroup>

  <ItemGroup Condition=" '$(TargetFramework)' == 'net46' or '$(TargetFramework)' == 'net461' ">
    <PackageReference Include="CS-Script" Version="3.30.3" />
  </ItemGroup>

  <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0' or '$(TargetFramework)' == 'net6.0' or '$(TargetFramework)' == 'net7.0'">
    <PackageReference Include="CS-Script" Version="4.4.2" />
  </ItemGroup>

</Project>