Command line compiler when there are images in the project: any suggestion?

  • Thread starter Francesco Martinelli
  • Start date
F

Francesco Martinelli

I need to create a multiple file assemby: this requires working directly
with the command line compiler (no IDE support!).
After a few tests I found my problem comes from the issue described below.
Thank you in advance for any suggestion?
===
The project is a nearly empty Windows Form project, and the compilation
works fine as far as there is no bitmap in the project form.
I have to use the command line compiler and I use the following command
line:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\csc.exe /out:test.exe

If in the picture box control of the form I define the "Image" field, then
the compilation works fine, but i get the following exception at run time:
'System.Resources.MissingManifestResourceException'.
On the other side, if I try to compile it with the VS IDE everything works
fine (but it is not usefull for my test!)

I also tried using the /resource option (with the file returned by
ResGen.exe on Form1.resx), but with no benefit.

Does anyone know if it is possible to get the command line used by the IDE?

Thanks,
Francesco.
 
N

Nicholas Paldino [.NET/C# MVP]

Francesco,

Can you post some code, or an example? Without seeing the code, it's
impossible to see how you are obtaining the resource (which you are not
specifying, btw), or how you are assigning the picture.
 
N

Nicholas Paldino [.NET/C# MVP]

Francesco,

Can you post the contents of build.bat? OE blocks attachments that are
batch files.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Francesco Martinelli said:
Nicholas,
to keep at the minimum the possible errors I could introduce, I just
opened
a windows project (in VS) andded an image control to the form and assigned
the image property throw the property panel to the control.

Attached are the sources.

Thank you,
Francesco.


Nicholas Paldino said:
Francesco,

Can you post some code, or an example? Without seeing the code, it's
impossible to see how you are obtaining the resource (which you are not
specifying, btw), or how you are assigning the picture.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Francesco Martinelli said:
I need to create a multiple file assemby: this requires working directly
with the command line compiler (no IDE support!).
After a few tests I found my problem comes from the issue described
below.
Thank you in advance for any suggestion?
===
The project is a nearly empty Windows Form project, and the compilation
works fine as far as there is no bitmap in the project form.
I have to use the command line compiler and I use the following command
line:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\csc.exe /out:test.exe

If in the picture box control of the form I define the "Image" field,
then
the compilation works fine, but i get the following exception at run
time:
'System.Resources.MissingManifestResourceException'.
On the other side, if I try to compile it with the VS IDE everything
works
fine (but it is not usefull for my test!)

I also tried using the /resource option (with the file returned by
ResGen.exe on Form1.resx), but with no benefit.

Does anyone know if it is possible to get the command line used by the
IDE?

Thanks,
Francesco.
 
F

Francesco Martinelli

Nicholas,
the only "build.bat" files I can find on my system are below the directory:
C:\Programmi\Microsoft Visual Studio .NET 2003\SDK\v1.1\Samples\...
I doubt they can help!

I wonder wether you know if it is possible to ask VS to produce it with some
option.
I immagine there is an option, but I can't find it!

Francesco.

Nicholas Paldino said:
Francesco,

Can you post the contents of build.bat? OE blocks attachments that are
batch files.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Francesco Martinelli said:
Nicholas,
to keep at the minimum the possible errors I could introduce, I just
opened
a windows project (in VS) andded an image control to the form and
assigned
the image property throw the property panel to the control.

Attached are the sources.

Thank you,
Francesco.


Nicholas Paldino said:
Francesco,

Can you post some code, or an example? Without seeing the code, it's
impossible to see how you are obtaining the resource (which you are not
specifying, btw), or how you are assigning the picture.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

I need to create a multiple file assemby: this requires working directly
with the command line compiler (no IDE support!).
After a few tests I found my problem comes from the issue described
below.
Thank you in advance for any suggestion?
===
The project is a nearly empty Windows Form project, and the compilation
works fine as far as there is no bitmap in the project form.
I have to use the command line compiler and I use the following command
line:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\csc.exe /out:test.exe

If in the picture box control of the form I define the "Image" field,
then
the compilation works fine, but i get the following exception at run
time:
'System.Resources.MissingManifestResourceException'.
On the other side, if I try to compile it with the VS IDE everything
works
fine (but it is not usefull for my test!)

I also tried using the /resource option (with the file returned by
ResGen.exe on Form1.resx), but with no benefit.

Does anyone know if it is possible to get the command line used by the
IDE?

Thanks,
Francesco.
 
F

Francesco Martinelli

Did you mean th lines present in the previously attached batch?
They are:

"C:\Programmi\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\resgen.exe"
Form1.resx
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\csc.exe /out:test1.exe Form1.cs
/resource:Form1.resources

Is there anything missing?
Thnks,
Francesco.


Nicholas Paldino said:
Francesco,

Can you post the contents of build.bat? OE blocks attachments that are
batch files.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Francesco Martinelli said:
Nicholas,
to keep at the minimum the possible errors I could introduce, I just
opened
a windows project (in VS) andded an image control to the form and
assigned
the image property throw the property panel to the control.

Attached are the sources.

Thank you,
Francesco.


Nicholas Paldino said:
Francesco,

Can you post some code, or an example? Without seeing the code, it's
impossible to see how you are obtaining the resource (which you are not
specifying, btw), or how you are assigning the picture.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

I need to create a multiple file assemby: this requires working directly
with the command line compiler (no IDE support!).
After a few tests I found my problem comes from the issue described
below.
Thank you in advance for any suggestion?
===
The project is a nearly empty Windows Form project, and the compilation
works fine as far as there is no bitmap in the project form.
I have to use the command line compiler and I use the following command
line:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\csc.exe /out:test.exe

If in the picture box control of the form I define the "Image" field,
then
the compilation works fine, but i get the following exception at run
time:
'System.Resources.MissingManifestResourceException'.
On the other side, if I try to compile it with the VS IDE everything
works
fine (but it is not usefull for my test!)

I also tried using the /resource option (with the file returned by
ResGen.exe on Form1.resx), but with no benefit.

Does anyone know if it is possible to get the command line used by the
IDE?

Thanks,
Francesco.
 

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