How to compile resource files via Nant?

  • Thread starter Thread starter Brett Romero
  • Start date Start date
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
 
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
 
Ok, to get rid of the DOS window, I should be using winexe instead of
exe in the csc tag.

Brett
 
Back
Top