Exe mit csc.dll im .net 8 sdk kompiliert nicht ausgeführtC#

Ein Treffpunkt für C#-Programmierer
Guest
 Exe mit csc.dll im .net 8 sdk kompiliert nicht ausgeführt

Post by Guest »

Ich versuche zu verstehen, wie der CSC -Compiler unter der Haube von dotnet.exe funktioniert. Ich habe versucht, eine Hallo -Welt wie folgt zu kompilieren: < /p>

Code: Select all

dotnet "C:\Program Files\dotnet\sdk\8.0.303\Roslyn\bincore\csc.dll"
/lib:"C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.7"
/r:"System.Runtime.dll" /r:"System.Private.CoreLib.dll"
/r:"netstandard.dll" /r:"System.Console.dll" csc_test.cs
Es wird erfolgreich kompiliert und gibt csc_test.exe und ich system.runtime.dll , system.private.corelib.dll und netstandard aus. dll neben dem exe. Get: < /p>

Unbeschwerte Ausnahme: System.Typeloadexception: Kann nicht 'System.Object' From Assembly 'System.private , Kultur = neutral, PublicKeyToken = 7CEC85D7BEA7798E ', weil das Elternteil nicht existiert.
< /blockquote>
Ich verstehe nicht, warum dies geschieht. < /p>

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post