Answer the question
In order to leave comments, you need to log in
Csc.exe not seeing other classes?
I need to compile c# code through the command line, namely through csc.exe. I created a folder where I placed the main code and one more code with a class. When I compile the code via cmd, an error is displayed, supposedly there are no classes. What should be done? Change namespace?
Answer the question
In order to leave comments, you need to log in
Well, you need to feed ALL files to the compiler,
Read:
https://docs.microsoft.com/en-us/dotnet/csharp/lan...
You do like this:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe C:\Users\user\Documents\Projects\proj\main.cs
C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe C:\Users\user\Documents\Projects\proj\*.cs
*.cs
, where *
- all files with the extension .cs
cd <your_path>
, and it would all look something like this:cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
csc.exe C:\Users\user\Documents\Projects\proj\*.cs
cd ./path
ls ./path
cp ./path ./path
mv ./path ./path
mkdir <dir_name>
> filename.anyext
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question