Skip to content

Instantly share code, notes, and snippets.

@lijunle
Last active August 10, 2021 18:29
Show Gist options
  • Save lijunle/7cc5c3e5743d3a494b83 to your computer and use it in GitHub Desktop.
Save lijunle/7cc5c3e5743d3a494b83 to your computer and use it in GitHub Desktop.
TFS Build Web Application Without Visual Studio

Steps

  1. Copy C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\{Web,WebApplications} folders to build server
  2. Update NuGet to newest version by running C:\Program Files\Microsoft Team Foundation Server 12.0\Tools\nuget.exe update -self
  3. Install .Net Framework 3.5 Runtime from server manager
  4. Install .Net Framework 4.5 Targeting Pack via install from Windows 8 SDK
    • Note 1: DONOT install Windows 8.1 version, which includes .Net Framework 4.5.1 SDK
    • Note 2: You can only download and install .Net Framework 4.5 SDK
    • Note 3: After install .Net Framework SDK, you can uninstall Windows SDK from control panel
    • Note 4: If you need more .Net Framework SDKs, install them from here
  5. Install test agent from here
    • Note 1: This is for unit testing in build via Visual Studio Test Runner.
    • Note 2: The download ISO contains test agent and test controller. Only install test agent is enough.
  6. Install Web Deploy 3.5
    • Note 1: This is used for packaging applications
    • Note 2: And for coutinous deployment to Azure Web Application
  7. Do restart the build server!

Other notes

  1. Team Foundation Server 2013 Update 4 is used in my build server.
  2. I do Windows update on build server. It will install ASP.NET MVC 4 Runtime, which I have not tested to uninstall it.
  3. In my examination, Build Tool 2013 is not necessary.
  4. I only copied the necessary Reference Assemblies into C:\Program Files (x86)\Reference Assemblies as described in step 1.
  5. My Public Assemblies folder inside C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PublicAssemblies is installed by installing test agent for VS2013 in step 5.
  6. Code coverage never come, because only Visual Studio Premium or Ultimate enable this feature. (If you have workaround to get code coverage, please tell me.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment