How to compile proj with resources at command line?

G

Guest

I use outside .jpg picture files in a Windows Form project. I try to compile
use csc.exe at command line.
I use resgen.exe to generate a resource file like:
resgen.exe Form1.resx MyNameSpace.MainForm.resources
then use csc to compile:
csc /nologo /t:winexe /out:app1.exe /res:MyNameSpace.MainForm.resources
/win32icon:App.ico *.cs

The output exe file has the same size as compiled in VS.NET IDE, however, at
runtime the program still complains that there is some resource error.

Anyone can help with this? Thanks!
 
D

Dino Chiesa [Microsoft]

I don't know precisely the problem with your resource.
are you saying that the app, if build within visual studio, runs correctly,
and if built outside VS, it does not run correctly?
If so, then it seems that you have not done the build "the same way".

I know of 2 options for automating builds from the command line:

1. from the command line, you can automate the VS IDE to perform the build
for you.:
DEVENV.exe solution1.sln /rebuild Release

2. third party products that can automate VS builds, or generate makefiles
from VS proj files.
- Nant
- openmakr
- Visual Build

see also
http://www.ftponline.com/vsm/2003_10/magazine/features/huang/default.aspx

-Dino
 
G

Guest

Thanks Dino,

The problem is exactly what you said.
My question is, is there any way to compile using only .Net Framework? The
situation is: I don't have VS.NET installed, no devenv.exe there to compile.
I just want to use command line compilation using csc.exe or some tools
provided by MS. Is this impossible?
Thanks again!
 

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