<Project>
    <PropertyGroup>
        <TargetFramework>netstandard2.0</TargetFramework>
        <EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
        <PackageScribanIncludeSource>true</PackageScribanIncludeSource>
    </PropertyGroup>

    <ItemGroup>
        <Compile Include="$(MSBuildThisFileDirectory)/*.cs" />
        <EmbeddedResource Include="$(MSBuildThisFileDirectory)/../../swagger.json" WithCulture="false" Visible="false" />
        <EmbeddedResource Include="$(MSBuildThisFileDirectory)/templates/*" WithCulture="false" />
    </ItemGroup>

    <ItemGroup>
        <PackageReference Include="Microsoft.CodeAnalysis.Common" PrivateAssets="all" />
        <PackageReference Include="Microsoft.CodeAnalysis.CSharp" PrivateAssets="all" />
    </ItemGroup>

    <ItemGroup>

        <!-- Scriban No Dependency -->
        <PackageReference Include="Scriban" IncludeAssets="Build" />

        <!-- CaseExtensions No Dependency -->
        <PackageReference Include="CaseExtensions" GeneratePathProperty="true" PrivateAssets="all" />

        <!-- Autofac -->
        <PackageReference Include="Autofac" GeneratePathProperty="true" PrivateAssets="all" />
        <PackageReference Include="Microsoft.Bcl.AsyncInterfaces" GeneratePathProperty="true" PrivateAssets="all" />
        <PackageReference Include="System.Diagnostics.DiagnosticSource" GeneratePathProperty="true" PrivateAssets="all" />

        <!-- NSwag -->
        <PackageReference Include="NSwag.Core" GeneratePathProperty="true" PrivateAssets="all" />
        <PackageReference Include="NJsonSchema" GeneratePathProperty="true" PrivateAssets="all" />
        <PackageReference Include="NJsonSchema.Annotations" GeneratePathProperty="true" PrivateAssets="all" />
        <PackageReference Include="Newtonsoft.Json" GeneratePathProperty="true" PrivateAssets="all" />
        <PackageReference Include="Namotion.Reflection" GeneratePathProperty="true" PrivateAssets="all" />
        <PackageReference Include="System.Text.Json" GeneratePathProperty="true" PrivateAssets="all" />
    </ItemGroup>

    <PropertyGroup>
        <GetTargetPathDependsOn>$(GetTargetPathDependsOn);GetDependencyTargetPaths</GetTargetPathDependsOn>
    </PropertyGroup>

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

            <TargetPathWithTargetPlatformMoniker Include="$(PKGAutofac)\lib\netstandard2.0\Autofac.dll" IncludeRuntimeDependency="false" />
            <TargetPathWithTargetPlatformMoniker Include="$(PKGMicrosoft_Bcl_AsyncInterfaces)\lib\netstandard2.0\Microsoft.Bcl.AsyncInterfaces.dll" IncludeRuntimeDependency="false" />
            <TargetPathWithTargetPlatformMoniker Include="$(PKGSystem_Diagnostics_DiagnosticSource)\lib\netstandard2.0\System.Diagnostics.DiagnosticSource.dll" IncludeRuntimeDependency="false" />

            <TargetPathWithTargetPlatformMoniker Include="$(PKGNSwag_Core)\lib\netstandard2.0\NSwag.Core.dll" IncludeRuntimeDependency="false" />
            <TargetPathWithTargetPlatformMoniker Include="$(PKGNJsonSchema)\lib\netstandard2.0\NJsonSchema.dll" IncludeRuntimeDependency="false" />
            <TargetPathWithTargetPlatformMoniker Include="$(PKGNJsonSchema_Annotations)\lib\netstandard2.0\NJsonSchema.Annotations.dll" IncludeRuntimeDependency="false" />
            <TargetPathWithTargetPlatformMoniker Include="$(PKGNewtonsoft_Json)\lib\netstandard1.0\Newtonsoft.Json.dll" IncludeRuntimeDependency="false" />
            <TargetPathWithTargetPlatformMoniker Include="$(PKGNamotion_Reflection)\lib\netstandard2.0\Namotion.Reflection.dll" IncludeRuntimeDependency="false" />
            <TargetPathWithTargetPlatformMoniker Include="$(PKGSystem_Text_Json)\lib\netstandard2.0\System.Text.Json.dll" IncludeRuntimeDependency="false" />
        </ItemGroup>
    </Target>

</Project>
