You can use the aspnet_compiler tool from SDK command prompt.
For use this, point Start->Programs->Microsoft .NET Framework SDK 2.0-> SDK Command Prompt
And call the aspnet_compiler command.
There is a sample usage:
aspnet_compiler -p C:\SourcePath -v / C:\TargetPath -fixednames
There is all options available, but require a bit study.