You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.
I have a very simple netstandard2.0 project that has been building in CI for a little while now and a couple of days ago the builds started failing. I couldn't make heads or tails of it because the project built just fine on my macbook pro. I eventually noticed that CI was pulling down a microsoft docker container using tag 2.1-sdk that was now running version 2.1.400 of the sdk. My macbook was running 2.1.302. I upgraded the macbook and boom, couldn't build locally either.
The error that I'm seeing is as follows:
error CS0012: The type ‘Attribute’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’.
The offending code:
using System;
using Amazon.DynamoDBv2.DataModel;
namespace Foo.Data.Profiles.Models
{
[DynamoDBTable("Profiles")]
public class Profile
{
[DynamoDBHashKey]
public string UserId { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Bio { get; set; }
public string Image { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime UpdatedAt { get; set; }
}
}
I was able to resolve this by changing the target framework from netstandard2.0 to netcoreapp2.1. It seems that the AWS libraries are apparently not able to be compiled against dotnet standard as of 2.1.400. I'm not too concerned about it in the immediate future since I don't have any plans to use this code in a dotnet framework project, but I would really like to understand why this stopped working all of a sudden.
I have a very simple netstandard2.0 project that has been building in CI for a little while now and a couple of days ago the builds started failing. I couldn't make heads or tails of it because the project built just fine on my macbook pro. I eventually noticed that CI was pulling down a microsoft docker container using tag 2.1-sdk that was now running version 2.1.400 of the sdk. My macbook was running 2.1.302. I upgraded the macbook and boom, couldn't build locally either.
The error that I'm seeing is as follows:
The offending code:
The .csproj file:
The build script:
The nuget.config:
I've been trying a number of things over the past couple of days but no luck. Any direction would be appreciated.
The text was updated successfully, but these errors were encountered: