C
C#ā€¢2y ago
AloneAlexandros

ā” Problem with .net

So I try to run a hello world program, and I get this error:
The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core
The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core
107 Replies
Angius
Angiusā€¢2y ago
How are you running the code?
AloneAlexandros
AloneAlexandrosā€¢2y ago
vscpde vscode
Angius
Angiusā€¢2y ago
That's your editor How are you running the code?
AloneAlexandros
AloneAlexandrosā€¢2y ago
wdym
Thinker
Thinkerā€¢2y ago
Try running dotnet run
Angius
Angiusā€¢2y ago
Do you use dotnet run in the terminal? csc Program.cs? Click a green arrow? Press Shift+Ctrl+Alt+F12?
AloneAlexandros
AloneAlexandrosā€¢2y ago
Well I use start debigging of vscode, now I used dotnet run and it worked
Angius
Angiusā€¢2y ago
Ah, so just a case of VSCode being VSCode lmao
AloneAlexandros
AloneAlexandrosā€¢2y ago
Haha
Angius
Angiusā€¢2y ago
Make sure you followed $vscode steps to have everything set up
MODiX
MODiXā€¢2y ago
1) Install the C# extension 2) 2.a) DO NOT USE OPEN FILE 2.b) Always use Open Folder (from the File menu), and open the folder containing your sln file (or the folder containing the csproj if you have only one csproj) 3) To make the extension start and detect C#, either: 3.a) wait for the prompt that will appear on the bottom right of your screen that ask you if you want it to create some files, and say Yes 3.b) Command Palette (F1 or Ctrl+Shift+P) and type > .Net : Generate Assets for build and run 4) you should see a flame on the Status bar with the Omnisharp logo (see second attached screenshot) 5) it should load to finally say OmniSharp server is running (if not ask for help) https://media.discordapp.net/attachments/569261465463160900/1006652191689429022/unknown.png https://cdn.discordapp.com/attachments/569261465463160900/951015732769079336/unknown.png
AloneAlexandros
AloneAlexandrosā€¢2y ago
yes I did all those I think>]?
Angius
Angiusā€¢2y ago
VSC is super finnicky and still kinda shit for writing C#, even with all the work Microsoft put in Omnisharp et al
AloneAlexandros
AloneAlexandrosā€¢2y ago
ok quess I will soon install vs? DO I have more options?
Angius
Angiusā€¢2y ago
$vsgang
MODiX
MODiXā€¢2y ago
visualstudio šŸ‡¬ šŸ‡¦ šŸ‡³ šŸ‡¬
Angius
Angiusā€¢2y ago
$ridergang
MODiX
MODiXā€¢2y ago
rider šŸ‡¬ šŸ‡¦ šŸ‡³ šŸ‡¬
Thinker
Thinkerā€¢2y ago
Not really, VS is about the best thing you'll get for free on Windows
FusedQyou
FusedQyouā€¢2y ago
Yeah, just use Visual Studio or Rider
Angius
Angiusā€¢2y ago
$freerider
MODiX
MODiXā€¢2y ago
There are two ways to get Rider for free: Being a student: https://www.jetbrains.com/community/education/#students Using it for an OSS project: https://www.jetbrains.com/community/opensource/#support
Thinker
Thinkerā€¢2y ago
Rider is amazing but isn't free
FusedQyou
FusedQyouā€¢2y ago
VSCode for anything else
AloneAlexandros
AloneAlexandrosā€¢2y ago
Oh how lucky I is student is rider good? $vs $visualstudio
Angius
Angiusā€¢2y ago
Rider is amazing, 11/10 would recommend
AloneAlexandros
AloneAlexandrosā€¢2y ago
haha
Thinker
Thinkerā€¢2y ago
(for most things at least, sometimes it just randomly breaks)
Angius
Angiusā€¢2y ago
For GUI apps, VS is better For everything else, Rider runs circles around VS For anything web, Rider dances on VS's grave
AloneAlexandros
AloneAlexandrosā€¢2y ago
sounds like unity lol
Thinker
Thinkerā€¢2y ago
Unity is uhhh... yeah it's a thing
FusedQyou
FusedQyouā€¢2y ago
Unity is fine
Thinker
Thinkerā€¢2y ago
if you like suffering
Angius
Angiusā€¢2y ago
Unity uses outdated fork of Mono and non-standard practices Like enumerators instead of async and stuff
FusedQyou
FusedQyouā€¢2y ago
VS works fine with it though Latest version of Unity works with async They're getting there This is true though. I hope they improve on that
AloneAlexandros
AloneAlexandrosā€¢2y ago
outdated? does that mean I will get shocked using normal c#?
Angius
Angiusā€¢2y ago
Yeah
Thinker
Thinkerā€¢2y ago
kinda yes
FusedQyou
FusedQyouā€¢2y ago
No lol
Angius
Angiusā€¢2y ago
Unity is full of, uh, let's just say "peculiarities"
FusedQyou
FusedQyouā€¢2y ago
Have you guys even used Unity in the past few months
Thinker
Thinkerā€¢2y ago
i used it about a year ago, and considering unity as a company, i wouldn't expect them to have changed the entire scripting api since then catsip
Angius
Angiusā€¢2y ago
Admittedly, can't say I had much interest in Unity Might check it out in 2047 when they migrate to .NET 5 mweh
FusedQyou
FusedQyouā€¢2y ago
Unity supports .Net Standard 2.1
Angius
Angiusā€¢2y ago
Ah, so it's merely very outdated, not tremendously outdated Good to know
FusedQyou
FusedQyouā€¢2y ago
It's literally the latest It's just that Mono sucks
AloneAlexandros
AloneAlexandrosā€¢2y ago
ok so for today: delete all the mess I made ask admin to install me vs and dotnet 6.0 all good!
Thinker
Thinkerā€¢2y ago
.NET Standard 2.1 is not the latest Currently .NET 7 is the latest
Angius
Angiusā€¢2y ago
.NET Standard is about supporting the lowest common denominator of supported versions. 2.1 supports versions from Core 3.0 up, so it's basically equal to 3.0 3.0, 3.1, 5.0, 6.0, 7.0 Merely 5 versions behind
FusedQyou
FusedQyouā€¢2y ago
.NET Standard 2.1 is .NET 5, 6 and 7
Thinker
Thinkerā€¢2y ago
anyway, this is not related to the question
FusedQyou
FusedQyouā€¢2y ago
You guys are acting like every new .NET version has something that is a must-have for Unity
Thinker
Thinkerā€¢2y ago
let's move the discussion to #chat
FusedQyou
FusedQyouā€¢2y ago
This is not even how .NET versioning works anyway
Thinker
Thinkerā€¢2y ago
yes it is lol
FusedQyou
FusedQyouā€¢2y ago
.NET 7 implements .NET Standard 2.1
Thinker
Thinkerā€¢2y ago
because .NET versioning is weird
Angius
Angiusā€¢2y ago
Docs beg to differ
Thinker
Thinkerā€¢2y ago
anyway, let's go to #chat
FusedQyou
FusedQyouā€¢2y ago
You're right, I read wrong But comparing .NET versions to .NET Standard doesn't make sense so I don't understand why you're doing that Mono can update by itself and it doesn't rely on specs that .NET brings. It just implements what .NET Standard defines
Angius
Angiusā€¢2y ago
Because .NET Standard describes the lowest common denominator of versions that implement it
Thinker
Thinkerā€¢2y ago
let's go to #chat
AloneAlexandros
AloneAlexandrosā€¢2y ago
true but anyway I came to a conclusion bout the problem this channel can be completely yours
FusedQyou
FusedQyouā€¢2y ago
You're still acting like "lowest common denominator" means that Unity is very behind on versioning šŸ˜„
Thinker
Thinkerā€¢2y ago
Unity is behind on versioning, but not by that much
Angius
Angiusā€¢2y ago
.NET 6 has System.Text.Json. .NET Standard 2.1 supports 3.0 and up. 3.0 doesn't have System.Text.Json. Therefore, .NET Standard 2.1 doesn't have System.Text.Json Same goes for other features and other APIs .NET Standard is only as new as the oldest version that implements it
FusedQyou
FusedQyouā€¢2y ago
Unity has a Newtonsoft as a package
Angius
Angiusā€¢2y ago
Iā€” It's not about STJ... it's about any and all sorts of features in versions newer than 3.0
FusedQyou
FusedQyouā€¢2y ago
System.Text.Json has support for .NET Standard 2.0
FusedQyou
FusedQyouā€¢2y ago
And you can literally just import the dll manually if you want to use it. You're not at all depending on support by any .NET version That's why .NET Standard is a thing
Thinker
Thinkerā€¢2y ago
Afaik the version Unity uses doesn't support Span<T>, which is heavily relied upon by STJ...?
FusedQyou
FusedQyouā€¢2y ago
No Idea But I am 100% sure it exists in .NET Standard 2.1 anyway so If that is the case you can just upgrade to that
Angius
Angiusā€¢2y ago
Again, I'm not talking about STJ... I'm talking about Unity only supporting the features of .NET Core 3.0 precisely because it implements .NET Standard 2.1
FusedQyou
FusedQyouā€¢2y ago
You can still import the dll manually for most of these Alternatively Unity has alternatives for a lot, so this might also be the case for those
Angius
Angiusā€¢2y ago
Aight, okay, I'm out. We're clearly talking besides each other, not even about the same point
FusedQyou
FusedQyouā€¢2y ago
Not really. You think Unity is behind on versioning because Mono is behind, and I am giving you a clear example as to why that is really not the case and why it is perfectly fine to use Unity šŸ˜„
Angius
Angiusā€¢2y ago
It is behind though Unless it starts supporting .NET 7 tomorrow, it's behind
Thinker
Thinkerā€¢2y ago
Open Unity and try writing this
interface IFoo
{
static abstract int Bar { get; }
}
interface IFoo
{
static abstract int Bar { get; }
}
catsip
Angius
Angiusā€¢2y ago
No file-scoped namespaces, no static abstract interface members No init No required properties No records
FusedQyou
FusedQyouā€¢2y ago
The whole point is that it would be so behind that OP would "get shocked using normal c#?" and this is not true at all Good job, half of those are .NET 7 features, and the rest is .NET 6
Thinker
Thinkerā€¢2y ago
(file-scoped namespaces is a language feature which doesn't require runtime support, it only requires a language version higher than what Unity allows)
Angius
Angiusā€¢2y ago
So?
FusedQyou
FusedQyouā€¢2y ago
And you can miss most of those
Angius
Angiusā€¢2y ago
Those are up to date Unity not supporting them means... it's outdated
MODiX
MODiXā€¢2y ago
FusedQyou#2784
Not really. You think Unity is behind on versioning because Mono is behind, and I am giving you a clear example as to why that is really not the case and why it is perfectly fine to use Unity šŸ˜„
Quoted by
<@!85903769203642368> from #Problem with .net (click here)
React with āŒ to remove this embed.
Angius
Angiusā€¢2y ago
Yes, Unity is behind Yes, Mono is behind Yes, it is the case QED
Thinker
Thinkerā€¢2y ago
Even if Unity doesn't use the latest version, the core concepts of game development inherently lead to very different practices than what other fields of programming do. Unity also uses different conventions (ex. camelCase instead of PascalCase for properties), which are more-so due to having to support tons of legacy than actually being "bad".
FusedQyou
FusedQyouā€¢2y ago
Unity not using best practices does not mean it is behind
Thinker
Thinkerā€¢2y ago
Try getting a Unity developer to make a web API with ASP.NET Core or vice-versa, it's two almost completely different paradigms. Well it still is slightly behind in terms of versioning, as previous said. that's just an objective fact The practices thing is more subjective though. Some people only ever use Unity, so they don't mind.
FusedQyou
FusedQyouā€¢2y ago
Yes, it is behind on versioning because they still use Mono, and Mono sucks. But what I don't understand is why it is such as bad thing that they don't have support for .NET 7 features, like mentioned above
Thinker
Thinkerā€¢2y ago
Things like Span<T> would be very useful in game dev in performance-critical situations. It's not available in Unity due to the version it uses.
FusedQyou
FusedQyouā€¢2y ago
And the .NET 6 features mentioned above are literally QOL features Yeah but span exists in .NET standard 2.1 so Unity has that too then
Thinker
Thinkerā€¢2y ago
Static abstract members can be very useful when describing certain kinds of data relationships.
FusedQyou
FusedQyouā€¢2y ago
Isn't that .NET 7 though?
Thinker
Thinkerā€¢2y ago
yes If this is the case then apologies, didn't know
FusedQyou
FusedQyouā€¢2y ago
I believe they are skipping .NET 6 and going for .NET 7 though
Thinker
Thinkerā€¢2y ago
I think they're going for .NET 5 first...?
FusedQyou
FusedQyouā€¢2y ago
They seem pretty active with upgrading to better practices in general Not sure, but they are skipping a version Right now they are adding full support for async-await
Thinker
Thinkerā€¢2y ago
REALLY? wow
FusedQyou
FusedQyouā€¢2y ago
It's not the same though They adjusted the state machine to work on the main thread or something, but this has existed for a while
Angius
Angiusā€¢2y ago
Hope the async-await support goes better than their DOTs escapades when
FusedQyou
FusedQyouā€¢2y ago
They are adding many type of awaitable methods that can delay for a given amount of time, or for a single frame, and stuff like that I also read about changing threads or something but I can't find the documentation anymore It already exists but I literally can't find it
Thinker
Thinkerā€¢2y ago
neat
FusedQyou
FusedQyouā€¢2y ago
Like I said, it does work differently by returning an Awaitable sadly So I guess you can't really call it full async-await support
Accord
Accordā€¢2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts