I'm trying to compile a cs file that is in a sibling directory of my project but csc fails to open it. Here's a sample of the command line that triggers the issue:
csc ../test/file.cs
Csc prints this message:
error CS1504: Source file '<path to current dir>\file.cs' could not be openned
The really really strange thing is that it strips the "../test" part.
Anyone has an idea on how to make this work? thanks
Since this is the command line, you should use backslashes to delimit the directories.
csc ..\test\file.cs
(In a C# program, it wouldn't matter if you'd use backslashes or forward slashes.)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.