Title: winexe build reports errors when Folder
Doug,
 
NAnt currently by default targets the ..NET Framework 1.0 (this might change in the near future).
 
To change the target framework you can (man, we urgently need to document this somewhere) :
 
1. use the -k (-defaultframework) commandline option
 
eg. NAnt.exe -buildfile:<buildfile> -k:net-1.1
 
2. change the value of the nant.settings.currentframework property
 
<property name="nant.settings.currentframework" value="net-1.1" />
 
3. change the default framework in the NAnt configuration file.
 
Hope this helps,
 
Gert
 
----- Original Message -----
Sent: Wednesday, February 18, 2004 3:43 PM
Subject: [Nant-users] winexe build reports errors when Folder

Guys,
Any help on this would be much appreciated :

DESCRIPTION OF PROBLEM
        The following NANT buildfile does not successfully compile a windows exe if there is a folderBrowserDialog variable in code.

        The compiler error message states that "FolderBrowserDialog" does not exist in the namespace 'System.Windows.Forms'

        However, just using csc.exe works fine ... csc /target:winexe /out:winapp.exe *.cs
       
        Buildfile
        _________________________________________
<?xml version="1.0"?>
    <project name="TEST" default="winapp">
        <description>Test</description>
        <property name="debug" value="true" />
        <target name="winapp" description="compiles source code">           
                <csc target="winexe" output="winapp.exe" debug="${debug}" >
                <sources>
                    <includes name="*.cs" />
                </sources>
            </csc>
        </target>
     </project>
        _________________________________________

STEPS 2 REPRODUCE
        (1) create a regular windows form app in vs.net (2003)
        (2) add a FolderBorwserDialog control on the form
        (3) f5 to compile or run csc /target:winexe /out:winapp.exe *.cs in the app directory to see that it compilese
        (4) run the nant buildfile listed above - the compilation fails as stated

Thanks for any help you can give me

Doug Hale
ISG
(404) 575-7183

Reply via email to