Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't find System.Convert in .Net 5 Core beta2

We recently upgraded our MVC 6 project to the beta2 and .Net Core is complaining that it cannot use System.Convert. Can someone tell me where this has been moved?

Error Example

My project JSON contains the following for Core:

"aspnetcore50": {
    "dependencies": {
        "System.Runtime": "4.0.20-beta-22416",
        "System.Threading.Tasks": "4.0.10-beta-22416",
        "System.Net.Http": "4.0.0-beta-22416",
        "Newtonsoft.Json": "6.0.6.0",
        "System.Collections": "4.0.10-beta-22416"
    }
}
like image 423
RickJames Avatar asked Mar 18 '23 07:03

RickJames


1 Answers

You can use the unofficial package search website to see in which package a certain API is.

System.Convert is in System.Runtime.Extensions if you are are using CoreCLR (aspnetcore50)

like image 118
Victor Hurdugaci Avatar answered Apr 28 '23 03:04

Victor Hurdugaci