Joseph Michael Pesch
VP Programming

Visual Studio Custom Templates

by 26. October 2016 13:21

To delete items from the cache, go to this folder (VS2013): %userprofile%\AppData\Roaming\Microsoft\VisualStudio\12.0\ItemTemplatesCache


Visual Studio

Visual Studio Error Loading TFS - Unexpected End of File

by 21. September 2016 17:08

When changing connections between different TFS servers, my Visual Studio seemed to get stuck with an issue where it would always error out with a message "unexpected end of file." and TFS could not load.  The solution was to delete all folders and files from this directory: C:\Users\USERID_HERE\AppData\Local\Microsoft\Team Foundation


TFS | Visual Studio

Tools for Apache Cordova for Visual Studio 2013 - Blocking Update and Cannot Uninstall

by 24. January 2016 07:07

I was trying to update Visual Studio 2013 and could not as it was complaining that I needed to remove an older version of "Tools for Apache Cordova for Visual Studio 2013".  I went into my Control Panel and found "Tools for Apache Cordova for Visual Studio 2013 - CTP3.1" as an installed program and tried to uninstall; however, that would immediately say it completed and would not actually remove it.  To force the removal I had to search in my "%ProgramData%\Package Cache" folder for the "MultiDeviceHybridApps_VS.msi" file.  Then run the following command from an administration command prompt using the full path to the MSI.



Visual Studio

Restore NUGET Packages in Visual Studio Online TFS Continuous Integration Builds

by 16. February 2015 13:25

  • Step 1 - Enable NuGet Package Restore


        Projects that use MSBuild-Integrated package restore typically contain a .nuget folder with three files:

    • NuGet.Config
    • NuGet.exe
    • NuGet.targets

Since the presence of a NuGet.targets file determines whether NuGet will continue to use the MSBuild-Integrated approach, this file must be removed. Also, as the .nuget\NuGet.exe file is not used by Automatic Package Restore, it likewise can be removed. By default, the NuGet.Config file instructs NuGet to bypass adding package binaries to source control. Automatic Package Restore will honour this as long as you leave this file in place. Note that NuGet.Config only has an effect when using Visual Studio to integrate with Team Foundation Server (TFS). In addition to these files, NuGet modifies the project files in the solution to reference the NuGet.targets file so it can participate in the build process. When migrating to Automatic Package Restore, these references must also be removed.

       Remove the NuGet.exe and NuGet.targets files from the solution's .nuget folder. Make sure the files themselves are also removed from the solution workspace.
       Retain the NuGet.Config file to continue to bypass adding packages to source control.

  • Step 2 – Close Down Visual Studio

        Each project in your solution that has picked up any of the below listed tags in the project properties will need to be removed. Open the project in Notepad and look for the below tags, remove these tags…

1. ------------------- 

2. -------------------
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />  

3. --------------------
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">  
        <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, 
see The missing file is {0}.</ErrorText>
    <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
  • Step 3 – Open the solution and check in the changes

        Once you have made the above listed changes, you are good to check in the changes.

Trigger the  build now, the build server should now be able to successfully resolve the package references…

More details here…


ASP.Net | TFS | Visual Studio

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

Team Foundation Server (TFS) Building Project with External Assemblies

by 27. June 2013 08:47

This approach to fix the issue with using external assemblies (i.e. assemblies not in the project folder structure).  In this example the project references the "Encompass" assemblies from the "C:\Program Files (x86)\Encompass" folder.  I wanted to use the program file reference so it’s easy to upgrade SDK; however, Visual Studio Project always have relative paths which doesn’t get resolved in TFS Build.  To resolve this I have add new registry key for the Encompass folder path on the TFS build server so that it looks into this location when it compiles any project.  Now I don’t need to change the project file. 

Registry key: HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > .NET Framework > AssemblyFolders

Add new key (in this case "Encompass") and then update the "(default)" string value to be the path to the assemblies (in this case "C:\Program Files (x86)\Encompass").


ASP.Net | Visual Studio | TFS

Visual Studio 2010 Resources

by 10. November 2010 13:28

The Visual Studio "Productivity Power Tools" are a set of Visual Studio addins that offer enhanced develeper experience in the IDE.  For example, there are features such as the following.  Enhanced tab well, allowing colorization of tabs by file type, alternative tab docking points (i.e. left side vertical tab set, vs. standard top horizontal).  Javascript code auto-collapse regions, similar to the auto-collapse feature on the C#/VB code behind.  Quick find, which allows a more user friendly find/replace, that works similar to a modern web page find (i.e. auto-highliting matches dynamically as you type), along with enhanced regular expression support.  These are just a few examples of some of the great enhanced features provdided in the "Productivity Power Tools". 

To view more details and download the bits, check out this web site:


[None] | Visual Studio

Visual Studio 2005 Business Intelligence Studio Can't Open SSIS Script Task

by 4. June 2010 18:16

SSIS package that’s developed in Microsoft Visual Studio 2005 may have a script task inside that doesn’t open when you click on the "Design Script" button.  In my case this was after I installed SQL Server 2008 locally. I had to re-install SQL Server 2005 sp2 (after installing SQL Server 2008) and then the script tasks are ok again.


Oracle | SSIS | Visual Studio

Get PublicKeyToken in Visual Studio

by 4. July 2009 18:43

The easiest way to get the PublicKeyToken of a .Net assembly is to use the SN.EXE which is typically installed in the SDK folder of the .Net framework (as shown below).

VS2005: C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\sn.exe

VS2008: C:\Program Files\Microsoft Visual Studio 9.0\SDK\v3.5\Bin\sn.exe

Sample usage: SN.exe -T C:\samplepath\sampleassembly.dll

Add the following to the Post Build events: "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\sn.exe" -T "$(TargetPath)"

Then when you build the assembly it will print the public key token to the output window.

Also, you could run the assembly and put the following line in source code:


Tags: ,

ASP.Net | C# | Visual Studio

Visual Studio XML Documentation Reference

by 8. March 2009 21:34

To add XML documentation:

1) Enable via Project Properties (on the Build tab).

2) Build project and you will receive warnings about all Public members that are not documented (you can double-click to add appropriate documentation in each section).

3) Install Sandcastle ( and  Visual Studio 2008 SDK (

4) Run Sandcastle program (in my case I ran it from C:\Program Files\Sandcastle\Examples\generic\SandcastleGui.exe)

5) Once you click on build the tool will generate HxS file under the sandcastle installation directory (named whatever you selected in the "Name" field). We will use this file to create a setup.exe which when installed integrates it with Visual Studio.

6) Open Visual Studio 2008 and click File -> New Project : In the new project dialog expand "Other Project Types" and select Extensibility. On the right hand side select "Help Integration Wizard" and enter a name for the project and click OK.  In the wizard that appears select "Setup project" and click Next.  In the next step select the HxS file we created in Step 5 above.  Visual Studio now creates 2 projects a Merge Module project and a setup project. Click on the setup project and modify its properties as needed.

7) Now compile the setup project to generate an MSI and a setup.exe file which when installed integrates the help with VS.NET.  You might have to close and re-open all instances VS.NET to see the change.  Now type in a class name in the code editor and press F1.  VS.NET should directly take you to the documentation associated with that class.

Below are the basic XML documetation tags you can apply to the source code for building the help file.

Documentation Sections

  • <summary>

    A short description of the item; describe the members of the type here.

  • <remarks>

    The "Remarks" section of the documentation; specify overview information here.

  • <example>

    The "Example" section of the documentation.

  • <seealso>

    A link in the "See Also" section of the documentation.

    <seealso cref="member">text</seealso>

Member Documentation

  • <param>

    Describes a parameter to a method.

    <param name="name">text</param>
  • <returns>

    The return value of a method.

  • <exception>

    The exceptions that can be thrown.

    <exception [cref="type"]>text</exception>
  • <value>

    Describes the value of a property.

  • <permission>

    The permission applied to a member.

    <permission [cref="type"]>text</permission>

Text Formatting

  • <c>

    Format characters as code within other text.

  • <code>

    Multiline section of code.

  • <see cref>

    A link to a type, member or field in the current compilation environment.

    <see cref="member">text</see>
  • <see langword>

    Undocumented. A link to a keyword in the language of the current compilation environment, e.g. null.

    <see langword="keyword"/>
  • <paramref>

    A reference to a parameter within other text.

    <paramref name="name"/>
  • <list>

    A list of items.

    <list type="[bullet|number|table]">
  • <para>

    A paragraph within other text.

  • <include>

    Refer to comments in another file.

    <include file='filename' path='tagpath[@name="id"]' />

Tags: ,

Visual Studio