Tuesday, February 26, 2013

String formatting in PowerShell

If you want to perform a string.Format in PowerShell (much like you would do in C#), you can do so using the following syntax:

[string]::Format("This is my variable: {0}", $myVariable)

Alternatively, you can also perform string formatting this way:

"This is my variable: {0}" -f $myVariable

If you have multiple variables, you can simply comma separate the values in the formatted string:

"This is some text: {0} and this is some value {1}" -f $text, $value

List of Windows 8 Start Menu Alternatives

If you are looking for a list of Windows 8 Start Menu alternatives (and there are an abundance of them), this article does a pretty good job of covering the various Start menu alternatives that are out there:


Also, the article does not provide direct links to the various Start menu offerings, so I am providing a partial listing here:

  1. Pokki for Windows 8: https://www.pokki.com/windows-8-start-menu
  2. Start Button 8: http://www.startbutton8.com/index.html
  3. Start 8: http://www.stardock.com/products/start8/
  4. ViStart: http://lee-soft.com/vistart/
  5. Classic Shell: http://www.classicshell.net/
  6. IOBit Start Menu 8: http://www.iobit.com/iobitstartmenu8.php
  7. Start Menu X: http://www.startmenux.com/index.html
  8. Power 8: https://code.google.com/p/power8/
  9. Spesoft Windows 8 Start Menu: http://www.spesoft.com/free-windows-8-start-menu.aspx
  10. Start Menu Modifier: http://start-menu-modifier.en.softonic.com/
  11. Revel Bring Back: http://www.revel-software.it/BringBack.aspx

Monday, February 25, 2013

Exporting and importing e-mail signatures in MS Outlook

One of the operations that I have to configure each time I re-install the OS on my work computer is my e-mail signature in Outlook.

Each time I re-build my OS, I have to re-configure Outlook on my machine.  While I can archive my e-mail messages, I have discovered that every release of MS Office thus far does not offer me the ability to export (and subsequently import) my Outlook e-mail signature.  This information seems to sit out there in limbo and is not attached to my MS Exchange Profile (which would be preferable).

The process that I use right now is looking back at an e-mail message that contains my old E-mail Signature or creating a screenshot of my E-mail Signature prior to performing the re-install/re-build of my machine.  I then have to re-create my E-mail Signature in Outlook based on what I had previously captured.

Of course, this process is very annoying and not guaranteed to replicate my e-mail signature EXACTLY (same font color, font size etc.) as it was before.  I really wish that Microsoft would simply offer an Export and Import button on the E-mail Signature dialog so that I could easily backup these settings prior to a system rebuild.

If you are like me and also wish that Microsoft would offer an Export/Import button for the E-mail Signature dialog, please vote for this UserVoice Feedback Item here: http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3690660-export-e-mail-signature-in-outlook

Sunday, February 24, 2013

Deployable Dependencies option missing in Visual Studio 2012

I was recently reading an article regarding how to deploy ASP.NET MVC 4 to a Shared Hosting Provider and the article mentioned using the "Add Deployable Dependencies" option.

Well, I was using Visual Studio 2012 and I did not see this option anywhere!

 Well, as it turns out according to this Microsoft Connect feedback item, this option was removed from Visual Studio 2012: http://connect.microsoft.com/VisualStudio/feedback/details/735553/add-deployable-dependencies-missing-from-vs11-beta

Therefore, while this option still exists in Visual Studio 2010 (and Visual Studio 2010 SP1), it was built into the NuGet Package Manager alongside Visual Studio 2012 so that all required assemblies are automatically bin deployed.

Publishing Web differences between Visual Studio 2010 and Visual Studio 2012

I recently switched over from developing my Web Applications using Visual Studio 2010 to Visual Studio 2012 and was trying to publish one of my ASP.NET MVC Web Applications using Visual Studio 2012 and I came across this dialog:

This dialog was COMPLETELY different from the dialog I used to see in Visual Studio 2010!!

In Visual Studio 2010, I had the option to also select from a variety of choices for publishing as well as the ability to create new Publishing profiles directly from within the IDE:

Needless to say, I still have not figured out how to create a Publishing profile in Visual Studio 2012 similar to how I was previously able to do so using Visual Studio 2010.

If you are like me and want the capabilities of the Visual Studio 2010 IDE available in Visual Studio 2012, please vote for this Visual Studio UserVoice feedback item:


Friday, February 22, 2013

Team Foundation Server in the Cloud error message

I was trying to check my source code into Team Foundation Server which is hosted in the cloud and I received the following error message:

As it turns out, believe it or not, there are worldwide outages in  the Windows Azure cloud due to an expired SSL certificate!!  There is currently no estimated timeline as to when all of the servers (including the TFS Server will be back online).

You can read more about the Windows Azure Cloud Storage outage here:

Wednesday, February 20, 2013

Memory gates checking failed error message on IIS 8

I was running my Sitefinity development environment within a virtual machine with 8 GB allocated to the VM, and while I was running a web application within IIS 8, I encountered this very interesting error message:

I found that very interesting since it immediately notified me that my system was running low on memory and that I would need to increase the allocation of memory for my VM if I wished to continue taxing the memory and CPU of my development environment in the manner I was currently doing!

You can find more information about the minFreeMemoryPercentageToActivateService setting in this MSDN article: http://msdn.microsoft.com/en-us/library/ms731336.aspx

Making a Sitefinity Web Application ASP.NET MVC-Ready

If you open a Sitefinity Web Application project in Visual Studio (2010 or 2012), you will notice that the Sitefinity Web App project is not "ASP.NET MVC Ready" out of the box (as of Sitefinity v. 5.4).  That is to say that the customary capabilities of being able to add Controllers, Views and Models to the respective Controllers, Views and Models directories are not available from the typical right click menu option in Visual Studio.

Instead, you have to manually tweak the Sitefinity Web Application project in order to get it to work with Visual Studio in the manner that you expect.

First of all, let's start with editing the Visual Studio project file to get the ASP.NET MVC right-click menu options to appear.

  1. Open the project in Visual Studio
  2. Right click on the project file and select "Unload Project"
  3. After the project has unloaded, right click on the project file once again and select "Edit SitefinityWebApp.csproj"
  4. Once the Web Application project opens in the Visual Studio editor, find the following line starting with ProjectGuids.  Replace the existing Guids in that element with the following set of Guids: {E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
  5. Save the project file and close the editing screen
  6. Right click on the project file once again and select "Reload Project" (If the editing pane is still open, just accept the prompt to automatically close the editing screen)
  7. Once the Sitefinity Web Application re-opens, you should now have right-click options available to add Controllers, Models and Views to your respective MVC folders.
  8. If the right-click menu options display, you are ready to move on to the next step!

Next, if you do not have the appropriate namespaces imported into your Sitefinity Web Application project's Web.config file, you will not be able to use the ViewBag element without getting the following error message when you build the project: "The name 'ViewBag' does not exist in the current context".  This requires manually editing and updating the Web.config file associated with the Sitefinity Web Application project:

  1. Open up the Sitefinity Web Application project's Web.config file
  2. Navigate down to the pages element which should reside below the system.web element
  3. Add the following element below the pages element: 

Adding these elements should then resolve your ViewBag error message!  Once you complete this step, your Sitefinity Web Application project should now be officially "ASP.NET MVC Ready"!!

Good luck and happy coding!!

SQL Server Product Key is not valid with SQL 2012 SP1 media

I just recently downloaded SQL Server 2012 with SP1 from MSDN and while attempting to upgrade an existing installation of SQL Server 2008 Express (with SP3), I received the following error message below:

I never received this error message from the original SQL Server 2012 Setup media, so I believed that there was some flaw with the MSDN media I downloaded or specifically the integrated SP1 media that Microsoft had provided.  However, I tried the same upgrade with the SQL Server 2012 RTM media as well which resulted in the same EXACT error message.  I have not been able to resolve it since and have reverted to using SQL Server 2008 R2 (with SP1) media instead to upgrade my SQL 2008 Express (with SP3) instance.

Tuesday, February 19, 2013

Deploying ASP.NET MVC Widgets into Sitefinity

Sitefinity has updated their online documentation to include details on how to deploy ASP.NET MVC Widgets into their platform which now supports both ASP.NET WebForms as well as ASP.NET MVC Widgets.

Their documentation on deploying ASP.NET MVC into Sitefinity is here: http://www.sitefinity.com/documentation/documentationarticles/developers-guide/sitefinity-essentials/using-asp.net-mvc-in-sitefinity

In addition, there is an easy way to deploy ASP.NET MVC Controller Widgets into Sitefinity using Sitefinity Thunder as depicted in the image below:

You can also read more about developing ASP.NET MVC Widgets using Sitefinity Thunder here: http://www.sitefinity.com/documentation/gettingstarted/creating-mvc-widgets-with-sitefinity-thunder

Tuesday, February 12, 2013

Type used in a using statement must be implicitly convertible to 'System.IDisposable'

I was recently working with an Entity Framework project in Visual Studio 2012 which I had created an ASP.NET Web Forms Application project and referenced a separate project containing my Entity Data Model Class Library (a C# Class Library project containing an ADO.NET Entity Data Model).

Unfortunately, after making a reference to my Entity Data Model Class Library, I got the following error message:

'MyNs.MyEntities': type used in a using statement must be implicitly convertible to 'System.IDisposable'

Try as I might, I could not figure out how to get rid of this error message by adding the various using statements to my class.

Finally, while working with a colleague of mine, we decided to compile the project and see if any error messages popped up that offered any additional insight as to the root cause of the error.

Fortunately, the compilation error message in Visual Studio indicated that I needed to add an Assembly Reference in my project to System.Data.Entity!!

After I added this project assembly reference, just like magic the error message finally vanished! Whew!....

Sunday, February 10, 2013

Integrating Team Foundation Server source control with SQL Server Management Studio

If you want to make Team Foundation Server source control available as a plug-in to SQL Server Management Studio (in my case SQL Server Management Studio 2012 SP1), you will have to install the Team Foundation Server MSSCCI Provider.

In my case, I made the initial mistake of assuming that I needed the 64-bit provider because I had installed the 64-bit version of SQL Server 2012.

Unfortunately, I was mistaken and determined that like Visual Studio 2012, SQL Server Management Studio remains a 32-bit application, therefore, I had to install the 32-bit version of the TFS MSSCCI Provider.

Both download links are available below:

Microsoft Visual Studio Team Foundation Server 2012 MSSCCI Provider 32-bithttp://visualstudiogallery.msdn.microsoft.com/3a96a4dc-ba9c-4589-92c5-640e07332afd

Microsoft Visual Studio Team Foundation Server 2012 MSSCCI Provider 64-bit


Visual Studio 2012 Productivity Power Tools now available!

I had a friend ask me the other day if Microsoft had released the Visual Studio 2012 Productivity Power Tools. 

As it is, Microsoft has a significant lag time between releasing their IDE and then releasing updates to support missing features such as the case with the Visual Studio 2012 Productivity Power Tools.

The last time I checked was several months ago shortly after the release of the Visual Studio 2012 IDE, but I just checked again this morning and lo and behold!, they were now available for download.

You can download the Visual Studio 2012 Productivity Power Tools from the Visual Studio gallery here:

Saturday, February 9, 2013

Installing Visual Studio 2012 Update 1 Offline

If you download Visual Studio 2012 Update 1 from here: http://www.microsoft.com/visualstudio/eng/downloads#d-visual-studio-2012-update

You will notice that the download link only consists of a few MB download which does not comprise the full update.  Instead, Update 1 consists of a Web Installer which downloads the remainder of the components needed to install the update.

Well, what if you do not have an active Internet connection (such as when you are building a virtual machine)?  Fortunately, there is a method to download the packages offline for installing when you do not have an active Internet connection (or if you have a slow connection such as in a restaurant or a coffee shop).

You can find instructions for downloading the packages for an offline installation here: http://www.windowsvalley.com/visual-studio-2012-update-1-offline-installer/

Essentially, the method consists of executing the Update 1 Web Installer with the /Layout switch and specifying a download location for all of the packages.

Once you have the offline packages, you should be able to execute the Update 1 installer and it should look for the offline packages locally before attempting to download them over the Internet.

Sunday, February 3, 2013

Merging ASP.NET Web Application projects with ASP.NET MVC Projects

If you want to learn how to merge an ASP.NET Web Application project with an ASP.NET MVC project, you can follow this article here: http://www.hanselman.com/blog/IntegratingASPNETMVC3IntoExistingUpgradedASPNet4WebFormsApplications.aspx

This might be useful if you start out with an ASP.NET Web Application project that you have built quite some time ago and have now decided you want to leverage the power and flexibility of ASP.NET MVC with Entity Framework and jQuery.

One of the notable things that is missing from Scott Hanselman's article is manually editing the Visual Studio project file in order to get the right click Visual Studio MVC functionality into the project.

You can accomplish this by doing the following:

  1. Simply open a valid ASP.NET MVC Web Application project file in Visual Studio
  2. Unload the project and right click and select it for Editing.  
  3. Right click and select Edit the .csproj file
  4. Review the ProjectTypeGuids element in the ASP.NET MVC Web Application Project and copy them to the clipboard
  5. Follow steps 1-3 for the ASP.NET Web Application project file and replace your existing ProjectTypeGuids
  6. Save the resultant ASP.NET Web Application project file.
  7. Reload the ASP.NET Web Application project
  8. Right click on the Controllers or Views directory in Visual Studio and verify that you now are able to add appropriate Controllers or Views to the respective directory!

Amazon offering free Windows Server hosting

Great news!  Amazon Web Services (AWS) is offering free Windows hosting for a year with Windows Server 2012 hosting.

You can read more about Amazon's free offering here: http://aws.amazon.com/free/

Saturday, February 2, 2013

Unhiding the Office Outlook Ribbon

If you have ever accidentally lost the Outlook ribbon, you can use the Ctrl + F1 key combination to unhide the Office Ribbon.

You can read more about how to do this here: http://blogmines.com/blog/2010/08/23/how-to-unhide-office-ribbon-in-outlook-2010/