<Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <Description>Template Instantiation Commands for .NET CLI.</Description>
    <TargetFramework>$(SdkTargetFramework)</TargetFramework>
    <OutputType>Exe</OutputType>
    <EnableStyleCopAnalyzer>true</EnableStyleCopAnalyzer>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <ItemGroup Condition="'$(Configuration)' == 'Debug'">
    <Content Include="defaultinstall.template.list.debug">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <Link>defaultinstall.template.list</Link>
    </Content>
  </ItemGroup>

  <ItemGroup Condition="'$(Configuration)' != 'Debug'">
    <Content Include="defaultinstall.template.list.release">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <Link>defaultinstall.template.list</Link>
    </Content>
  </ItemGroup>

  <ItemGroup>
    <None Update="dotnet-new3.sh" CopyToOutputDirectory="Always" />
    <None Update="dotnet-new3.cmd" CopyToOutputDirectory="Always" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Newtonsoft.Json" />
    <PackageReference Include="Microsoft.TemplateEngine.Orchestrator.RunnableProjects" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\Microsoft.TemplateEngine.Cli\Microsoft.TemplateEngine.Cli.csproj" />
  </ItemGroup>

  <Target Name="AddRuntimeDependenciesToContent" Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp'" BeforeTargets="GetCopyToOutputDirectoryItems" DependsOnTargets="GenerateBuildDependencyFile;GenerateBuildRuntimeConfigurationFiles">
    <ItemGroup>
      <ContentWithTargetPath Include="$(ProjectDepsFilePath)" CopyToOutputDirectory="PreserveNewest" TargetPath="$(ProjectDepsFileName)" />
      <ContentWithTargetPath Include="$(ProjectRuntimeConfigFilePath)" CopyToOutputDirectory="PreserveNewest" TargetPath="$(ProjectRuntimeConfigFileName)" />
    </ItemGroup>
  </Target>
</Project>
