Opening Work items in Visual Studio 2017

If you have used Visual Studio 2017 to connect to a Team Services instance, or you follow the Microsoft ALM blog you will have noticed that with Visual Studio 2017: Work items now open in the web from Visual Studio ’15’!

While the official post shows why that change was made and what advantages the web form brings, I wanted to quickly point out some small things that were done to make this behavior more usable.

You can follow along by downloading Visual Studio 2017 and connecting to your Team Services or Team Foundation Server 2017 instance.

Running Queries from Visual Studio

There is still the full work item query tree available in Visual Studio, including favorites:


You can also still create and run new or existing queries and look at the results:


If you look at the screenshot above, you can see that I have run the “My Bugs” query and that I have selected the second work item from the result, with id 62. When I open this work item now, it will launch in my browser and display the now familiar modern work item form:

Opened Work Item

And if you look closely, you can see that in the upper right hand corner of the work item form it displays “2 of 4” and some buttons:


When you open a work item from a query result in Visual Studio, we don’t want you lose the query context you were in. So, when opening the work item we pass some context information along, in this case this included the name of the query that you ran and the position of the work item inside of that query result. Then, in the web we can restore this context, show you the work item, and also give you the option to easily switch to the next/previous work item in the “My Bugs” query:


You can also just return to the full query result in the web:


Preserving the context this way works with all queries in Visual Studio, even new and unsaved ones.

New, unsaved query in Visual Studio
New, unsaved query in Visual Studio
Work item opened from query result in web
Work item opened from query result in web
Web query editor
Web query editor

Linking Work Items to Code Changes

With the Development section on the new work item form we have made it really easy to view code changes that contributed to work item, be it he implementation of a feature or a bugfix:


To associate your code changes with your work items you can create a link after the fact from the work item form, or in Visual Studio when you commit or check in your code. For both Git and TFVC you can still run work item queries from the Changes or Pending Changes view and even drag and drop work items from the query result to the Related Work Items section. Adding a work item to a git commit:

Adding a related work item to a git commit
Adding a related work item to a git commit

VS2013 Update 2 RC – Error APPX3210

If you stumble across the following error message with Visual Studio 2013 Update 2 RC:

1>[…]\Package.appxmanifest(19,64): error APPX3210: App manifest references the image ‘Assets/Icon150.png’ which does not have a candidate in main app package.

have a look a at the manifest file. In my case I had been using forward slashes in some of the asset paths. While this used to work before update 2 it now leads to an error. So to fix this I had to replace this:

<m2:DefaultTile Square310x310Logo="Assets\Icon310.png" 

with this:

<m2:DefaultTile Square310x310Logo="Assets\Icon310.png" 

and the error went away.

VS2013 build fails without errors

I just had a case where my Visual Studio 2013 solution failed to build even though no errors were displayed in the output pane or the log. The same happened for all the other targets (Clean Solution etc.). Building from the command line using msbuild directly, on the other hand, worked fine. The solution (as in previous VS versions) was to delete the user-specific settings. So a quick:

del /s /q *.user

fixed the problem for me.