Thanks to all. It works great now.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ian MacLean
Sent: Friday, June 25, 2004 2:21 AM
To: [EMAIL PROTECTED]
Subject: [Fwd: Re: [Nant-users] C# windows app problem]



-------- Original Message --------
Subject:        Re: [Nant-users] C# windows app problem
Date:   Fri, 25 Jun 2004 13:47:35 +0530
From:   Deepak Sivaraman <[EMAIL PROTECTED]>
To:     [EMAIL PROTECTED]



Or u can do this also .........

<?xml version="1.0"?>
<project name="TESTNANTWINAPP" default="build" basedir=".">

<target name="clean">
<delete>
<fileset>

<includes name=".\bin\TESTNANTWINAPP.exe"/>
</fileset>
</delete>
</target>



<target name="build" depends ="clean">
<solution outputdir=".\bin" configuration="Debug">
<projects>
<includes name=".TESTNANTWINAPP.csproj" />
</projects>

</solution>
</target>
</project>

On exceuting this BuildScript and exe will be automatically generated in 
the bin directory.

 >From: Ian MacLean <[EMAIL PROTECTED]> >To: "Thomas A. Brandle" 
<[EMAIL PROTECTED]> >CC: [EMAIL PROTECTED] 
 >Subject: Re: [Nant-users] C# windows app problem >Date: Fri, 25 Jun 
2004 14:59:02 +0900 > >Thomas, >a couple of things. Firstly you 
shouldn't be including the .sln file >in the includes list for the csc 
task. It will just be ignored >anyway. If you really want to build the 
solution then use the >solution task. > >As for the resource loading 
issue- the problem is that you aren't >compiling the attached resources. 
If you look in your project >directory (${TESTNANTWINAPP}) you'll see a 
Form1.resx file. You need >to add a <resources> tag to your csc task to 
compile this in. VS.net >does the same thing behind the scenes. >so: > 
 ><csc target="winexe" >output="${RELEASEFOLDER}\${TESTNANTWINAPP.EXE}" 
debug="false"> > <sources> <includes 
 >name="${TESTNANTWINAPP}\AssemblyInfo.cs"/> > <includes 
name="${TESTNANTWINAPP}\Form1.cs" /> > </sources> <resources> > 
<includes name="Form1.resx"/> > </resources> > >... > >If you still have 
problems could you please post the full text of >any error output. > 
 >Ian > > >Thomas A. Brandle wrote: > >>I am a new NAat user, and I am 
having some trouble building a >>windows >>application. I am using the 
last stable build 0.84 >> >> >> >> >> >><project> >> >><target 
name="MakeDirs"> >> >> <mkdir dir="${BIN}" /> >> >> <mkdir 
dir="${BIN}\${RELEASE}" /> >> >> </target> >> >> <target 
name="build_WINAPP" depends="MakeDirs"> >> >> <csc target="winexe" 
 >>output="${RELEASEFOLDER}\${TESTNANTWINAPP.EXE}" debug="false"> >> >> 
 >> <sources> >> >> <include 
 >>name="${TESTNANTWINAPP}\TestNAntWinøpp.sln" >>/> <!—- or csproj on 
niether --> >> >> <includes >>name="${TESTNANTWINAPP}\AssemblyInfo.cs" 
 >>/> >> >> <includes name="${TESTNANTWINAPP}\Form1.cs" >>/> >> >> >> 
</sources> >> >> </csc> >> >> </target> >> >> >> >> </project> >> >> >> 
 >>I didn’t include the properties. NAnt builds the app correctly only 
 >>if I >>modify the Form.InitializeComponent method and replace the 
line >> >>this.Icon = 
 >>((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); >> >> >> 
 >>with >> >>this.Icon = new 
 
>>Icon(@"C:\Code\TestSWDBuildScripts\TestNAntWinApp\TestNAntWinApp\App.ico")
; 
 >> >> >> >>the App.ico is not the default icon, but the company icon. 
 >> >> >> >>It doesn’t matter if I include the solution file or the 
project >>file or I >>don’t include either. It builds all other apps I 
have tried just >>fine, >>console, dll, even win services. When I try to 
run the app the VS >>debugger >>fires off and it cries about the 
resource file. I have tried >>everything I >>can think of to include the 
resource file, but then the build >>fails. I have >>been reading a few 
of the threads, but nothing so far has worked. I >>can’t >>easily 
include the above line into all forms. There are just to >>many and 
 >>when the gui is edited, VS rewrites the InitializeComponent method. 
 >> >> >> >>If anyone can point me in the right direction, I would 
really >>appreciated >>it. >> >>Thanks >> >> >> >> > > >-- >Ian MacLean, 
Developer, ActiveState, a division of Sophos >http://www.ActiveState.com 
 > > > >------------------------------------------------------- >This 
SF.Net email sponsored by Black Hat Briefings & Training. >Attend Black 
Hat Briefings & Training, Las Vegas July 24-29 - >digital self defense, 
top technical experts, no vendor pitches, >unmatched networking 
opportunities. Visit www.blackhat.com 
 >_______________________________________________ >Nant-users mailing 
list >[EMAIL PROTECTED] 
 >https://lists.sourceforge.net/lists/listinfo/nant-users

------------------------------------------------------------------------
Get Ready Cash instantly. In 72 hrs ! 
<http://g.msn.com/8HMAENIN/2746??PS=47575>

-- 
Ian MacLean, Developer, 
ActiveState, a division of Sophos
http://www.ActiveState.com



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to