Team Build 2010 doesn't publish Websites if configuration is other than Debug or Release!
I'm using Team Foundation 2010 Team Build for automatic deployment of websites and projects. But I can't get it to work the right way 开发者_如何学运维with websites...
What happens is if I use Debug/Release configuration, the website is published after compiling. All Ok.
But I've created another configuration (in configuration manager) to suit my needs, and I'm sure I checked my website to build in this configuration.
When I queue a new build on the server, it compiles everything but gives me an error:
Could not find a part of the path '\server-name\Deploy\build-name\build-number_PublishedWebsites\website-name\'.
Anyone have a clue what's going on ? Why doesn't it publish ?
Well, I got it "right". I'm posting here in case anyone wants to know. However, if anyone knows a better way, please let me know
I found a workaround which consists in manually editing the .sln file and adding AspNetCompiler properties to the other configurations.
Under ProjectSection(WebsiteProperties),
    Release.AspNetCompiler.VirtualPath = "/site"
    Release.AspNetCompiler.PhysicalPath = "site\"
    Release.AspNetCompiler.TargetPath = "PrecompiledWeb\site\"
    Release.AspNetCompiler.Updateable = "false"
    Release.AspNetCompiler.ForceOverwrite = "true"
    Release.AspNetCompiler.FixedNames = "true"
    Release.AspNetCompiler.Debug = "False"
I added these stuff below:
    MyConfiguration.AspNetCompiler.VirtualPath = "/site"
    MyConfiguration.AspNetCompiler.PhysicalPath = "site\"
    MyConfiguration.AspNetCompiler.TargetPath = "PrecompiledWeb\site\"
    MyConfiguration.AspNetCompiler.Updateable = "false"
    MyConfiguration.AspNetCompiler.ForceOverwrite = "true"
    MyConfiguration.AspNetCompiler.FixedNames = "true"
    MyConfiguration.AspNetCompiler.Debug = "False"      
And it worked like a charm. But don't leave any empty lines before or after because the build fails if you do so.
 加载中,请稍侯......
      
精彩评论