How to compile resource files via Nant?

B

Brett Romero

I am compiling a winform app using nant. I first compile via VS.NET,
which generates *.resource files in obj\debug. Then I use the
<resources> tag in the Nant script to complete a build via Nant.

I did try the Nant build by accessing the *.resx file instead. The app
throws this error when I start it:
Could not find any resources appropriate for the specified culture or
the neutral culture. Make sure "myapp.Properties.Resources.resources"
was correctly embedded or linked into assembly "myapp" at compile time,
or that all the satellite assemblies required are loadable and fully
signed.

Does Nant have some way of generating the .resource files from the
..resx file?

Also, why does a DOS window open everytime I start the app? This only
happens with the Nant built EXE. The VS.NET EXE doesn't do this.

Thanks,
Brett
 
B

Brett Romero

I have it going now by using the resgen tag right after a target tag.

<target>

<resgen >
<resources>
<include name="*.resx" />
</resources>
</resgen>

<csc target="exe">

<sources>
<include name="*.cs" />
</sources>

<resources>
<include name="*.resources" />
</resources>


Still can't get rid of the accompanying DOS window that opens when I
start the app.

Brett
 
B

Brett Romero

Ok, to get rid of the DOS window, I should be using winexe instead of
exe in the csc tag.

Brett
 

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