Compartilhar via


Are you new to MSBuild? Check out our Hands-On-Lab

This MSBuild Hands-On-Lab introduces you to the fundamentals of MSBuild.  It talks about the basics such as how to hand-author a simple MSBuild project file, and then builds on that to show you how to take it all the way to more advanced aspects such as incremental builds and target level dependency analysys (TLDA), authoring custom tasks, Visual Studio and how it relates to MSBuild, how Visual Studio integrates MSBuild, and all that good stuff.  Check it out!

[Author: Faisal Mohamood]

Comments

  • Anonymous
    October 11, 2005
    Thanks for that.

    However there are some errors in the doc. On page XV.

    1. Augment the Csc task so that it takes not only sources but also .resources files. Add the following attribute to your Csc task:
    Resources="@(GeneratedResourceFiles)"

    2. Edit your "Build" target to account of the new inputs. Your target input tag should now also address the new GeneratedResources input. Change the Inputs attribute in your build target to look like this:
    Inputs="@(Compile);@(GeneratedResourceFiles)"

    "@(GeneratedResourceFiles)" should be "@(Content)"

  • Anonymous
    October 11, 2005
    Chris,

    The example seems to be correct. I went in to make the change you suggested, and noticed that it works as expected. The GenerateResource task takes the set of @(Content) items and produces the output in item named @(GeneratedResourceFiles). These items are then passed into the Csc task as the set of .resources. @(GeneratedResourceFiles) contains the set of resources expected by the compiler.

    Does this make sense?

    Faisal Mohamood
  • Anonymous
    October 19, 2005
    Hi,

    In the lab7 , Learn about MSBuild / Visual Studio integration , when i try to debug the application as per the lab, it displayed the following error:

    "VISUAL Studio cannot start debugging because the debug target 'C:SubuMSBuildBinMsBuildSample.exe is missing . Please build the project and retry or set the outputpath and assemblyname properties to point to the correct location for the target assembly."

    Please help me to resolve this error.

    Thanks for the good hands on lab.

    Subu
  • Anonymous
    October 27, 2005
    Hi Subramaniyan,

    Yes you are correct in that you will not be able to debug this application in Step 7. This is because the project that you are trying to debug is hand-authored, and until step 8, we haven't quite done everything that Visual Studio will need to fully interact and do interesting things like "Debug" for the hand authored project.

    You should be able to build fine however. Have you been able to debug the application after you completed Step 8?

    Thanks.
    Faisal Mohamood
    MSBuild Team
  • Anonymous
    October 28, 2005
    Great hands-on-lab.

    You could add a short exercice about the creation of custom build action that you present in this other post : http://blogs.msdn.com/msbuild/archive/2005/10/06/477064.aspx.
  • Anonymous
    January 02, 2006
    Thank you for making this available. I have included it in a list of useful MSBuild resources that I have compiled in doing research on creating automated builds for my own projects:

    http://tod1d.net/2005/12/msbuild-turorials-and-resources.html

    I will definitely be keeping an eye on this blog as I continue to work with MSBuild.

    Good job.
  • Anonymous
    May 14, 2009
    Wanted to try out the Hands On Lab but I get a 404 - File or directory not found. Can someone please make it available again?