471,086 Members | 1,206 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,086 software developers and data experts.

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 2892
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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.