Trying to Build and Publish Asp.net website from command line using aspnet_compiler

非 Y 不嫁゛ 提交于 2019-12-01 19:47:37
grobartn

I solved the problem in meantime. You just need to pass the physical path, because it picks up one from IIS

aspnet_compiler -v /WebsiteOne -p c:\projects\Website1 -f c:\Inetpub\wwwroot\WebsiteOne 

in case someone else encountered same problem..

Also, you might consider using MSBuild on your solution file, and using the Publish target.

That's what VStudio is doing under the covers anyway. :-)

From http://johnnycoder.com/blog/2008/01/29/getting-started-with-cruisecontrolnet/

I have pasted the information, in case his blog ever goes down.

  1. For web solutions, update the TargetPath for the Debug and/or Release build of the application to be outside of the source application directory. Otherwise, you will receive the following error:

ASPNETCOMPILER : error ASPRUNTIME: The precompilation target directory cannot be in the same tree as the source application directory.

This can be done by modifying the following in the solution file:

Debug.AspNetCompiler.TargetPath = “c:\ccnet\PrecompiledWeb\SampleWeb\”
Release.AspNetCompiler.TargetPath = “c:\ccnet\PrecompiledWeb\SampleWeb\”

Alternative, one may update the Output location found in the application MSBuild properties.

You may be wondering why an updated solution won’t be updated with the next scheduled build. As it works out (and makes sense) only changes which are applied to source control are pulled onto the build box.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!