I am working on Visual Studio 2008 edition. I need to build “class library” dll through “Console” commands. A simple command to do so would be:
"csc /target:library /out:File.DLL File.cs"
which creates File.dll successfully.
But what should be done to include a dll file as input? Eg: Final.dll needs a C# file named Final.cs and File.dll? I tried out the below command but unsuccessful
"csc /target:library /out:Final.DLL File.dll File.cs"
What is the exact way to do so?
In the same manner i tried adding project references in the command:
csc /target:library /out:Final.DLL /r:First.dll /r:../Func\Func.csproj Final.cs
But it tells the Func.csproj could not be opened and is corrupt. What could be the reason?
If you want to add a reference (most probably), you can add assembly references by using this option:
You can use it like the other options:
csc /target:library /r:File.dll /out:Final.dll File.csRemember you’ll also need to distribute that Dll with your library.
Note: type
csc /?to get a full list of all flags and help about them. It’s a common command for many console applications like csc on windows.