我的 .Net Web 应用程序的顶层有代码,我想对其进行单元测试,但是当我的构建服务器使用 aspnet_compiler.exe 编译项目时,它会生成一个完全不能被其他人使用的 .dll 文件项目,即一个 NUnit 测试项目。
(对于 ASP .Net Web 应用程序和 ASP .Net MVC 应用程序也是如此。)
我在这里做错了吗?这是我的调用编译器的 NAnt 脚本...
<exec program="${asp.compiler.home}/aspnet_compiler.exe" failonerror="true">
<arg value="-nologo"/>
<arg value="-c"/>
<arg value="-f"/>
<arg value="-errorstack"/>
<arg value="-v"/>
<arg value="${project.name}"/>
<arg value="-p"/>
<arg value="${project::get-base-directory()}"/>
<arg value="${web.deploy.dir}\${project.name}"/>
</exec>