469,643 Members | 1,282 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,643 developers. It's quick & easy.

How to compile proj with resources at command line?

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!

Nov 22 '05 #1
3 5475
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...g/default.aspx

-Dino

"aladdin" <al*****@discussions.microsoft.com> wrote in message
news:86**********************************@microsof t.com...
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!

Nov 22 '05 #2
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...g/default.aspx

-Dino

"aladdin" <al*****@discussions.microsoft.com> wrote in message
news:86**********************************@microsof t.com...
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!

Nov 22 '05 #3
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!
"Dino Chiesa [Microsoft]" wrote:
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...g/default.aspx

-Dino

"aladdin" <al*****@discussions.microsoft.com> wrote in message
news:86**********************************@microsof t.com...
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!


Nov 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Aquila Deus | last post: by
6 posts views Thread by Kevin Atherton | last post: by
reply views Thread by Jérôme Le Bougeant | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.