Search code examples
visual-studiovisual-studio-2015tfstfs-2015sln-file

Is it possible to start Visual Studio and open a .sln file from a browser?


I'm building a website where students can complete exercises. When a students starts an exercise I add a solution to the students TFS repository. I want to open this solution in Visual Studio from the browser. If it works students will only need to click once to start an exercise.

It is possible to open Visual Studio from the TFS dashboard:

href="vsweb://vs/?Product=Visual_Studio&EncFormat=UTF8&tfslink=<base64encodedstring>"

The decoded base64encodedstring looks like this:

vstfs:///Framework/TeamProject/<GUID>?url=<url to teamproject>

Googling the vstfs protocol doesn't give me much extra info. The best resource I found was: https://msdn.microsoft.com/en-us/library/bb130164.aspx?f=255&MSPPError=-2147217396

This page only explains some general concepts:

vstfs:///<tooltype>/<artifacttype>/<tool-specific id>

The different possibilities for tooltype are not explained.

What would be the correct vstfs command to not only open Visual Studio but open a solution as well?

I'm using TFS 2015 (on prem) and Visual Studio 2015.


Solution

  • To start Visual Studio and open a .sln file from a TFS 2015 web page, this could be achieved by following the steps below:

    1. If you are using TFVC version control type, please let your students map down the solution in Visual Studio first. If you use Git version control, please let your student to clone the git repository to their machine first.
    2. In TFS web page, find the .sln file and click it. Then click the VS button show in the picture below.

    enter image description here