3

I'm trying to use the forecast API with my ASP.NET CORE app. I'm a linux user so I downloaded the nugget CLI and run it with Mono.I downloaded the c# wrapper from here https://www.nuget.org/packages/Forecast.io/. Then under project.json i added the dependency

project.json

"Forecast.io":"1.0.10"

However i get error NU1002: The dependency Forecast.io 1.0.10 does not support framework .NETCoreApp,Version=v1.0.

How do have to link the package in my project so I can use the dependency?

1 Answer 1

3

Since you target Mono, you don't have to use .NET Core (netcoreapp1.0 is the .NET Core application target moniker).

ASP.NET Core doesn't mean it only runs on .NET Core. ASP.NET also runs against the Full .NET Framework (4.5.1 or higher or mono).

All you need to do is remove the netcoreapp1.0 moniker and replace it with net451. Also don't forget to remove the Microsoft.NETCore.App package, if it's still there.

Your frameworks section in project.json should look something like this:

  "frameworks": {
    "net452": { }
  },
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.