Hi,

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: Ian MacLean <[EMAIL PROTECTED]>
>CC: "Thomas A. Brandle" <[EMAIL PROTECTED]>,        [EMAIL PROTECTED]
>Subject: Re: [Nant-users] C# windows app problem
>Date: Fri, 25 Jun 2004 16:29:30 +0900
>
>sorry - that should be:
>
><csc target="winexe"
>output="${RELEASEFOLDER}\${TESTNANTWINAPP.EXE}" debug="false">
>    <sources>            <includes
>name="${TESTNANTWINAPP}\AssemblyInfo.cs"/>                          
>                   <includes name="${TESTNANTWINAPP}\Form1.cs" />
>       </sources>            <resources>
>           <includes name="${TESTNANTWINAPP}\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


Start your day with a little more power. Get Oral B CrossAction today! ------------------------------------------------------- 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