“GatherAllFilesToPublish” Error in Upgraded VS2012 Projects

If you happen to encounter the following error “The target “GatherAllFilesToPublish” does not exist in the project.” while publishing your project to local filesystem after upgrading Visual Studio 2010 projects to Visual Studio 2012, it is most likely an issue due to the upgrade process.

Error: The target "GatherAllFilesToPublish" does not exist in the project.
Error: The target “GatherAllFilesToPublish” does not exist in the project.

While in TFS environment, a comparison is made between the csproj files. It seems that the following missing lines caused the issue:

Read more

“Create Unit Tests…” Function Not Available Or Disabled

If you followed my two blog posts previously (Create Unit Tests Workaround and Solution), you may found out at some point of time, the function of “Create Unit Tests” wizard is disabled on your next attempt to launch the Create Unit Tests wizard.

The following issues were encountered:

  1. When you used Keyboard Shortcut workaround, the Create Unit Tests Wizard does not appear.
  2. You may receive the following error while using the Command Window workaround:
    Command "EditorContextMenus.CodeWindow.CreateUnitTests" is not available.

    Command "EditorContextMenus.CodeWindow.CreateUnitTests" is not available.
    Command “EditorContextMenus.CodeWindow.CreateUnitTests” is not available.
  3.  Right-Click “Create Unit Tests…” menu is disabled or grayed out when you use either solutions.

    "Create Unit Tests..." menu disabled
    “Create Unit Tests…” menu disabled

This is a known issue and the below solution will solve the problem.

Solution

Read more

Enable “Create Unit Tests…” on Visual Studio 2012

Update: If you are having issues with the “Create Unit Tests…” function being disabled, check out this post.

If you have followed from my previous workaround to enable “Create Unit Tests…”, you might be delighted that there’s a permanent solution to this issue.

There are two ways to fully enable “Create Unit Tests…” on Visual Studio 2012 without using keyboard shortcuts or command window. Better still, you can now right click –> Create Unit Tests… as could be seen below:

"Create Unit Tests..." menu enabled
“Create Unit Tests…” menu enabled

There are two ways to enable this, the elegant way or the abnormal way.

Solution 1: The Elegant Way

Read more