<Project>
  <PropertyGroup>
    <LangVersion>12</LangVersion>
    <SolutionDir Condition="'$(SolutionDir)'==''">$(MSBuildThisFileDirectory)</SolutionDir>
    <PackageOutputPath>$(SolutionDir)build</PackageOutputPath>
    <Authors>Mohamed Hassan</Authors>
    <Copyright>Copyright &#169; 2016-2024, Mohamed Hassan &#038; Contributers </Copyright>
    <Product>OData2Poco</Product>
    <PackageProjectUrl>https://github.com/moh-hassan/odata2poco</PackageProjectUrl>
    <PackageLicenseFile>license.txt</PackageLicenseFile>
    <PackageIcon>ODataLogo-128.png</PackageIcon>
    <PackageIconFullPath>$(MSBuildThisFileDirectory)art\ODataLogo-128.png</PackageIconFullPath>
    <RepositoryUrl>https://github.com/moh-hassan/odata2poco</RepositoryUrl>
    <PackageTags>OData poco code-generation</PackageTags>
    <Description>
      "OData2Poco is a class library supporting netstandard2,net6 and .NET 4.61+ to generate  plain-old CLR objects (POCO/DTO) from OData feeds that implement both V1-3 and V4 OData protocol,based on the metadata of the service stored on the  server. Code generation is controlled with lot of configuration parameters. POCO/DTO  can be used in typed RESTful client OData services"
    </Description>
    <IsTestProject>$(MSBuildProjectName.Contains('Test'))</IsTestProject>
    <Company>OData2Poco</Company>
    <PackageReleaseNotes>https://github.com/moh-hassan/odata2poco/blob/master/ReleaseNotes.md </PackageReleaseNotes>
    <PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
    <IncludeSourceRevisionInInformationalVersion>true</IncludeSourceRevisionInInformationalVersion>
    <Version Condition="'$(VersionSuffix)' != ''">$(VersionSuffix)</Version>
    <Version Condition="'$(VersionSuffix)' == ''">0.0.0</Version>
    <PackageTags>code-generation;odata;charp;c#;typescript;ts;dto;poco;AspNetWebApi;WebApi</PackageTags>
    <ImplicitUsings>enable</ImplicitUsings>
    <NoWarn>$(NoWarn);SYSLIB1045</NoWarn>
    <SatelliteResourceLanguages>en</SatelliteResourceLanguages>
  </PropertyGroup>

  <PropertyGroup>
    <AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
    <ProduceReferenceAssembly>true</ProduceReferenceAssembly>
  </PropertyGroup>
  <!-- Enable building .NET Framework projects on any machine with at least MSBuild or the .NET Core SDK installed.-->
  <ItemGroup>
    <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies">
      <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
    <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
  </ItemGroup>
  <PropertyGroup>
    <IsWindows Condition="'$(OS)' == 'Windows_NT'">true</IsWindows>
  </PropertyGroup>

  <ItemGroup Condition="'$(IsTestProject)' == 'true'">
    <PackageReference Include="Microsoft.NET.Test.Sdk" />
    <PackageReference Include="nunit" />
    <PackageReference Include="NUnit3TestAdapter" />
    <PackageReference Include="FluentAssertions" />
    <PackageReference Include="NSubstitute" />
    <PackageReference Include="CliWrap" />
    <PackageReference Include="coverlet.collector" >
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="NUnit.Analyzers">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
    </PackageReference>
    <PackageReference Include="WireMock.Net" />
  </ItemGroup>

  <ItemGroup>
    <None Include="$(SolutionDir)license.txt" Pack="true" PackagePath="" />
    <None Include="$(PackageIconFullPath)" Pack="true" PackagePath="\" />
  </ItemGroup>

  <!-- disable the nullable warnings when compiling for .NET Standard 2.0 or net4x -->
  <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0' Or $(TargetFramework.StartsWith('net4'))">
    <NoWarn>$(NoWarn);nullable</NoWarn>
  </PropertyGroup>

  <PropertyGroup Label="analysis">
    <EnableNETAnalyzers>true</EnableNETAnalyzers>
    <RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
    <RunAnalyzersDuringLiveAnalysis>true</RunAnalyzersDuringLiveAnalysis>
    <AnalysisLevel>latest-all</AnalysisLevel>
    <AnalysisModeGlobalization>none</AnalysisModeGlobalization>
    <UseStyleCop>true</UseStyleCop>
    <UseSonar>false</UseSonar>

  </PropertyGroup>

  <ItemGroup  Condition="'$(UseStyleCop)' == 'true'">
    <PackageReference Include="StyleCop.Analyzers" PrivateAssets="all" />
    <GlobalAnalyzerConfigFiles Include="$(MSBuildThisFileDirectory)/StyleCop.Analyzers.globalconfig" />
  </ItemGroup>

  <ItemGroup  Condition="'$(UseSonar)' == 'true'">
    <PackageReference Include="SonarAnalyzer.CSharp" >
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
    </PackageReference>
    <GlobalAnalyzerConfigFiles Include="$(MSBuildThisFileDirectory)/SonarDotnet.Analyzers.globalconfig" />
  </ItemGroup>

  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
    <DebugType>portable</DebugType>
  </PropertyGroup>

  <ItemGroup>
    <AdditionalFiles Include="$(MSBuildThisFileDirectory)/CodeMetricsConfig.txt" />
  </ItemGroup>
</Project>