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

  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <IsRoslynComponent>true</IsRoslynComponent>
    <LangVersion>latest</LangVersion>
  </PropertyGroup>
  <PropertyGroup>
    <!-- Do not include the generator as a lib dependency -->
    <IncludeBuildOutput>false</IncludeBuildOutput>

  </PropertyGroup>
  <ItemGroup>
    <None Remove="templates\CallerAtttributes.txt" />
    <None Remove="templates\CallerAtttributesWithConsole.txt" />
    <None Remove="templates\GenerateExtensionCode.txt" />
    <None Remove="templates\MethodWithPartial.txt" />
    <None Remove="templates\TryCatchConsole.txt" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
      <PackageReference Include="System.CodeDom" PrivateAssets="all" GeneratePathProperty="true" Version="5.0.0" />
      <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.5.0" />

	 
	  
      <PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="3.10.0-3.final">
        <PrivateAssets>all</PrivateAssets>
        <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      </PackageReference>
      
    <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" />
    <PackageReference Include="Scriban" Version="4.0.1" GeneratePathProperty="true" PrivateAssets="all" />
    <PackageReference Include="ThisAssembly.AssemblyInfo" Version="1.0.8" PrivateAssets="all" ReferenceOutputAssembly="false" OutputItemType="Analyzer">

    </PackageReference>
    <PackageReference Include="ThisAssembly.Project" Version="1.0.8" PrivateAssets="all" ReferenceOutputAssembly="false" OutputItemType="Analyzer">

    </PackageReference>
  </ItemGroup>
  <PropertyGroup>
    <Description>
      ** C# 9.0 ONLY **
      Autogenerates public methods from a class .
      ( replace below single quotes with double quotes)
      [AutoMethods(template = TemplateMethod.CallerAtttributes, MethodPrefix ='pub', MethodSuffix ='bup')]
      partial class Person
      {
      public string LastName { get; set; }
      public string FirstName { get; set; }
      private string pubFullName()
      {

      return FirstName + ' ' + LastName;
      }

      private void pubWriteToConsoleFullName()
      {
      Console.WriteLine(this.FullName());
      }


      }
      // it will generate for this class the public methods
      public string FullName
      public string WriteToConsoleFullName
      Add also Nuget package AOPMethodsCommon
      You can have your own template - read the readme.txt
    </Description>
    <Version>2022.5.20.2101</Version>
    <Authors>Andrei Ignat</Authors>
    <PackageTags>RoslynCodeGenerators;C#;CSharp;SkinnyControllers</PackageTags>
    <PackageProjectUrl>https://github.com/ignatandrei/AOP_With_Roslyn/tree/master/AOPMethods</PackageProjectUrl>
    <RepositoryUrl>https://github.com/ignatandrei/AOP_With_Roslyn</RepositoryUrl>
    <RepositoryType>GIT</RepositoryType>
    <PackageLicenseExpression>MIT</PackageLicenseExpression>
    <Copyright>MIT</Copyright>

  </PropertyGroup>
  <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>
		<GetTargetPathDependsOn>$(GetTargetPathDependsOn);GetDependencyTargetPaths</GetTargetPathDependsOn>
	</PropertyGroup>
	<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
		<Exec Command="echo Configuration: $(Configuration)&#xD;&#xA;echo DevEnvDir: $(DevEnvDir)&#xD;&#xA;echo OutDir: $(OutDir)&#xD;&#xA;echo ProjectDir: $(ProjectDir)&#xD;&#xA;echo VisualStudioVersion: $(VisualStudioVersion)&#xD;&#xA;echo AssemblySearchPaths: $(AssemblySearchPaths)&#xD;&#xA;echo AssemblyName: $(AssemblyName)&#xD;&#xA;echo BaseIntermediateOutputPath: $(BaseIntermediateOutputPath)&#xD;&#xA;echo CscToolPath: $(CscToolPath)" />
		<Exec Command="echo $(ProjectDir)..\AMS_Base\$(OutDir)\AMS_Base.dll" />
	</Target>
	<Target Name="GetDependencyTargetPaths">
		<ItemGroup>
			<TargetPathWithTargetPlatformMoniker Include="$(PKGScriban)\lib\netstandard2.0\Scriban.dll" IncludeRuntimeDependency="false" />
		</ItemGroup>
	</Target>
	
  <ItemGroup>
    <Compile Include="..\AOPMethodsCommon\AutoMethods.cs" Link="AutoMethods.cs" />
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="templates\MethodWithPartial.txt" />
    <EmbeddedResource Include="templates\GenerateExtensionCode.txt" />
    <EmbeddedResource Include="templates\CallerAtttributesWithConsole.txt" />
    <EmbeddedResource Include="templates\CallerAtttributes.txt" />
    <EmbeddedResource Include="templates\TryCatchConsole.txt" />
  </ItemGroup>

</Project>
