views:

434

answers:

1

Currenlty I am trying to publish usinf aspnet compiler using a batch file

start /b C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -p "C:\cc\titr\code\" TargetPath="C:\cc\titr\code\deploy\" Force="true" Debug="true"

Giving me error 1010 file path not valid. Any idea where I am doing wrong. as the paths are correct

A: 

Take a look at Rick Strahl's utility to manage the precompilation process here: http://www.west-wind.com/tools/aspnetcompiler.asp. I have to say that getting the command line arguments just right to make the aspnet_compiler happy is not easy. It is very important that you have all your slashes and spaces in just the right place! Using the "West Wind ASP.NET 2.0 Compiler Utility" will certainly make this task a breeze for you!

Also take a look at my article series on how to build a StackOverflow inspired Knowledge Exchange. In that series I detail local build processes and continuous integration. The CI article directly touches on this subject too (coming soon!). http://dotnetslackers.com/projects/StackOverflowInspiredKnowledgeExchange/

In your case you might try :

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -p "C:\cc\titr\code" -v / "C:\cc\titr\code\deploy"

You had trailing slashes which the compiler specifically doesn't like. I also swapped out your TargetPath for the -v argument. I don't think TargetPath is an argument.

Andrew Siemer

related questions