Tag Archive: visual-studio

Building SSDT SSRS projects (.rptproj) with a build server (TeamCity)

Microsoft .NET

To build SSDT projects with a build server you can use devenv.com or devenv.exe, but not MSBuild.exe because it is not supported by the SSDT tools for Visual Studio 2015. Unfortunately that means installing a licensed copy of Visual Studio on your server. For me this was necessary anyway because we also have to build various Microsoft Office Add-ins and Visual Studio Setup Installer projects (.vdproj).

In TeamCity there are several build runners available, the two common ones for building Visual Studio projects being the Visual Studio (SLN) runner and MSBuild. I had assumed that the SLN runner actually called devenv.exe or devenv.com, but that is not the case. The SLN runner is just more simple and utilizes your existing solution file to produce an in-memory MSBuild file on the fly, while MSBuild is used for more advanced scenarios such as also using MSBuild Tasks as part of your build process. Thus, the SLN runner actually just calls MSBuild.

For building SSDT projects with a build server, you must actually use a command line build by invoking devenv.com. The devenv.com process is similar to devenv.exe, but is designed specifically for command line usage. You can do the same with both, but devenv.exe has the possibility to hang your builds because it may become interactive on the server, waiting for user input, so this is not recommended. Configuring the build step appropriately is really straight forward.


The path to denvenv.com will vary depending on your version of Visual Studio, but will be located in C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com. Just substitute your version in place of 14.0 and you’re set. You can also build your solution with various other parameters that are supported (run devenv.com /? from the command line), such as /Build and with different platforms /Build "Debug|x86".

MSBuild Support for SSDT

SQL Server Data Tools, or SSDT, has been the replacement for Business Intelligence Studio for some time now. The first major release of the tools usually comes shortly after the initial release of a new major version of Visual Studio, and it wasn’t until June this year that the tools made their debut for Visual Studio 2015. The release cycles are getting better as it appears in the next edition of Visual Studio they have already been working on the tools, hopefully for a release that is in sync with the main IDE debut. The tools we already have for Visual Studio 2015 do not currently support building the various SSDT projects via MSBuild, but it appears that they have introduced this functionality, albeit limited this far, in the Visual Studio “15” Preview 4 as a Nuget package. From a reply to a comment I posted, it appears it only supports building SQL Server Database projects (.sqlproj) at this time.

Microsoft releases Visual Studio 2012 Update 2 CTP 2

I missed the punch (original source), but on January 30th Microsoft announced the release for Visual Studio Update 2 CTP 2, which brings four key areas of improvement.

  • Agile Planning
  • Quality Enablement
  • Line of Business Development
  • Developer Experience

Agile Planning

Work Item tagging.
You can tag work items, similar to tagging a post on StackOverflow or WordPress, to further categorize and filter work items.

You can also send work items via email now with Team Web Access.

Quality Enablement

Test Hub in Team Web Access. 
For the web access there is now a `Test` tab where you can enable manual testing for systems that don’t have Test Professional. You can view and edit test cases in a test plan and run them manually.

Line of Business Development

Improved SharePoint load testing. Building on the SharePoint load testing ability from Update 1, Microsoft has taken customer feedback and added additional support for InfoPath, Excel services, Office Web Companions, workflows, and more.

Office 2013. Microsoft has also added support for tooling for Office and SharePoint 2013 including development, Coded UI Testing, load testing, and even Intellitrace.

Developer Experience

Blend for Visual Studio 2012. Blend has been added back for Visual Studio 2012 and includes support for WPF, Silverlight, and Sketchflow.

CodeMap and Debugger Integration. Easily add a call stack to a CodeMap to explore code dependencies from your debugging session.

Visual Studio Blue Theme. Because of vast feedback and complaints (I’m putting those words in there because it’s true, and shows that Microsoft does in fact listen). They have added the Visual Studio 2010 Theme, now called Blue theme which was originally part of the color theme editor, as a new default theme available in Visual Studio 2012.

Profiler events timeline. For Windows Store HTML/JS applications.

TF30172: Cannot create a TFS 2012 Team Project from Visual Studio 2010 Team Explorer.

If you have tried to create a new Team Project from Visual Studio 2010 against a TFS 2012 server, you have undoubtedly encountered this error message.

After doing some research, it’s quite apparent that some changes were made to Team Foundation Server that make project creation incompatible with older TFS Clients. The error message actually doesn’t have anything to do with permissions, and during the beta for TFS 11.0 the error message was inaccurate and vague. I came across a statement by Buck Hodges, the current Director of Development for Team Foundation Server:

You must use the Visual Studio Team Explorer 2012 (included in all Visual Studio editions or may be separately downloaded) to create a team project on a TFS 2012 server. If you use VS 2010, you will get an error about not having permission. The error message is very misleading, because it’s not a problem with your permissions.

A bug was even reported, but closed by Microsoft, so it appears there are no plans to resolve this. Unfortunately sometimes this is the cost of adding features and releasing new versions, and you can still use Visual Studio 2010 SP1 against TFS 2012, just don’t expect to be able to create projects. Something to consider when thinking about migrating to TFS 2012.

Visual Studio 2012 RC is now available, and color changes in RTM.

Otherwise known as Visual Studio 11 during the beta period, you can now download the release candidate from Microsoft. The primary complaint during the beta was that the new light and dark themes had no color, they were purely monochrome style themes. Microsoft did listen, and they did add some color to the interface.

Visual Studio 11 Release Candidate

Visual Studio 11 Release Candidate

You can also see that they did change the all-caps titles on the tool windows, however they did seem to just move the all-caps to the main application menu, which most people still disagree with. Overall though its still the same great development environment, so download it and give a good run through.

It also appears that some of the changes didn’t make it into RC, specifically for the dark theme.

Visual Studio 11 RTM Dark Theme

Visual Studio 11 RTM Dark Theme

Visual Studio 11 RC User Interface Updates, Developer Experience, and Color changes.

The Visual Studio team has posted some updates on the Visual Studio blog regarding the feedback we have all been providing them about the beta.

Personally, I don’t mind the new Visual Studio themes (the light and dark themes), but the thing I don’t like is that Microsoft has seemed to forget that UX guidelines exist (including their own UX guidelines). The community of developers provided their feedback how they disliked the all-caps docking window titles, and Microsoft did listen and fix it, but it seems like that didn’t matter because they went and changed the main menu’s to all-caps instead. Instead of really fixing the problem, they really just moved it to a different part of the UI. I really hope this changes in the RC, and I really hope it gets fixed before RTM.

Visual Studio 11 Beta

Visual Studio 11 Beta

Visual Studio 11 Release Candidate

Visual Studio 11 Release Candidate

The two images above are a comparison between the two interfaces from beta to release candidate, and there isn’t that much change. Color was added, but it is minimal. For anyone who has done graphics in Photoshop, looking at the images you know that the amount of work that went into the color changes was almost none. We’ll have to wait and see what will become of Visual Studio 11 by RTM based on the communities feedback.

In my own opinion, it really seems like Microsoft is promoting the idea of Metro into all their products. And again in my opinion, I really dislike the Metro ideology. From a developer standpoint, it seems like going back to Windows 3.1 with interfaces dumbed down and restricted for non-power users, and from a customer standpoint its threatening the desktop business environment. It seems that the industry might be headed in the wrong direction with UX patterns. The stuff going on under the hood and all the plumbing written by developers is still some of the most amazing work we’ve seen in the industry to date, but the way all that hard work is being portrayed as display is worrisome.

There are lots of mixed feelings and opinions from developers about Windows 8, Metro, Visual Studio 11, and even the new Microsoft Office in the works, but I hope that the majority developer feedback takes precedence and that Microsoft listens to its oldest, most valuable customers: software developers.

How to fix Visual Studio Import and Export Settings Dialog when it disappears or crashes when trying to import or export settings.

Microsoft .NET

I am definitely posting about this, because it annoyed the living crud out of me. If you are like me, you often have heavily modified your Visual Studio settings to your likings. This includes environment settings, user settings, and the works.

The Problem
When you go to ‘Tools > Options > Import and Export Settings…’ and you select either Export or Import and click next, the Import and Export Settings Dialog crashes (disappears)!

This is caused because at some point you imported settings from a non-standard location (eg. MyDocuments\Visual Studio 2010\Settings). What happens is Visual Studio makes some key registry changes that tell devenv.exe how to handle settings going forward. Because of this, it messes with how default settings are handled. The solution is to undo all this to factory settings, which is easily enough done with some registry hacks.

How to resolve this problem

Disclaimer: If you are not comfortable making changes to the Registry, you should try to repair Visual Studio using the Visual Studio Setup. I take no responsibility for problems caused by you editing your Registry, and this is not guarunteed to work for all cases.

Step 1.
1. Navigate to HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\10.0\Profile
2. Change the value of AutoSaveFile (REG_SZ) to %vsspv_visualstudio_dir%\Settings\CurrentSettings.vssettings

Step 2.
1. Navigate to HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\10.0\Profile\BrowseFiles.
2. Delete all registry values under the above registry key.
3. Create a new REG_DWORD value and set its name to %vsspv_visualstudio_dir%\Settings\CurrentSettings.vssettings.
4. Set the value of the REG_DWORD value you just created to 0x00000001 (1).

Step 3.
1. Navigate to HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\10.0\ImportExportSettings\BrowsePaths.
2. Delete all registry values under the above registry key.
3. Create a new REG_DWORD value and set its name to C:\Users\{USER}\Documents\Visual Studio 2010\Settings where {USER} is your Windows User Account name.
4. Set the value of the REG_DWORD value you just created to 0x00000001 (Hex), or 1 (Decimal).

Step 4.
1. Navigate back to HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\10.0\Profile
2. Make sure that registry value named DefaultSettingsDirectory has a value of %vsspv_visualstudio_dir%\Settings\

Step 5.
1. Run cmd.exe (does not have to be as administrator
2. Navigate to devenv.exe (eg. cd c:\program files (x86)\microsoft visual studio 10.0\common7\ide)
3. Run the command devenv.exe /ResetSettings

You should now be able to utilize the Import and Export Settings dialog.