Joseph Michael Pesch
VP Programming

Visual Studio Open Database Error: Failed to Generate a User Instance of SQL Server

by 29. November 2013 12:48

Running SQLExpress and trying to open database from Visual Studio.  In my case I originally had SQL 2008 and 2012 installed.  Then I added 2008R2 and deleted 2008.  After that when trying to open a database (from App_Data folder of Visual Studio project) using the Server Explorer in Visual Studio I received the following error message: "Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.".  To resolve I simply deleted the following folder and then restarted Visual Studio: C:\Users\...\AppData\Local\Microsoft\Microsoft SQL Server Data


SQL Server | Visual Studio

nuget.psm1 Cannot be Loaded Because the Execution of Scripts is Disabled on this System

by 29. November 2013 08:43

File C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft Corporation\NuGet Package Manager\2.7.40911.225\Modules\NuGet\nuget.psm1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details.

Launch Powershell as admin and run this command: "Set-ExecutionPolicy RemoteSigned"

Restart Visual Studio


Visual Studio

SharePoint Document Sets

by 27. November 2013 08:49



SharePoint Always Run Configuration Wizard on All Farm Servers After Server Patching

by 26. November 2013 13:52

After patching (SharePoint updates) you need to run the configuration wizard.  The configuration wizard has to be ran on all SP servers in the farm. There is a command line that forces the wizard to re-run in the event of an issue or failure with the wizard. 

Psconfig.exe -cmd upgrade -inplace b2b -wait -force.



Link Outlook Calendar to Sharepoint

by 26. November 2013 07:48


C# App.Config Custom Dictionary Section to Store Simple Key/Value Pairs

by 4. November 2013 06:12

Below is a sample app.config using a custom dictionary section to store simple key/value pairs:

    <section name="CustomDictionarySection" type="System.Configuration.DictionarySectionHandler"/>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
    <add key="Key1" value="Value 1" />
    <add key="Key2" value="Value 2" />
    <add key="Key3" value="Value 3" />
class Program
  static void Main(string[] args)
    string key = "Key2";
    var section = (ConfigurationManager.GetSection("CustomDictionarySection") as System.Collections.Hashtable)
                .Where(t => t.Key.ToString() == key);
    if (section.Count() > 0)
      Console.WriteLine(string.Format("Found section with key: {0} containing value: {1}", key, section.First().Value));
      Console.WriteLine(string.Format("Could not find section with key: {0}", key));