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

3

7

I am trying this. I have built asp.net website. When I publish to IIS through VS2008 it works fine. Lets say my site is at c:\projects\Website1\ I want to publish it to c:\Inetpub\wwwroot\WebsiteOne

I am trying to mimic publish from studio. That is publish and remove anything that is in side.

I tried this: aspnet_compiler -v/WebsiteOne -f c:\Inetpub\wwwroot\WebsiteOne

Error: error ASPRUNTIME: The precompilation target directory (c:\Inetpub\wwwroot\WebsiteOne) cannot be in the same tree as the source application directory (c:\inetpub\wwwroot\WebsiteOne).

When I tried this: aspnet_compiler -v/WebsiteOne

I get error This application is already precompiled.

Anyone who could give me an insight on how to do compile line building and publishing of website

Thanks

Reconstruct answered 11/6, 2009 at 17:26 Comment(1)
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..Reconstruct
R
7

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..

Reconstruct answered 8/7, 2010 at 15:37 Comment(0)
U
1

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. :-)

Uta answered 7/7, 2009 at 1:42 Comment(1)
But he says it's a web site. And this is a 2 year old thread, I don't think it's relevant any more.Uta
M
0

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.

Montford answered 23/8, 2012 at 17:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.