473,385 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 2997
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: aladdin | last post by:
I use outside .jpg picture files in a Windows Form project. I try to compile use csc.exe at command line. I use resgen.exe to generate a resource file like: resgen.exe Form1.resx...
2
by: HaukiDog | last post by:
Hi, I am trying to set up my C# web project to be compiled by NANT. Everything compiles and works fine within the IDE. I have a created a NANT build file which has a simple project tag, like...
5
by: NOSPAM | last post by:
I don't have Visual Studio, Is there an easy way to compile bunch of .cs files at once? I have written several .cs files and put in the /bin folder .... everytime I add a new file, I have to...
4
by: Jason Pettys | last post by:
In an ASP.NET project I am setting the content type of my .ascx and ..aspx files to Embedded Resource for a separate reason. When I do this they get embedded as "RootNamespace.Filename" but I...
4
by: emferrari | last post by:
Hi all I have a cs project that contains a reference to the MSI.DLL. If I open the project manually into the VS.NET it compiles fine, but when it runs against nant it fails. The error is...
1
by: urban.john | last post by:
Here are my steps: create resource files from resx files: <echo message="CREATING RESOURCE FILES FROM RESGEN EN" /> <resgen todir="product\resources_en" verbose="true"> <resources> <include...
1
by: jamesmcdonagh | last post by:
Hi newbie using nAnt for .net 2.0. I would be happy of any help that you may be able to provide. The weird thing is that VS.net builds without a problem. And the intellisense within the object...
3
by: FredZimmerman | last post by:
Has anyone used nAnt script to simply copy folders and files from one location to another? I have a colleague who is suggesting this use of nAnt for our environment. I've heard of nAnt for...
4
by: samueltilden | last post by:
How can I get the machine name on which the C# code is compiled and then reference that value within the executable code, as in a "Help -- Preferably embed the answer in a .dll. Worst case would...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.