468,309 Members | 1,145 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

How to compile resource files via Nant?

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

May 31 '06 #1
2 2828
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

May 31 '06 #2
Ok, to get rid of the DOS window, I should be using winexe instead of
exe in the csc tag.

Brett

May 31 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by HaukiDog | last post: by
5 posts views Thread by NOSPAM | last post: by
4 posts views Thread by Jason Pettys | last post: by
4 posts views Thread by emferrari | last post: by
3 posts views Thread by FredZimmerman | last post: by
4 posts views Thread by samueltilden | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.