# Thursday, June 10, 2021

GCast 110:

Renaming Projects and Folders in a Visual Studio Solution

Renaming projects, files, classes, and namespaces is a risky thing that affects anything that references or depends on those objects. The refactoring tools in Visual Studio can help, but only so far.

In this video, I will walk through renaming projects and folders in one of my Visual Studio solutions.

Thursday, June 10, 2021 9:51:00 AM (GMT Daylight Time, UTC+01:00)
# Monday, January 25, 2021

Episode 644

Dustin Campbell on Support for WinForms to the Visual Studio Designer

Dustin Campbell recently updated the tooling in Visual Studio to support WinForms and other legacy applications. He describes the challenges in doing so and how he and his team attacked them.

Monday, January 25, 2021 9:07:00 AM (GMT Standard Time, UTC+00:00)
# Monday, June 1, 2020

Episode 611

Nik Molnar on Visual Studio Codespaces

Visual Studio Codespaces (formerly Visual Studio Online) is a cloud-based development environment that you can connect to from Visual Studio Code, within a browser, and from Visual Studio (in private preview). PM Nik Molnar describes the capabilities and how it works.




Monday, June 1, 2020 9:01:00 AM (GMT Daylight Time, UTC+01:00)
# Thursday, January 30, 2020

GCast 71:

Integrating Visual Studio Solution with Azure DevOps Repo

Learn how to configure your Visual Studio 2019 solution to integrate with an Azure DevOps repository.

ALM | Azure | DevOps | GCast | Screencast | Video | Visual Studio
Thursday, January 30, 2020 9:27:00 AM (GMT Standard Time, UTC+00:00)
# Monday, May 6, 2019

Episode 562

Mike Benkovich on Visual Studio 2019

Microsoft MVP Mike Benkovich discusses the important new features in Visual Studio 2019

Monday, May 6, 2019 9:07:00 AM (GMT Daylight Time, UTC+01:00)
# Monday, October 8, 2018
Monday, October 8, 2018 9:59:00 AM (GMT Daylight Time, UTC+01:00)
# Friday, August 17, 2018

By default, when I create and launch a UWP app in Visual Studio, a debugging toolbar displays, as shown in Fig. 1.

Fig 1-DebuggingToolbar
Fig. 1

This can be useful during development, but it also can get in the way. It hides elements on my form and it does not look good during a demo.

Suppressing this toolbar is simple, but it took me some time to find it.

From the Visual Studio menu, select Tools | Options, as shown in Fig. 2.

Fig 2-ToolsOptions
Fig. 2

The Options dialog displays. Expand the "Debugging" section on the left and select "General", as shown in Fig. 3

Fig 3-DebugGeneralOptions
Fig. 3

Within the Debugging / General section, clear the checkbox next to "Show runtime tools in application"

Click the [OK] button to apply these changes. The toolbar will not display when you run your project from Visual Studio.

To re-enable this toolbar, open the Options dialog and check the checkbox and click [OK].

Friday, August 17, 2018 9:44:00 AM (GMT Daylight Time, UTC+01:00)
# Wednesday, June 27, 2018

A T4 ("Text Template Transformation Toolkit") template is a text generation tool that mixes raw text and code to generate text as output.

In my last article, I showed how to create a Runtime Text Template and generate output from it via the following lines of C# code:

var tt = new myT4Template();
string outputText = tt.TransformText();

But sometimes, it is helpful to pass parameters from your C# code and use them in your template.

The steps to do this are:

Add a T4 Runtime Text Template to your Visual Studio project  In the T4 template:

    1. Add one or more parameter directives  
    2. Use the parameters in your template

In your C# code

  1. Instantiate your T4 template object
  2. Set the Session property to a new Dictionary
  3. Pass the parameters in the Session object
  4. Initialize the T4 template object
  5. Generate the output text with the T4 template object's TransformText() method.

An example will help illustrate this.

I have a T4 Runtime Text Template named "ParamTemplate1.tt" and I want to add 2 parameters: firstName and lastName (both strings) and use them in my template.

At the top of the template file, add the following directive:

<#@ parameter name="firstName" type="System.String" #>
<#@ parameter name="lastName" type="System.String" #>

Notice that we included the Namespace in the parameters' data types.

Now, use the parameters in your template, as in the following code:

Hello <#=firstName #> <#=lastName #>!

In your C# program, add the following code

var pt1 = new ParamTemplate1();
pt1.Session = new Dictionary<string, object>();
pt1.Session["firstName"] = "David";
pt1.Session["lastName"] = "Giard";
var outputText1 = pt1.TransformText();

This passes the values "David" and "Giard" to the firstName and lastName parameters, respectively.

We can even pass in a custom data type, based on a type we create.

Imagine I have created a Person class with a FirstName and a LastName properties (both strings) and I want to pass a parameter of this type into my T4 template named "ParamTemplate2.tt" and use that parameter inside the template.

Here is an example of my custom Person class:

namespace DemoT4Parameters
    public class Person
        public string FirstName { get; set; }
        public string LastName { get; set; }

In my T4 template, I again add a parameter directive, as shown below:

<#@ parameter name="person" type="DemoT4Parameters.Person" #>

Notice the custom namespace in the Type.

Now, I can use the parameter and its properties in my template, as shown below:

Hello <#=person.FirstName #> <#=person.LastName #>!

My C# code is very similar to the first example.

var pt2 = new ParamTemplate2();
pt2.Session = new Dictionary<string, object>();
var person = new Person()
	FirstName = "Satya",
	LastName = "Nadella"
pt2.Session["person"] = person;
var outputText2 = pt2.TransformText();

You can find this code in my GitHub repository at https://github.com/DavidGiard/Demo-T4-Parameters.

In this article, I showed how to pass parameters into a T4 Runtime Text Template.

Wednesday, June 27, 2018 8:44:00 AM (GMT Daylight Time, UTC+01:00)
# Tuesday, June 26, 2018

A Text Template Transformation Toolkit (or "T4") template is a text generation tool that mixes raw text and code to generate text as output.

Visual Studio contains tools to assist with the creation and execution of T4 templates.

To add a T4 template to your project, right-click on the project, and select Add | New Item from the context menu.

In the "Add New Item" dialog, the T4 templates are listed under the General category; but you can find them quickly by typing "T4" in the "Search Installed Templates" textbox.

There are two kinds of T4 templates: a Text Template and a Runtime Text Template. Each of these starts with a file with ".tt" extension, but is designed to generate at least one other file.

The Text Template regenerates the final output file every time you save the ".tt" file. This is a quick way to generate simple files, but it lacks flexibility.

The Runtime Text Template generates a VB or C# class that you can call from your code to generate the output file. We will focus on the Runtime Text Template in this article.

A Runtime Text Template consists of raw text (which will be exactly duplicated in the output file) and executable code, which the template will run. Any output of that code will be included in the output file. Code is delimited from the raw text by placing it between the <# and #> symbols. If you just want to output the results of an expression, you can surround that expression with the <#= and #> symbols.

For example, to output the current date and time, include the following line in your template.

<#=System.DateTime.Now #>

You can combine this with text as in the following example:

(This file was generated at <#=System.DateTime.Now #>!)

which would output something like the following:

(This file was generated at 06/25/2018 20:33:14!)

You can include more complex code between the <# and #> symbols, as in the following example:

for (System.Int32 I = 0; I < 5; I++)
	// WriteLine is a utility function that outputs text. 

The result of the above code is:


When you save a Runtime Text Template, Visual Studio generates code for a public .NET class with the same name as your tt file. You can instantiate this class as you would any other public class and call the TransformText() method to generate the output as a string.

For example, if I created a Runtime Text Template named "myT4Template.tt", the following code would generate the output and save it to a variable named "outputText".

var tt = new myT4Template();
string outputText = tt.TransformText();

T4 templates give you the flexibility to generate text and text files quickly and the flexibility to change the template without worrying about the associated data.

Tuesday, June 26, 2018 8:50:00 AM (GMT Daylight Time, UTC+01:00)
# Friday, October 6, 2017

The following articles walk the user through creating an ASP.NET application; storing source control history in a Visual Studio Team Services project Git repository; and automatically deploying to an Azure web app whenever code changes are pushed to the repository.

Creating a Team Project in Azure

Creating an ASP.NET Web Project and Storing code in a VSTS Git Repository

Configuring Automatic Deployment from VSTS to an Azure Web App

ALM | Visual Studio | VSTS | Web
Friday, October 6, 2017 10:23:00 AM (GMT Daylight Time, UTC+01:00)
# Thursday, October 5, 2017

This is Part 3 in a series of articles about integrating VSTS, Azure Web Apps, ASP.NET applications, and Visual Studio.

In previous articles, I showed you how to create a VSTS Team Account and Team Project linked to Azure  and how to create an ASP.NET Web application and link this to your VSTS team project in order to store the project code in the Team Version Control Repository.

In this article, I will show you how to automatically deploy code from your VSTS Team Project repository to an Azure Web App every time you push code changes to that repository.

This configuration is done in the Azure portal.

Log into your Azure account and navigate to the portal by clicking the PORTAL link at the top right, as shown in Fig. 1.

Fig. 1

From the Azure portal, select

New | Web + Mobile | Web App

as shown in Fig. 2.

Fig. 2

The Create Web App blade displays, as shown in Fig. 3.

Fig. 3

At the App Name field, enter a name for your app. This must be unique among Azure App Services. Although you can assign a custom domain to this later, the default URL will be


where xxxx is the name you assigned to this Web App.

If you navigate to this URL (or click the hyperlink in the Overview tab), you will see a default Azure We App page.

At the Resource Group field, select "Create New" and enter a name for your resource group.

At the "OS" field, select the operating system on which you want to deploy your Web App.

Click the [Create] button to create your Web App. This usually takes less than a minute. A message displays when the App is created with a [Go to Resource] button to quickly open your Web App. (Note: You can also find your Web App by selecting "All Resources" in the left sidebar.)

The Web App Management blade displays, as shown in Fig. 4.

Fig. 4

Select "Deployment Option" on the left menu of this blade to display the Deployment Option blade, as shown in Fig. 5.

Fig. 5

Click "Choose Source" to display a list of Source repository types, as shown in Fig. 6.

Fig. 6

Select "Visual Studio Team Services".

You will return to the "Deployment Option" blade, but options specific to VSTS will now display, as shown in Fig. 7.

Fig. 7

Select your VSTS Account and Project from the dropdown. (Note: Your account and project will only appear if you have linked your VSTS project to Azure, as described here.)

Click the [OK] button to configure this automation.

It should take less than a minute to complete.

Any code currently in the project's repository will be deployed to Azure. You can see this by once again navigating to the Web App's URL (http://xxxx.azurewebsites.net).

Future code code pushed to the Team repository will also be deployed automatically to Azure.

In this article, you learned how to set up automatic deployment to an Azure Web App each time code is pushed to a VSTS project code repository.

ALM | Visual Studio | VSTS | Web
Thursday, October 5, 2017 10:48:00 AM (GMT Daylight Time, UTC+01:00)
# Wednesday, October 4, 2017

This is Part 2 in a series of articles about integrating VSTS, Azure Web Apps, ASP.NET applications, and Visual Studio.

In my last post, I showed you how to create a new Team Account and Team project linked to Azure.

In this article, I will show how to open this new project in Visual Studio, start working with it, and check your code into VSTS Git repository.

To view your account and project in VSTS, open a new browser tab and navigate to https://xxxx.visualstudio.com/_admin

where xxxx is the name of the account you just created. You can see my account displayed in Fig. 1.

Fig. 1

Click on the name of your project to display details about it, as shown in Fig. 2.

Fig. 2

Click the Code link at the top menu. If you have already checked in code, you will see that code in your Version Control Repository. New projects will look like my project, shown in Fig. 3.

Fig. 3

Click the [Clone in Visual Studio button]. This launch Visual Studio (You will probably be prompted to switch apps)

In Visual Studio, you should see the Team Explorer, as shown in Fig. 4. If you don't see it, you can find it by selecting View | Team Explorer from the menu.

Fig. 4

Click "Clone this repository" to display the Clone Repository dialog, as shown in Fig. 5.

Fig. 5

You have the opportunity to change where this new local repository will be saved on your hard drive. Whether you change it or not, you should note the location.

Click the [Clone] button. This will initialize a local GIT repository that points to your VSTS Team project.

You can now create a new Web App project in Visual Studio.

Select File | New | Project from the menu.     The "New Project" dialog displays, as shown in Fig. 6.

Fig. 6

Under the "Templates" tree on the left, expand Visual C#; then select "Web". Select "ASP.NET Web Application" or "ASP.NET Core Web Application" as your template.

The location of your project is determined by the combination of the "Location" textbox and the "Solution name" textbox (assuming you have not unchecked "Create new directory for solution"). Verify that this points to the location of the local Git repository that was created above.

Uncheck the "Create new Git repository" checkbox.

Make any other desired changes and click the [OK] button to create a new button.

At the New ASP.NET Application dialog (Fig. 7), click [OK] to create the project. 

Fig. 7

A new project will be created in the repository directory similar to the one shown in the Solution Explorer (View | Solution Explorer) in Fig. 8.

Fig. 8

You can check this initial code into your version control repository from the Visual Studio Team Explorer (View | Team Explorer). Click the [Changes] button in the Team Explorer to display the Changes panel, as shown in Fig. 9.

Fig. 9

Enter a comment, such as “Initial commit” and click the [Commit All] button. This will commit your changes to the local Git Repository.

To push your changes up to the VSTS repository, you will need to access the Team Explorer Sync panel. You can navigate to this panel by clicking to dropdown near the top of the Changes panel and selecting “Sync” from the menu displayed, as shown in Fig. 10.

Fig. 10

The Sync panel displays, as shown in Fig. 11.

Fig. 11

Click the “Sync” link. You should see a message indicating that the local and remote repositories are syncing, meaning that the local repository is merging any changes from the remote repository and your local commits are being pushed up to the remote repository in VSTS. The following message displays when this sync is complete:

Successfully synchronized incoming and outgoing commits.

If you return to the project code page in VSTS and refresh the web page, you should see all your code checked in. Fig. 12 shows my project after I checked in my initial commit.

Fig. 12

In this article, I showed you how to create a new ASP.NET project in Visual Studio and store the code in an existing Visual Studio Team Systems Git repository.

Wednesday, October 4, 2017 11:00:00 AM (GMT Daylight Time, UTC+01:00)
# Thursday, October 6, 2016

Lately, I've been using Visual Studio Code to create TypeScript projects.

When working with TypeScript, I always create a file with ".ts" extension and allow the TypeScript Compiler to create a ".js" and a ".map" file. It's rare that I ever open the js or map files, let alone modify them. In fact, it's a fool's errand to modify these files because they will be overwritten the next time the ".js" file changes.

So it is generally easier to work with a TypeScript project if I don't even see these files.

Visual Studio Code allows me to hide files in a project. To do so, select File | Preferences | Workplace Settings.

This creates a ".vscode" folder in the root of my project and adds a file named "settings.json" to this folder. In settings.json, add the following code:

"files.exclude": {
"**/*.js": true,
"**/*.map": true

Of course, you can add any file mask to this "files.exclude" extension to hide specific files or folders.

File matching patterns are described in this Help topic.

Save this file and the specified files will remain on disc but will not clutter the left pane of Visual Studio Code.

Thursday, October 6, 2016 5:32:33 AM (GMT Daylight Time, UTC+01:00)
# Monday, August 29, 2016
Monday, August 29, 2016 10:31:32 PM (GMT Daylight Time, UTC+01:00)
# Monday, May 9, 2016
Monday, May 9, 2016 4:07:00 PM (GMT Daylight Time, UTC+01:00)
# Tuesday, February 23, 2016
# Monday, May 25, 2015
Monday, May 25, 2015 2:27:00 PM (GMT Daylight Time, UTC+01:00)
# Saturday, August 23, 2014

When you install Visual Studio, you are prompted to opt into a program to help improve Visual Studio. If you answer “Yes”, Visual Studio will send information back to Microsoft about errors that occur and features that are used. The information is sent during installation and later during your normal course of using Visual Studio. The Visual Studio team uses this information to learn how their product is used, how often the product is used, and where errors are occurring. All this information is helpful as they improve the product.

If you have already installed Visual Studio, you can select from the menu:
Help | Customer Feedback Options

The following dialog (Fig. 1) displays:


Fig. 1

Click the radio button next to "Yes I am willing to participate" and click the [OK] button.

Of course, you can also opt out of the program by selecting the “No” radio button, but then you are not helping to improve the product. Those who opt out of this often do so because they fear for their privacy; but no personal information is transmitted, You can read about the privacy of your information here.

Microsoft makes it easy for you to share information about Visual Studio usage because they want this information to help to improve Visual Studio.

Saturday, August 23, 2014 2:05:00 AM (GMT Daylight Time, UTC+01:00)
# Saturday, July 27, 2013

Are you a TFS user or interested in using this product? In the past, it was necessary to install TFS onto a central server or virtual machine before using it. No more. Now, Team Foundation Services allows you to access a TFS server hosted by Microsoft.

The service is free for small teams (<5 people) while it is in Preview, but I have not seen any future pricing announcements.

Get started by navigating to visualstudio.com and signing up for an account. Note the URL, up to ".visualstudio.com". This is the server name. You will need this to integrate with Visual Studio solutions. In my case, it is "https://giard.visualstudio.com".

At the home page, click the [New Team Project] button (Fig. 1)


The "Create Team Project" dialog displays (Fig. 2). Enter a project name and description;


Next, select a Process template. The choices are:

  • Microsoft Visual Studio Scrum 3.0 - Preview
  • MSF for Agile Software Development 7.0 - Preview
  • MSF for CMMI Process Improvement 7.0 - Preview

Finally, select a Version Control repository. Currently, TFS and Git are supported. Click [Create Project] and you will be ready to start using TFS within a few seconds.

The navigation is simple and intuitive.

You can add and remove team members by clicking the Manage All Members link.

You can enter a new Task, Bug, Issue, Feature, or Test Case using dialogues similar to those found in the Visual Studio Team Explorer.

The source control repository can be seen by clicking the "Code" link on the top menu. From here, you can download files but not upload them.

TFS source control is easiest to use when you integrate it with Visual Studio. Open a solution in Visual Studio and select File | Source Control | Add Solution to Source Control

You may be prompted to add a TFS server. If so, use the URL ending in ".visualstudio.com" that you noted from above. (Fig. 3)


Select the Team project to which this solution belongs (Fig. 4) and click the [Connect] button.cl


From here you check-in, check-out, branch, merge, and get latest in the same way that you would use a TFS server within your enterprise.

Microsoft is adding new features to this Team Foundation Service each week. You can follow the progress on Brian Harry's blog at http://blogs.msdn.com/b/bharry/archive/tags/tfservice/.

Team Foundation Service allows you to manage projects on your own or with organizations that don't have the hardware and/or time to set up their own TFS server. It can be a simple solution to integrating your project with Application Lifecycle Management tools.

Agile | ALM | TFS | Visual Studio
Saturday, July 27, 2013 7:39:05 PM (GMT Daylight Time, UTC+01:00)
# Thursday, November 1, 2012

This screencast demonstrates how to change a Visual Studio 2012 Coded UI Test after you have recorded it.

Thursday, November 1, 2012 2:28:00 PM (GMT Standard Time, UTC+00:00)
# Wednesday, October 31, 2012

This screencast shows how to add assertions to a Visual Studio 2012 Coded UI Test while recording your mouse and keyboard actions.

Wednesday, October 31, 2012 2:26:00 PM (GMT Standard Time, UTC+00:00)
# Tuesday, October 30, 2012

This screencast covers the fundamentals of Microsoft Coded UI Tests, a feature of Visual Studio 2012, Premium and Ultimate Editions. You will learn how to record mouse and keyboard actions to record a simple "smoke test".

Tuesday, October 30, 2012 2:25:00 PM (GMT Standard Time, UTC+00:00)
# Sunday, October 28, 2012
Sunday, October 28, 2012 2:11:00 PM (GMT Standard Time, UTC+00:00)
# Saturday, October 27, 2012

This screencast demonstrates how to change a Visual Studio 2010 Coded UI Test after you have recorded it.

Saturday, October 27, 2012 3:22:00 PM (GMT Daylight Time, UTC+01:00)
# Friday, October 26, 2012

This screencast shows how to add assertions to a Coded UI Test while recording your mouse and keyboard actions.

Friday, October 26, 2012 3:19:00 PM (GMT Daylight Time, UTC+01:00)
# Monday, September 24, 2012
Monday, September 24, 2012 2:03:36 PM (GMT Daylight Time, UTC+01:00)
# Tuesday, August 28, 2012

Here is Randy Pagels's presentation on What's New in Visual Studio 2012at the August 2012 Great Lakes Area .NET User Group meeting.

Tuesday, August 28, 2012 6:14:01 AM (GMT Daylight Time, UTC+01:00)
# Tuesday, August 21, 2012
Tuesday, August 21, 2012 4:27:41 AM (GMT Daylight Time, UTC+01:00)
# Monday, June 11, 2012
Monday, June 11, 2012 3:26:00 PM (GMT Daylight Time, UTC+01:00)
# Friday, June 1, 2012

Here is Kathleen Dollard’s presentation on .NET Framework Core Features at the April 2012 Great Lakes Area .NET User Group (GANG).

Friday, June 1, 2012 4:51:00 AM (GMT Daylight Time, UTC+01:00)
# Wednesday, April 18, 2012
Wednesday, April 18, 2012 3:20:00 PM (GMT Daylight Time, UTC+01:00)
# Monday, February 20, 2012
Monday, February 20, 2012 5:19:00 PM (GMT Standard Time, UTC+00:00)
# Monday, December 5, 2011
Monday, December 5, 2011 3:55:34 PM (GMT Standard Time, UTC+00:00)
# Monday, January 31, 2011
# Wednesday, June 30, 2010
Wednesday, June 30, 2010 10:58:30 PM (GMT Daylight Time, UTC+01:00)
# Monday, May 17, 2010

Episode 88

In this interview, Microsoft Product Unit Manager Cameron Skinner describes the architecture tools that his team built into Visual Studio 2010

Monday, May 17, 2010 10:55:01 AM (GMT Daylight Time, UTC+01:00)