473,594 Members | 2,839 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

NANT, web projects and resource files

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 this:

<?xml version="1.0" ?>
<project name="MyProject " default="build" basedir=".">
<description>Th e Hello World of build files.</description>
<property name="debug" value="true"/>
<property name="bin_direc tory" value="bin"/>

<target name="clean" description="re move all generated files">
<delete dir="${bin_dire ctory}" failonerror="tr ue"
verbose="true"/>
</target>

<target name="build" description="co mpiles the source code"
depends="clean" >
<solution configuration=" release">
<projects>
<includes name="MyProject .csproj" />
</projects>
</solution>
</target>

</project>

It gives me some errors on the building of resource files. Some work,
and some don't. I have been able to work around some files by just
deleting whatever info was shown in the resource editor. The error are
stuff like:

c:\MyProject\My Page.aspx.resx
error: Invalid ResX input

I have not changed any of the resource files, they are the ones VS
generates. Does NANT use a different compiler then the IDE, seems so?

Does anyone have any idea what might be wrong.

Thanks!!!
Dave
Nov 15 '05 #1
2 3797
it uses the same compilers (vbc.exe and csc.exe) as the ide. look at your
nant config, to see which framework (1.0 or 1.1) nant is building with.
"HaukiDog" <Ha******@hotma il.com> wrote in message
news:6d******** *************** ***@posting.goo gle.com...
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 this:

<?xml version="1.0" ?>
<project name="MyProject " default="build" basedir=".">
<description>Th e Hello World of build files.</description>
<property name="debug" value="true"/>
<property name="bin_direc tory" value="bin"/>

<target name="clean" description="re move all generated files">
<delete dir="${bin_dire ctory}" failonerror="tr ue"
verbose="true"/>
</target>

<target name="build" description="co mpiles the source code"
depends="clean" >
<solution configuration=" release">
<projects>
<includes name="MyProject .csproj" />
</projects>
</solution>
</target>

</project>

It gives me some errors on the building of resource files. Some work,
and some don't. I have been able to work around some files by just
deleting whatever info was shown in the resource editor. The error are
stuff like:

c:\MyProject\My Page.aspx.resx
error: Invalid ResX input

I have not changed any of the resource files, they are the ones VS
generates. Does NANT use a different compiler then the IDE, seems so?

Does anyone have any idea what might be wrong.

Thanks!!!
Dave

Nov 15 '05 #2
One thing you might want to try is to download the NAntContrib add-on's from
nantcontrib.sou rceforge.net.

There's a task included called "SLiNgshot" (something like that) that will
parse your Solution file and create a <solution name>.build file for you
when you execute the task. I've used this as a kind of jumpstart for
creating a new build script.

<?xml version="1.0"?>
<project name="SlingShot Example" default="build" basedir=".">
<description>Sl ingShot Example</description>

<property name="solutionN ame" value="HelloWor ld" readonly="true"/>

<target name="BuildSolu tion">
<!-- Parse the specified Solution file -->
<!-- Create a Nant build file from that file. -->
<slingshot solution="${sol utionName}.sln" format="nant"
output="${solut ionName}.build" >
<parameters>
<option name="build.bas edir" value="..\bin"/>
</parameters>
</slingshot> -->
<!-- Execute the generated build file. -->
<nant buildfile="${so lutionName}.bui ld"/>
</target>

</project>

This script will create "HelloWorld.bui ld" based on your solution
"HelloWorld.sln ". From there you can examine the generate build script and
alter it as you see fit. If you want to alter the generated script I
recommend removing or commenting out the slingshot task, because the
generated .build file will be overwritten every time the script is executed.

Hope this is helpful!

Michael Hall
mh***@just3ws.c om
Just3Ws, Inc.

"HaukiDog" <Ha******@hotma il.com> wrote in message
news:6d******** *************** ***@posting.goo gle.com...
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 this:

<?xml version="1.0" ?>
<project name="MyProject " default="build" basedir=".">
<description>Th e Hello World of build files.</description>
<property name="debug" value="true"/>
<property name="bin_direc tory" value="bin"/>

<target name="clean" description="re move all generated files">
<delete dir="${bin_dire ctory}" failonerror="tr ue"
verbose="true"/>
</target>

<target name="build" description="co mpiles the source code"
depends="clean" >
<solution configuration=" release">
<projects>
<includes name="MyProject .csproj" />
</projects>
</solution>
</target>

</project>

It gives me some errors on the building of resource files. Some work,
and some don't. I have been able to work around some files by just
deleting whatever info was shown in the resource editor. The error are
stuff like:

c:\MyProject\My Page.aspx.resx
error: Invalid ResX input

I have not changed any of the resource files, they are the ones VS
generates. Does NANT use a different compiler then the IDE, seems so?

Does anyone have any idea what might be wrong.

Thanks!!!
Dave

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1169
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 this: <?xml version="1.0" ?> <project name="MyProject" default="build" basedir="."> <description>The Hello World of build files.</description> <property name="debug" value="true"/>
1
3352
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 name="${AppName}\**.en.resx" /> <include name="${AppName}\Global.asax.resx" /> </resources>
1
1385
by: Bit byte | last post by:
I am a NANT newbie. I would like to use NAnt to automate my build processes - but have come unstuck early on in the process. I have several projects under a /src directory. There is some inter-dependencies between some projects. I want to have to have two build scripts as ff: 1). one main build file (say /src/main.build). 2). A single build file for each project ( say /src/project1/project1.build)
3
2859
by: Me | last post by:
I have a simple solution file which I am looking to build using Nant However this is written in .net 2.0 and when I try building this .net 2.0, I get an error message saying "Microsoft Visual Studio.NET 2005 solutions are not supported." Does nant not support building .net projects? Many thanks
2
3012
by: Brett Romero | last post by:
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...
0
1261
by: Brett Romero | last post by:
I can build a winexe using Nant without problems. If I add a Resources.resx file with images in it and reference those image on a form, I can't build correctly. The build success but the program always crashes with an error similar to: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Test.Properties.Resources.resources" was correctly embedded or linked into assembly "TestWinForm" at...
1
1700
by: Spam Catcher | last post by:
Hello Everyone, I just started using nant in conjunction with cruisecontrol.net. The <solutiontag has been great in helping us compile VS.NET 2003 projects without need to write a nant build file. My project compiles stuff into a directory like: C:\DEV_Machine\Build_Directory <-Empty C:\DEV_Machine\Build_Directory\Project_1 <-Project 1 Bin
0
2106
by: james.mcdonagh | last post by:
Hi I am a newbie using nAnt for .net 2.0. As such I have not come across this bug before, and I would be happy of any help that you may be able to provide. In order to help I have included the nant file which is causing the problem, the object code that is not being built and the error message which is being produced. The weird thing is that VS.net builds without a problem. And the intellisense within the object WorkQueue knows that...
1
6167
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 WorkQueue knows that Master is referring to the PanelManager reference. nant file ------------------------------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="utf-8"?>...
0
7877
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8253
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8009
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8240
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5739
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3867
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3903
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1482
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1216
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.