3 ms·
I was trying out .Net (...or was it .Net core?) the otherday just out of curiosity, thinking about migrating off of golang. I am still not sure which I need (.
by mattlondon 5y ago
I was trying out .Net (...or was it .Net core?) the otherday just out of curiosity, thinking about migrating off of golang.
I am still not sure which I need (...or both?) but either way I managed to get neither Visual Studio nor VS Code to get any code to run or compile! I downloaded and installed both SDKs but both failed to work at all - it seems there is some invisible thing configured somewhere (Windows registry? certainly not in the hello world source I was trying to write) that points to the SDK version to use, and neither the .Net nor .Net core SDKs I downloaded appeared to be the correct ones and everything chucks up error messages about the wrong SDK or missing MSBuild (whatever that is), despite just following the tutorials to do `dotnet new`. Very frustrating.
It has certainly put me off trying .net now. I wanted to migrate off of golang for my future cross-platform work, but this has really put me off - if I cant even get a hello world to work after a clean SDK install, I can only shudder to think about what the runtime dependency hell is going to be. Real shame.
- JasonCannon 5y agoYou don't use .net core anymore. You use .net 5 or the recently released .net 6. When you use dotnet new it will generate a .csproj file, in that csproj file it will specify what frameowrk you are targeting. I don't know what exactly you did but setup of dot net is super easy. I'd try uninstalling everything you tried to install, and install https://dotnet.microsoft.com/download/dotnet/6.0 https://dotnet.microsoft.com/download/dotnet/6.0 Note, dotnet 6 only works on VSCode or VS2022, older versions of VS don't support it, so you'd have to drop to dotnet 5.
- jmnicolas 5y agoIf you're on Windows just download Visual Studio 2022, it will install everything you need.