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

  <PropertyGroup>
    <TargetFramework>net48</TargetFramework>
    <OutputType>Exe</OutputType>
    <RootNamespace>SonarQube.Plugins.Roslyn</RootNamespace>
    <AssemblyName>RoslynSonarQubePluginGenerator</AssemblyName>
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
    <PlatformTarget>AnyCPU</PlatformTarget>
    <!-- Don't include all Roslyn language resources when publishing (need to include this in all product projects that reference Roslyn) -->
    <SatelliteResourceLanguages>en-US</SatelliteResourceLanguages>
  </PropertyGroup>

  <ItemGroup Label="NuGet packages">
    <PackageReference Include="Microsoft.CodeAnalysis" Version="$(RoslynPackagesVersion)" ExcludeAssets="analyzers" />
    <PackageReference Include="NuGet.CommandLine" Version="$(NuGetPackagesVersion)" GeneratePathProperty="true" PrivateAssets="all" />
    <Reference Include="$(PkgNuGet_CommandLine)\tools\NuGet.exe" />
    <PackageReference Include="System.IO.Compression" Version="4.3.0" Private="true" />
  </ItemGroup>

  <ItemGroup>
    <Compile Update="CommandLine\CmdLineResources.Designer.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>CmdLineResources.resx</DependentUpon>
    </Compile>
    <Compile Update="UIResources.Designer.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>UIResources.resx</DependentUpon>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Update="CommandLine\CmdLineResources.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>CmdLineResources.Designer.cs</LastGenOutput>
      <SubType>Designer</SubType>
    </EmbeddedResource>
    <EmbeddedResource Update="UIResources.resx">
      <Generator>PublicResXFileCodeGenerator</Generator>
      <LastGenOutput>UIResources.Designer.cs</LastGenOutput>
      <SubType>Designer</SubType>
    </EmbeddedResource>
  </ItemGroup>

  <ItemGroup>
    <None Update="NuGet.config">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
  </ItemGroup>

  <ItemGroup Label="Embedded jar file">
    <EmbeddedResource Include="Resources\sonar-roslyn-sdk-template-plugin-1.3.0.1139.jar" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\Common\SonarQube.Plugins.Common.csproj" />
    <ProjectReference Include="..\PluginGenerator\SonarQube.Plugins.PluginGenerator.csproj" />
    <ProjectReference Include="..\RoslynV1Resfs\RoslynV1Refs.csproj" />
  </ItemGroup>

</Project>