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

  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
	  <LangVersion>8.0</LangVersion>
	  <IsRoslynComponent>true</IsRoslynComponent>
    
  </PropertyGroup>
  <PropertyGroup>
    <!-- Do not include the generator as a lib dependency -->
    <IncludeBuildOutput>false</IncludeBuildOutput>
    
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="..\SkinnyControllersCommon\AutoActionsAttribute.cs" Link="AutoActionsAttribute.cs" />
  </ItemGroup>

  <ItemGroup>
    <!-- Package the generator in the analyzer directory of the nuget package -->
    <None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
    <None Include="$(PkgScriban)\lib\netstandard2.0\*.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
  </ItemGroup> 
  <PropertyGroup>
    <Description>
      ** C# 9.0 ONLY **
      Autogenerates actions to a controller from a class .
      ( replace below single quotes with double quotes)
      [AutoActions(template = TemplateIndicator.AllPost,FieldsName =new[] { 'repository' }, ExcludeFields =new[]{'_logger'})]
      [ApiController]
      [Route('[controller]/[action]')]
      public partial class WeatherForecastController : ControllerBase{
      // it will generate for this field
      private readonly RepositoryWF repository;

      Add also Nuget package SkinnyControllersCommon
      For creating new generic templates, see readme.txt
    </Description>
    <Version>2021.25.6.855</Version>
    <Authors>Andrei Ignat</Authors>
    <PackageTags>RoslynCodeGenerators;C#;CSharp;SkinnyControllers</PackageTags>
    <PackageProjectUrl>https://github.com/ignatandrei/AOP_With_Roslyn/tree/master/SkinnyControllers</PackageProjectUrl>
    <RepositoryUrl>https://github.com/ignatandrei/AOP_With_Roslyn</RepositoryUrl>
    <RepositoryType>GIT</RepositoryType>
    <Copyright>MIT</Copyright>
    <PackageLicenseExpression>MIT</PackageLicenseExpression>

  </PropertyGroup> 
  <ItemGroup>
    <None Include="../readme.txt">
      <Pack>True</Pack>
      <PackagePath></PackagePath>
    </None>
  </ItemGroup>

  <ItemGroup>
    <None Remove="templates\AllPost.txt" />
    <None Remove="templates\NoArgs_Is_Get_Else_Post.txt" />
    <None Remove="templates\Rest.txt" />
    <None Remove="templates\AllPostWithRecord.txt" />
    <None Remove="templates\TryCatchLogging.txt" />
  </ItemGroup> 
  <ItemGroup>
    <EmbeddedResource Include="templates\AllPostWithRecord.txt" />
    <EmbeddedResource Include="templates\TryCatchLogging.txt" />
    <EmbeddedResource Include="templates\Rest.txt" />
    <EmbeddedResource Include="templates\NoArgs_Is_Get_Else_Post.txt" />
    <EmbeddedResource Include="templates\AllPost.txt" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.1" PrivateAssets="all" />
    <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.8.0" />
    <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" />
    <PackageReference Include="Scriban" Version="3.0.2" GeneratePathProperty="true" />
    <PackageReference Include="ThisAssembly.AssemblyInfo" Version="1.0.8" PrivateAssets="all" ReferenceOutputAssembly="false" OutputItemType="Analyzer" />
    <PackageReference Include="ThisAssembly.Project" Version="1.0.8" PrivateAssets="all" ReferenceOutputAssembly="false" OutputItemType="Analyzer" />
  </ItemGroup>
	<PropertyGroup>
		<GetTargetPathDependsOn>$(GetTargetPathDependsOn);GetDependencyTargetPaths</GetTargetPathDependsOn>
	</PropertyGroup>

	<Target Name="GetDependencyTargetPaths">
		<ItemGroup>
			<TargetPathWithTargetPlatformMoniker Include="$(PKGScriban)\lib\netstandard2.0\Scriban.dll" IncludeRuntimeDependency="false" />
		</ItemGroup>
	</Target>
</Project>
