C# compiler commands

  • Thread starter Mats-Lennart Hansson
  • Start date
M

Mats-Lennart Hansson

Hi,
I'm creating a .bat file to do all compiling for me. For simple components
with all .cs in the same directory I simply write:

D:\Windows\Microsoft.NET\Framework\v1.1.4322\csc.exe /t:library
/out:"Component.dll" *.cs

And if I have the .cs files I write:

D:\Windows\Microsoft.NET\Framework\v1.1.4322\csc.exe /t:library
/out:"Component.dll" /recurse:*.cs

If I want to create a .exe file I simply replace /t:library with /t:winexe

But here is my question. In my component I also have embedded picture files.
How can I add them?

Thanks,

Mats-Lennart
 
M

Morten Wennevik

Hi Mats-Lennart,

Put the images in a resource (you may need to write a small program just
for creating a resource using ResourceWriter, or use ResGen.exe). Then
include the resource in the compiler statement with /r:<resource>. Beware
that resources need specific naming.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top