构建自动化工具:Nant [英] Build Automation tool: Nant
问题描述
我在ASP.net中有一个简单的代码,该网站有两个页面,需要使用Nant工具进行自动构建,但是在构建时遇到了错误.有人可以帮我这个忙吗? .build文件的内容如下.
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 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>
错误:错误CS0103:名称"RadioButtonListans"在当前上下文中不存在
error : error CS0103: The name ''RadioButtonListans'' does not exist in the current context
推荐答案
{debug}" < 来源 > < include =" Page2.aspx.cs" / > < include =" Page3.aspx.cs" / > < /sources > < 引用 > < include =" System.dll" > < include 名称 System.Data.dll" / > < include =" System.Xml.dll" / > < /引用 > < /csc > < /target > < /project >
{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>
错误:错误CS0103:名称"RadioButtonListans"在当前上下文中不存在
error : error CS0103: The name ''RadioButtonListans'' does not exist in the current context
这可能是代码方面的构建错误.确保RadioButtonListans
在代码中是有效的RadioButtonList.
确保项目在Visual Studio中构建.
如果这是第三方控件,则应将其包含在脚本的include部分中.
This could be a build error on the code side. Make sureRadioButtonListans
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.
错误CS0103:名称"RadioButtonListans"在当前上下文中不存在
error CS0103: The name ''RadioButtonListans'' does not exist in the current context
实际上,这是与范围相关的问题.
该链接清楚地说明了.(在此处查看变量conn
)
编译器错误CS0103 [
Actually it''s a scope related issue.
This link explains clearly.(Look at the variable conn
there)
Compiler Error CS0103[^]
这篇关于构建自动化工具:Nant的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!