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

    <PropertyGroup>
        <PackageId>GeWuYou.$(AssemblyName)</PackageId>
        <TargetFramework>netstandard2.0</TargetFramework>
        <IsRoslynAnalyzer>true</IsRoslynAnalyzer>
        <IncludeBuildOutput>false</IncludeBuildOutput>
        <LangVersion>latest</LangVersion>
        <Nullable>enable</Nullable>
        <EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
        <CompilerGeneratedFilesOutputPath>Generated</CompilerGeneratedFilesOutputPath>
        <EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
    </PropertyGroup>

    <ItemGroup>
        <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.14.0" PrivateAssets="all"/>
        <PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="4.14.0">
            <PrivateAssets>all</PrivateAssets>
            <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
        </PackageReference>
        <PackageReference Include="System.Text.Json" Version="8.0.6" PrivateAssets="all"/>
    </ItemGroup>

    <ItemGroup>
        <ProjectReference Include="..\GFramework.SourceGenerators.Common\GFramework.SourceGenerators.Common.csproj" PrivateAssets="all"/>
    </ItemGroup>

    <ItemGroup>
        <Compile Include="..\GFramework.SourceGenerators.Common\Internals\IsExternalInit.cs"
                 Link="Internals\IsExternalInit.cs"/>
    </ItemGroup>

    <ItemGroup>
        <None Include="$(OutputPath)\$(AssemblyName).dll"
              Pack="true"
              PackagePath="analyzers/dotnet/cs"
              Visible="false"/>
        <None Include="$(OutputPath)\GFramework.SourceGenerators.Common.dll"
              Pack="true"
              PackagePath="analyzers/dotnet/cs"
              Visible="false"/>
    </ItemGroup>

    <ItemGroup>
        <None Include="$(OutputPath)\GFramework.SourceGenerators.Common.dll" Pack="true" PackagePath="lib\netstandard2.0" Visible="true"/>
        <None Include="$(OutputPath)\GFramework.SourceGenerators.Common.xml" Pack="true" PackagePath="lib\netstandard2.0" Visible="true"/>
    </ItemGroup>

</Project>
