Click here to Skip to main content
15,896,912 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a simple code in ASP.net, a website with two pages that needs to be build automated using Nant tool, but while building I am getting errors. Can somebody help me with this. the .build file content is as follows.



XML
<?xml version="1.0"?>
<project name="Employee_Satisfaction" default="build">
    <property name="debug" value="true" />
    <property name="dir.libs" value="libs\" />
    <property name="BuildDir" value="C:\Documents and Settings\nsin004\My Documents\Visual Studio 2008\WebSites\Employee_Satisfaction"/>
    <property name="SolutionFileName" value="Employee_Satisfaction.sln"/>
    <property name="WebProjectFolderName" value="Employee_Satisfaction" />
        <target name="build" description="compiles the  application">
    <csc target="library"   output="Employee_Satisfaction.dll" debug="${debug}">
        <sources>
            <include name="Page2.aspx.cs" />
            <include name="Page3.aspx.cs" />
        </sources>
        <references>
            <include name="System.dll"/>
            <include name="System.Data.dll"/>
            <include name="System.Xml.dll"/>
        </references>


    </csc>
    </target>
</project>




error : error CS0103: The name 'RadioButtonListans' does not exist in the current context
Posted
Updated 13-Jun-11 20:04pm
v4
Comments
thatraja 13-Jun-11 11:34am    
Include the error message in your question.

This could be a build error on the code side. Make sure RadioButtonListans is a valid RadioButtonList in code.
Make sure the project is building in Visual Studio.
If this is a third party control, it should be included in the include section in the script.
 
Share this answer
 
Comments
Member 3792783 14-Jun-11 2:28am    
This is giving error for all the controls that have been put in the pages. The code is getting build successfully in the Visual Studio but has problem when getting build with Nant.

controls have been referred in the reference section in the above script.
OP wrote:
error CS0103: The name 'RadioButtonListans' does not exist in the current context

Actually it's a scope related issue.

This link explains clearly.(Look at the variable conn there)

Compiler Error CS0103[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900