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

  <PropertyGroup>
    <VersionPrefix>1.18.3</VersionPrefix>
    <TargetFrameworks>netstandard2.0;net452</TargetFrameworks>
    <AssemblyName>Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules</AssemblyName>
    <PackageId>Rules</PackageId>
    <RootNamespace>Microsoft.Windows.PowerShell.ScriptAnalyzer</RootNamespace> <!-- Namespace needs to match Assembly name for ressource binding -->
  </PropertyGroup>

  <ItemGroup>
    <ProjectReference Include="..\Engine\Engine.csproj" />
    <PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
    <PackageReference Include="Microsoft.Management.Infrastructure" Version="1.0.0" />
  </ItemGroup>

  <ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
    <Reference Include="System.ComponentModel.Composition" />
    <Reference Include="System.Data.Entity.Design" />
  </ItemGroup>

  <PropertyGroup Condition=" '$(TargetFramework)' == 'net452' ">
    <DebugType>portable</DebugType>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
    <DefineConstants>$(DefineConstants);CORECLR</DefineConstants>
  </PropertyGroup>

  <ItemGroup>
    <Compile Update="Strings.Designer.cs">
      <DesignTime>True</DesignTime>
      <AutoGen>True</AutoGen>
      <DependentUpon>Strings.resx</DependentUpon>
    </Compile>
  </ItemGroup>

  <ItemGroup>
    <EmbeddedResource Update="Strings.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>Strings.Designer.cs</LastGenOutput>
    </EmbeddedResource>
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
    <PackageReference Include="System.Reflection.TypeExtensions" Version="4.5.1" />
    <Compile Remove="UseSingularNouns.cs" />
  </ItemGroup>
  
  <ItemGroup>
    <ProjectReference Include="..\PSCompatibilityCollector\Microsoft.PowerShell.CrossCompatibility\Microsoft.PowerShell.CrossCompatibility.csproj" />
  </ItemGroup>

  <PropertyGroup Condition=" '$(Configuration)' == 'PSV3Release' ">
    <DefineConstants>$(DefineConstants);PSV3</DefineConstants>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(Configuration)' == 'PSV4Release' ">
    <DefineConstants>$(DefineConstants);PSV3;PSV4</DefineConstants>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(Configuration)' == 'PSV3Debug' ">
    <DefineConstants>$(DefineConstants);PSV3</DefineConstants>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(Configuration)' == 'PSV4Debug' ">
    <DefineConstants>$(DefineConstants);PSV3;PSV4</DefineConstants>
  </PropertyGroup>

</Project>
