0

Our developers use VS 2010 to build locally; however, our CI server uses MSBuild v4.0 scripts to build code in source.

I'm aware that VS uses MSBuild behind the scenes but what are the differences between the two, if any?

ShaneC
  • 2,237
  • 2
  • 32
  • 53

1 Answers1

1

There really aren't any differences. However, when you install VS 20xx, you get a bunch of dependencies and '.targets' installed for you.

When trying to mimic on a build machine, you may have to install some SDK's or even manually move over some .targets to get the build to work. Every blue moon, there is a .target issue that cannot be resolved on a non VS-installed build machine, which drives me nuts and makes me smirk at Microsoft.

Here are two examples from memory:

http://connect.microsoft.com/VisualStudio/feedback/details/549216/microsoft-data-schema-sqltasks-targets-file-missing-on-team-foundation-server

https://connect.microsoft.com/VisualStudio/feedback/details/580568/ability-to-build-database-projects-using-only-msbuild

Do a search in the folder:

C:\Program Files (x86)\

for

"*.targets"

and you'll get an idea of what I'm talking about (in regards to the vs installed items)

granadaCoder
  • 26,328
  • 10
  • 113
  • 146
  • We had this issue before when we needed to remove VS from build machines. What ensued was a painful process of building and watching the logs for what targets we were missing since the uninstall – ShaneC Aug 28 '13 at 14:14
  • Which is why I don't like to install VS on a build machine. I think its easier to "build up" missing items.......then the other way. But the "connect" issues above really irk me. – granadaCoder Aug 28 '13 at 14:16
  • 1
    I usually provide a script to enable developers to build locally using msbuild outside of visual studio. Its quicker and gets rid of a load of all those "Well it work on my machine" build issues. Yeah its like to db tools team was out to lunch when the rest of the gang decide to support cmdline msbuild – James Woolfenden Aug 28 '13 at 14:44
  • 1
    Also installer projects - vdproj and SSIS projects dont work with msbuild. Vdprojs require devenv and SSIS are sql. – James Woolfenden Aug 28 '13 at 14:53
  • @JamesWoolfenden. Agreed that they were out at lunch. – granadaCoder Aug 28 '13 at 19:55