Disclaimer: Please note that solution presented here is not supported by Microsoft.
UPDATE 23.02.3013: I got information from Microsoft .NET team that .NET framework SDK tools can be installed on Windows Server 2008 so all of this hacking might no be needed at all. Refer to topic titled ".NET Framework 4.5 SDK Tools on Windows Vista and Windows Server 2008" @ msdn.microsoft.com/.../hh852363#rn
At work we are upgrading our product to build on .Net 4.5 and there’s many preparation steps to it. Technically it is easy, just install the update package, however for us with product running as a service in different customer hosting environments and us needing to support several versions of our product in live environments, it is not so easy. All hosting servers must have .net 4.5 installed before any .net 4.5 requiring release can be made, we need to also upgrade all of our development and test and stage environments to make sure the deployment package is built correctly. This is nothing that happens quickly.
Today I will focus on the development environment, where we have long since switched to VS 2012, however are suffering with the migration of TFS 2010 to TFS 2012. I say migration, because our Team Project is using Scrum for Team System v3 template and as many know, the template is long dead. We could upgrade TFS easily, however we need to get rid off the dead process template and move on to something that is being consistently maintained such as Microsoft Scrum v2 process template. This will be a topic for another post, since this is currently in progress and I will share my findings once its done.
The problem at hand
So, stuck with TFS 2010 we still planned and progressed with .NET 4.5 upgrade. Our TFS is running on Windows Server 2008 Standard Edition 32bit. There was no prior reason to upgrade. So we did all the project file changes and everything worked nicely locally, however once you checked in the changes – the build fails. Of course we had already taken care of the obvious such as installing .NET 4.5 on TFS servers. This was not enough.
After some digging I found that .NET 4.5 SDK is needed or Visual Studio 2012. Makes sense, however it was not obvious to check that .NET 4.5 SDK or VS 2012 are at all installable on Windows Server 2008. They are NOT. Surprise!
Keep in mind that we have a working TFS with Build machine and the build machine has .NET 4.0 SDK and Visual Studio Team Explorer and its running on Windows Server 2008 32bit. This machine successfully builds our .net 4.0 based application, runs unit tests, prepares deployment package etc.
So, now we need to somehow figure our a way to get .NET 4.5 application to build. The good thing in this case is that .NET 4.5 is an in-place upgrade of .NET 4.0 (in some cases the in-place upgrade can be a disadvantage, however here it helped), so compilation actually would work, however the projects were referring to new Web Application MSBuild files and the .net 4.5 SDK is also missing so the “SdkToolsPath” is empty.
The imported project "C:\Program Files\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Copy the “C:\Program Files\MSBuild\Microsoft\VisualStudio\v11.0” from your development machine where you have VS 2012 to the TFS Build machine.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets (2742): Task could not find "sgen.exe" using the SdkToolsPath "" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx40Tools-x86". Make sure the SdkToolsPath is set and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed
Step 1. Copy everything from “C:\Program Files\Microsoft SDKs\Windows\v8.0A” to the TFS build machine matching location.
Step 2. Export the registry key at “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\” from your development machine. BEFORE RUNNING make sure the paths in the .reg file are correct. e.g. my development machine is 64bit, but the TFS build server is 32bit. Also you should only need to keep the Windows key level settings and v8.0A, you don’t need the registry keys for v7.0A or others.
Run the registry file in TFS build server and this will add the missing keys for .NET 4.5 SDK.
After this everything worked again as before!
Last week on Friday the 13th of April (for superstitious it might be a bad day, but for us it was good ;) ), we (VS ALM Rangers team working on this guidance) released Branching and Merging Guidance Beta for Team Foundation Server 11. It has been long in the working and it is finally out! You can read Willy’s announcement here. So what's new in the vNext of Branching and Merging Guidance (Beta)? The previous version of the guidance was split in several chunks such as main document, scenarios document, Q&A document, Hands-on-labs, etc. In this version of the guidance we have merged main document and scenarios document together to make the guidance easier to follow. We will continue to merge some of the other documents into the main document. The main document also has new content such as Managing shared resources in TFS Baseless merging guidance Local Workspaces in Team Foundation Server 11 Merge Improvements in Team Foundation Server 11 Additional to basic, standard and advances branch plan we have Branch by Feature branch plan Code promotion branch plan New Hands-on-Labs We have aimed to improve the current branch plans to better explain why and where certain branching strategies are valuable to be used. There is more to come in RC version. We are eagerly waiting for feedback and input from community to improve the content further and make it more valuable to everyone. So please, download the guidance, have a bedside read and don’t hesitate to provide feedback on the new version on this blog post using comments, direct contact to me, on the codeplex project discussion board or submit a suggestion on UserVoice, using the Rangers Project category tag. . Some more links on VS ALM Rangers: Rangers projects and solutions Visual Studio ALM Rangers Index Thanks!
Last Friday the new release of Team Foundation Server Power Tools became available and it is called the August 2011 release. In this release there’s lots of new features and fixes and I would like to make a small stop (already there’s plenty of details out there, so I will not repeat it) on two of them. First, with this release, you can do full-text searching over you work items. There is similar functionality in a codeplex project called Search Work Items, however this is a functionality that was requested on the Visual Studio User voice forum and it is something that has been implemented for the vNext of Visual Studio and TFS. TFS Power Tools make it possible for the product group to bring the functionality to customers earlier. The second is that you can now rollback changeset’s from Source Control Explorer UI – either by right clicking on a specific changeset or on a folder/branch. If you click on a folder or branch, then you will be able to rollback one changeset or a range. The functionality to rollback changeset’s was implemented in TFS 2010, however previously it was only available through command line (http://msdn.microsoft.com/en-us/library/dd380776.aspx). NB! If you have never tried to rollback anything in TFS, then when you rollback – the changes will be done on your local disk and you will need to check-in the rollback changes as a changeset to the TFS. The model is similar to merging, but e.g. allows you to rollback a rollback ;) Anyhow, more information incl. pictures can be found following links. Brian Harry introduces the latest TFS Power Tools Ed Blankenship - small intro to some features (Note! builddefinition and workitemsearch.mht) And you can download the new TFS Power Tools from the following link. Download latest TFS Power Tools
Microsoft has many channels (such as connect, MSDN forums, newsgroups, etc.) to gather feedback from users, customers, partners, MVP’s. This month a new channel called uservoice has been added to the list. Through uservoice new ideas can be proposed and those ideas can be commented/voted by other people. If some ideas have enough votes (they are important), then it is possible that Microsoft will listen to the people and the vNext of Visual Studio and/or Team Foundation Server will contain that feature or change. This uservoice channel is for Visual Studio, Team Foundation Server and the whole Application Lifecycle Management (ALM). So make sure you give all your ideas. Each user has 10 votes and thus can vote for 10 ideas. Make sure you vote for the ones that are most relevant and important for you, to make sure it will be in the vNext You can vote here: http://visualstudio.uservoice.com/