Error on TEST (but not on localhost) when installing Imgix client library: "The type 'Dictionary<,>' is defined..."
Via Nuget I have installed the imgix-csharp (https://docs.imgix.com/libraries/imgix-csharp#installation) on my localhost. It works fine, for instance with this:
@inherits Umbraco.Web.Mvc.UmbracoViewPage<Dictionary<string, object>>
@using Imgix;
@{
var builder = new UrlBuilder("tinyofficewp.imgix.net")
{
SignKey = "xxxx",
IncludeLibraryParam = false
};
var parameters = new Dictionary<String, String>();
parameters["w"] = "400";
parameters["h"] = "300"; @builder.BuildUrl("http://test.mydomain.dk/media/nztauqwu/myimage.jpg?&crop=0.193072264266913,0.3679576643291243,0.54677122557657687,0.37188582551436555&cropmode=percentage&width=550&height=412&quality=70&rnd=132970912634830000", parameters)
}
But when I deploy to a live environment, for instance my TEST I get this error:
CS0012: The type 'Dictionary<,>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Collections, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
I have an idea of the error since build gives warnings:
Some NuGet packages were installed using a target framework different from the current target framework and may need to be reinstalled.
And I see in packages.config that Imgix library is targeted .NET 4.6.1 and the rest of the project is targeted 4.8:
Error on TEST (but not on localhost) when installing Imgix client library: "The type 'Dictionary<,>' is defined..."
Via Nuget I have installed the imgix-csharp (https://docs.imgix.com/libraries/imgix-csharp#installation) on my localhost. It works fine, for instance with this:
But when I deploy to a live environment, for instance my TEST I get this error:
I have an idea of the error since build gives warnings:
And I see in packages.config that Imgix library is targeted .NET 4.6.1 and the rest of the project is targeted 4.8:
But what must I do to fix it?
is working on a reply...