Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADO Pipeline failing with .Net 6.0 SDK incompatible with ATC.Test error #16

Open
JKrag opened this issue Feb 8, 2022 · 0 comments
Open

Comments

@JKrag
Copy link

JKrag commented Feb 8, 2022

I am using atc-coding-rules on a project. It builds fine locally in both dotnet build and in VS2022.
In my pipeline however, it fails with the error below:

Already discussed with @davidkallesen over teams.

Error in build pipeline:

NU1202: Package Atc.Test 1.0.45 is not compatible with net60 (.NETFramework,Version=v6.0). Package Atc.Test 1.0.45 supports: netstandard2.1 (.NETStandard,Version=v2.1))

Directorty.build.props from test project

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <!--
    Add any shared properties you want for the projects under this directory that need to be set before the auto imported Directory.Build.props
  -->
  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" />

  <PropertyGroup Label="Compile settings">
    <Nullable>annotations</Nullable>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Atc.Test" Version="1.0.45" />
    <PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.15" PrivateAssets="All" />
  </ItemGroup>

  <ItemGroup>
    <Using Include="Atc.Test" />
    <Using Include="AutoFixture" />
    <Using Include="AutoFixture.Xunit2" />
    <Using Include="FluentAssertions" />
    <Using Include="NSubstitute" />
    <Using Include="Xunit" />
  </ItemGroup>

</Project>

Test project .csproj file:

    <TargetFramework>net6.0</TargetFramework>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant