Logo

Maarten Balliauw {blog}

ASP.NET, ASP.NET MVC, Windows Azure, PHP, ...

About the author

Maarten Balliauw is currently employed as .NET Technical Consultant at RealDolmen. His interests are mainly web applications developed in ASP.NET (C#) or PHP and the Windows Azure cloud platform.
More about me More about me
Send mail E-mail me


ASP.NET MVC Quickly Subscribe to my RSS feed Follow me on Twitter! View Maarten Balliauw's profile on LinkedIn
View Maarten Balliauw's MVP profile

Search

Latest Twitter

    Follow me on Twitter...

    Archive

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

    © Copyright Maarten Balliauw 2012


    TFS Team Build and ASP.NET websites

    Here's one I'd really like to share with everyone trying to build ASP.NET websites using TFS Build. First of all, a little story about the project setup...

    A VS2005 solution was created a few weeks ago. This solution included some projects, namely ASP.NET website, Domain Layer class library, Business Layer class library and DAL class library. The ASP.NET website uses project references to the class libraries, enabling automatic updates of all references on build. So far, so good. As a test case, this project was added to a new TFS project, and created a build for. That specific build kept failing forever, ignoring all tips I found on various websites.

    20070816buildok Two dozen cups of coffee later, an amazing thing happened: my build completed successfully! Colleagues were giving me strange looks when I jumped around the office, yelling around this great news, but hey: it is great news after all!

    Here's how I did this: first of all, check out your Solution File (.sln), and open it up with any editor that pleases you (notepad.exe will do). Locate the line containing Release.AspNetCompiler.PhysicalPath. By default, it is set to the web project's name. Change this to ".\WebProjectName\":

    Release.AspNetCompiler.PhysicalPath = ".\MyProject.Web\"
    ==>
    Release.AspNetCompiler.PhysicalPath = ".\MyProject.Web\"

    20070816solutionexplorer Save the file, and check it in. Second step: make sure the MyProject.Web\Bin folder under source control is EMPTY. The screenshot you see on the right illustrates a non-empty Bin folder. Fire up your Source Control Explorer, navigate to the web project's Bin folder, select all files in there, press the delete key, and check in pending changes.

    Third step: BUILD! If magic happens for you, join my club. If it doesn't, try one of the things mentioned earlier in this blog post (in the story-part). There are people who get things working in one of those 4 ways, so it might be your success story too...


    Categories: General | C# | ASP.NET
    Comments are closed