Hi All,
 
    When I try to build my application using NAnt. I get the following error.
 
[vbc] Compiling 8 files to 'C:\WebSamplesVB\bin'.
[vbc] vbc : Command line error BC2012 : can't open 'C:\WebSamplesVB\bin' for writing
 
   Does any body know what could be causing this? I have attached my build file if anyone wants to take a look.
   Any help will greatly be appreciated.
 
Thanks,
Shabana
<?xml version="1.0"?>
<!-- ===========================	Web Samples VB	=================================== -->  

<project name="WebSamplesVB" default="developer">

    <include buildfile="nant.properties" failonerror="true" />   
    
    <target name="buildCommonServer">
        <nant buildfile="${project.common.basedir}\default.build" target="server" inheritall="false" />
    </target>
    
    <target name="buildCommonDeveloper">
        <nant buildfile="${project.common.basedir}\default.build" target="developer" inheritall="false" />
    </target>
 
 <!-- ===========================     START BUILD OPTIONS 	======================================= -->
    <!-- * Execute a Developer build *--> 
    <target name="developer" description="make a developer rebuild">
    <echo message="Executing a DEVELOPER mode DEBUG build"/>
      <call target="clean" /> 
      <call target="setup-build" />
      <call target="WebButtons" />
      <!--<call target="WebCalcManager" />
      <call target="WebCalendar" />
      <call target="WebCharts" />
      <call target="WebDateChooser" />
      <call target="WebGrid" />
      <call target="WebHtmlEditor" />
      <call target="WebListBar" />
      <call target="WebMenu" />
      <call target="WebNavBar" />
      <call target="WebPanels" />
      <call target="WebSchedule" />
      <call target="WebSpellChecker" />
      <call target="WebTabs" />
      <call target="WebTextEditors" />
      <call target="WebToolBars" />
      <call target="WebTree" />
      <call target="copy" />-->
    </target>
    
    
    <!-- * Rebuild the solution from scratch, test, and create docs *--> 
    <target name="server" depends="buildCommonServer" description="make a full, clean rebuild">
        <echo message="Executing a SERVER mode DEBUG build"/>
        <call target="clean" /> 
        <call target="setup-build" />
        <call target="WebButtons" />
        <call target="WebCalcManager" />
        <call target="WebCalendar" />
        <call target="WebCharts" />
        <call target="WebDateChooser" />
        <call target="WebGrid" />
        <call target="WebHtmlEditor" />
        <call target="WebListBar" />
        <call target="WebMenu" />
        <call target="WebNavBar" />
        <call target="WebPanels" />
        <call target="WebSchedule" />
        <call target="WebSpellChecker" />
        <call target="WebTabs" />
        <call target="WebTextEditors" />
        <call target="WebToolBars" />
        <call target="WebTree" />
        <call target="copy" />
    </target>
    
    <!-- * Rebuild the solution in RELEASE mode for a SERVER  *--> 
	<target name="release" description="set properties for a release build">
	  <echo message="Executing a RELEASE mode DEBUG build"/>
	  <property name="debug" value="false" />
	  <property name="optimize" value="true" />
	  <call target="server" /> 	  
	  <call target="releaseDir" />
	</target>
 <!-- ===========================     END BUILD OPTIONS 	======================================= -->
 

 <!-- ===========================     START PRE-BUILD  	======================================= -->    
    <target name="clean">
            <delete dir="C:\WebSamplesVB\build" failonerror="false" />
             <!-- <delete dir="${project.docs.dir}" failonerror="false" /> -->
    
            <!-- Delete all pbgc dlls in the WebGrid\WebButtons\* path -->	
            <delete failonerror="false" verbose="${verbose}">
               <fileset>
                  <include name="C:\WebSamplesVB\bin\*.dll"/>
               </fileset>
            </delete>
    </target>
    
    
    <target name="setup-build" description="compiles the source code">
            <!-- prepare build directory -->
            <mkdir dir="C:\WebSamplesVB\build" />
    </target>
 
 <!-- ===========================     END PRE-BUILD  	======================================= -->    
 
 
 <!-- ===========================	START ASSEMBLY COMPILATION 	======================================= -->  
   
    <!-- compile WebButtons.dll -->
    <target name="WebButtons">
    <vbc output="C:\WebSamplesVB\bin" target="library">
          <sources>
            <include name=".\*.vb" />
           </sources>
            
          <references>
            <!--<include asis="true" name="Microsoft.VisualBasic" />
            <include asis="true" name="System" />
            <include asis="true" name="System.Collections" />
            <include asis="true" name="System.Data" />
            <include asis="true" name="System.Diagnostics" />-->
            <include asis="true" name="C:\Program Files\Infragistics\NetAdvantage 2006 Volume 1 CLR 1.x\ASP.NET\Bin\" />          
                                 
          </references>
        </vbc>
    
    </target>    
   

<!-- ===========================	START ASSEMBLY COMPILATION 	======================================= -->  


 <!-- ===========================	START POST BUILD 	======================================= -->  
     <!-- * Copy built DLLs to the web project directories                *--> 
    
    <target name="copy" description="copying DLLs to web root">
    <copy todir="C:\WebSamplesVB\bin">
    	<fileset basedir="C:\WebSamplesVB\build">
        	<include name="*.dll" />
     	</fileset>
    </copy>
    </target>
    
    
    <target name="releaseDir">

    <echo message = "Deleting C:\WebSamplesVB\release-builds"/>
	    <delete dir="C:\WebSamplesVB\release-builds" failonerror="false" />
   

	<echo message = "Creating C:\WebSamplesVB\release-builds directory directory"/>
	<copy todir="C:\WebSamplesVB\release-builds">
                <fileset basedir="C:\WebSamplesVB\build">
                    <include name="*.dll" />
                </fileset>
            </copy>

   
	<copy todir="C:\WebSamplesVB\release-builds">
		<fileset basedir="C:\WebSamplesVB">
			<include name="AssemblyInfo.vb" />
		</fileset>
	</copy>  
	
	
	<echo message = "Copying and renaming Web.config.deploy files to release-builds directory"/>
	<copy file="C:\WebSamplesVB\Web.config.deploy" tofile="C:\WebSamplesVB\release-builds\Web.config" />
	
    </target>

 <!-- ===========================	END POST BUILD 	======================================= -->  
 

</project>

Reply via email to