Войти

Показать полную графическую версию : VSCodium компиляция c#


ts1000win
09-01-2025, 20:26
Нажимаю:
" generate c# assets for build and debug"
но результата нет.
Как получить исполняемый файл?

ts1000win
10-01-2025, 10:03
Из командной строки скомпилировать тоже не получилось:
csc /out:c.exe c.cs
csc : The term 'csc' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ csc /out:c.exe c.cs
+ ~~~
+ CategoryInfo : ObjectNotFound: (csc:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\kali\Documents> C:\Windows\Microsoft.NET\Framework\v4.0.30319csc\csc.exe /out:c.exe c.cs
C:\Windows\Microsoft.NET\Framework\v4.0.30319csc\csc.exe : The term
'C:\Windows\Microsoft.NET\Framework\v4.0.30319csc\csc.exe' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.
At line:1 char:1
+ C:\Windows\Microsoft.NET\Framework\v4.0.30319csc\csc.exe /out:c.exe c ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Windows\Micr...0319csc\csc.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

SQLai Lama
10-01-2025, 13:33
ts1000win, PowerShell же ясно написал что к чему. К тому же путь должен быть C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe. Задайте путь в PowerShell следующим образом:
$env:path += ';C:\Windows\Microsoft.NET\Framework64\v4.0.30319'
После сможете вызывать csc.exe без указания полного пути.




© OSzone.net 2001-2012