Suppress All Upper Case In Visual Studio 2012

Richard Banks has posted a solution to make Visual Studio 2012 stop yelling at you.  In his post titles “How To Prevent Visual Studio 2012 ALL CAPS Menus!” he gives you the registry key to create to make them normal again.  Thank you Richard!

I have created a registry file to import to make the task easier.

How to make TFS and Git to Play Nice: Taking TFS offline

In the last month I have started using git mainly mysysgit for all of my personal project and Team Foundation Server for work.  A few weeks ago I became aware of the git-tfs project which is an extension to allow you to use a local git repository with a TFS remote. 

One the things that has been a pain is that once you have the project cloned locally it still thinks that it is under source control and every time you open it you have to click through the dialogs.  There are a few workarounds online that show how to take the solution offline by turning off your wireless and unplugging your network card, then open the solution.  When you do this Visual Studio will prompt you to take the solution offline.  I am not a big fan of solutions that require unplugging the network to get a software package to do something it should natively. 

In this post I am going to show you how I was able to get my solution in the offline mode without messing around with the network settings.

So we want the solution to be offline, right? We’ll guess what? There is a Visual Studio Extension for that!  Install the GoOffLine Visual Studio Extension from the Visual Studio Extension Gallery – This extension adds a Go Offline menu option to the File->Source Control menu.

image

 

Now, we need a existing project cloned from TFS or to get a new one.  I am not going to go into the details of how to install and configure git and git-tfs there are several good resources available that cover that topic extensively.  That being said I will point you to the blog post that helped me figure out how to get git-tfs working: Git & TFS Working Together – Version 2 by Richard Banks. 

One hurdle I had to overcome was when I opened the cloned solution, which is not in the workspace, and clicked the Go Offline menu item nothing happened.  What I figured out was since the source code location wasn’t mapped in the workspace it didn’t take it offline.  Which makes sense because it asked during load if I wanted to remove the source control bindings or disable them temporarily.  I disabled them temporarily since I didn’t want to screw up any of the others working on the project that weren’t using git.

To get around this I open my Manage Workspaces and temporarily mapped the solution to the directory where I had the git repository for the solution.  Now when I opened the solution it was bound to TFS Source control and clicking the Go Offline menu option took the project offline.  I think closed the solution and removed the mapping from the workspace.

This leaves Visual Studio in offline mode, even when you want to open a solution that is mapped to TFS.  So to get around that go to File->Source Control->Go Online and it will bring Visual Studio back online and your TFS integration will light up.

When you open your project from the local git version (that is offline) you will see the following dialog.

image

Just click “No” and your solution will open and you can get started coding.

Using this technique will allow you to enjoy all the benefits of using a local version control with Team Foundation Server as the remote.  Today was the first day I have tried this and I hope others can help me figure out if there is a better way to approach this.  I am going to continue down this path and see if there are any gotchas I haven’t come across yet.  If you have a different solution about how to work with git on a project while everyone else is using Team Explorer with TFS I would love to hear it.

Execute Command Files from Visual Studio 2010

On a recent project we used custom Visual Studio build files to build and deploy the code to different environments, i.e. Test and Production.  We created command files to pass the correct arguments to the build so it would be easier to run.  We never liked the fact that we need to open a command window and navigate to our solution folder to run the builds.  We thought, “There has got to be a way to do that from with in visual studio”, and we were right.  Devlin Liles details the steps we used to set that up in Visual Studio 2008 in his blog post titled Batch File and Command File running In Visual Studio.

I wanted to set that up in Visual Studio 2010 today and found the steps a little different so wanted to share how to set it up in Visual Studio 2010.

To realize the ability to execute command or batch files from within Visual Studio 2010 we need to perform the following steps:

  1. Create the External Command
  2. Adding the Command to the Context Menu

Setting up the External Command

  • Open the External Tools dialog by opening the Tools->External Tools menu.

image

  • Click the add [Add]  button to create a new External Tool and enter the following information:
Title E&excute Command…
Command C:\WINDOWS\System32\cmd.exe
Arguments /K $(ItemPath)
Initial directory $(ItemDir)
Use Output Window Checked
Prompt for arguments Not Checked
Treat output as Unicode Not Checked
  • Click the [Apply] button to save these changes, but before you click [OK] take now of a how many External Tools are listed here.  In my case it was the only external tool that had been defined so it will be assigned to External Tool 1
  • You can click [OK] now to close the External Tools dialog.

Adding the Command to the Context Menu

Now that we have our external command created we need to add it to the context menu for Solution Explorer items.

  • Open the Customize dialog by right clicking somewhere in the toolbar area to bring up the context menu and selecting Customize from the bottom of the menu.

image

This is where the steps for Visual Studio 2010 are different than Visual Studio 2010.  If you are using Visual Studio 2008 follow the instructions on Devlin Liles blog.

  • Select the [Commands] tab

image

  • Under Choose a menu or toolbar to rearrange: select Context menu: and in the drop down select Project and Solution Context Menus | Item.

image

I want my “Execute CMD…” command to be positioned above the “Edit WCF Configuration” items, so select “Edit WCF Configuration” and click the [Add Command…] button.

image

  • On the Add Command dialog in the Categories list select Tools.  Know in the Commands list scroll down until you see the External Command you are looking for.  Remember ours was External Command 1.  Once you find it select it and click [OK].

image

Now we see that External Command 1 is shown above the “Edit WCF Configuration” command, right were I wanted it. 

  • Now you can click [Close] button, open a solution and when you open the context menu in Solution Explorer you see the following:

image

Summary

This addition to Visual Studio has come in really handy for running common commands or batch files you might need to automate more mundane task.

Shared Assembly Info Files in Visual Studio Reborn

The last project I worked on had a lot of class library projects in it and we really struggled with file versions.  We really wanted a good way to give all the class libraries the save version number other information.  I seem to remember that in an older version of Visual Studio, 2005 I think, if you created a setup project you could tell it to make all the file versions the same.  I couldn’t get this to work in Visual Studio 2008, or 2010, and it doesn’t work for web applications.

After talking with several of my colleagues, Devlin Liles and Rob Tennyson, and others we came up with a solution of using a Shared Assembly Info file across the projects.  I am starting a new project and since I didn’t remember how we did it of course I consulted the great oracle of all collected knowledge, Google and found this article Shared Assembly Info in Visual Studio by Jeremy Jameson and this solution worked great.  I was able to get my new project well underway with Shared Assembly Files and got to bed early.

The benefits I have found so far are that all outputs of the build have the same number and you only have to update the product and file versions in one place.

If you have struggled with this in the past check be sure to check this out.

enjoy

Visual Studio 2008 Test Item Templates Missing

This week my current project decided to start using Visual Studio Team Test for manual UI test.  So, naturally someone had to write the test, but we didn’t have Visual Studio Team Tester Edition installed.  After installing it, which looked good, when I went to add a new “Manual Test (Word Format) none of the new Item Templates where there. 

After a little searching I can across this post from 2007 that said to run  the following to correct it.

   1:  C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE>devenv.exe /setup

From the post they believed that the issue was that the Item Template cache was not getting updated.  Running devenv.exe /Setup forces Visual Studio to merge the resource metadata that describes, menus, toolbars, and command groups from the VSPackages.  Evidently it also updates the Item Template Cache as well.

All is good and I am off created Manual Test now.

Calendar

<<  March 2024  >>
MonTueWedThuFriSatSun
26272829123
45678910
11121314151617
18192021222324
25262728293031
1234567

View posts in large calendar

Widget Category list not found.

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))X

Tag cloud

    Widget Month List not found.

    Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))X

    Widget AuthorList not found.

    Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))X

    Widget TextBox not found.

    Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))X