Tech Talk A software developer on all things tech, and then some

14Mar/170

Visual Studio 2012 Keeps Crashing

VS2012 Crashing

When attempting to debug some SSIS applications, I encountered a quite annoying issue with my Visual Studio crashing anytime I tried to open a package. To hopefully help someone encountering a similar issue, I decided to list the steps here. Most of these steps are self inclusive, so feel free to try Visual Studio after each step to see if it worked for you.

View the Logs

Before you do anything, let's check the logs to see if we can find the root cause of the issue before we proceed with the steps below.

ActivityLog

Visual Studio has an XML log which you can traverse and determine if there were any issues. This is also helpful to send to Microsoft, StackOverflow, etc...  in case of all else fails.

  1. Navigate to %APPDATA%\Microsoft\VisualStudio\11.0
  2. Open and review ActivityLog.xml
  3. Search for <type>Error</type>

Since the error most likely will be very tailored to you, Googling any errors will be your best bet.

Event Viewer

Another source of error log information will be the Event Viewer.

  1. Go to Run (Or Win + R)
  2. Enter eventvwr

Similar to above, this most likely will be unique for you. Hit Google and see if you can find your resolution.

Repair Visual Studio

Find your original installation media and run a repair on your Visual Studio installation. This will be the best first pass at repairing any corrupted files that might exist.

Remove the ComponentModelCache

If a component is failing to load, clearing out and forcing Visual Studio to recompile your components might fix the issue

  1. Navigate to %localappdata%\Microsoft\VisualStudio\11.0\
  2. Zip / backup the ComponentModelCache folder
  3. Delete the ComponentModelCache folder

Open Visual Studio in Safe Mode

If one of your extensions are failing, running Visual Studio in safe mode will load just the bare minimum.

  1. Navigate to %ProgramFiles(x86)%\Microsoft Visual Studio 11.0\Common7\IDE in an elevated command prompt.
  2. Enter devenv.exe /safemode

Reset User & Visual Studio Settings

Sometimes clearing out all of your setting might clean up something that is preventing Visual Studio to load correctly

  1. Navigate to %ProgramFiles(x86)%\Microsoft Visual Studio 11.0\Common7\IDE in an elevated command prompt.
  2. Enter devenv.exe /resetuserdata
  3. Enter devenv.exe /resetsettings

Sources

9Jun/140

Shorthand Month in SSIS Expression

Need a quick way to get the shorthand version (Mmm) of a month in a SSIS expression? Copy and paste the following into a variable and you have precisely just that.

MONTH(GETDATE()) == 1 ? "Jan" : 
MONTH(GETDATE()) == 2 ? "Feb" :
MONTH(GETDATE()) == 3 ? "Mar" :
MONTH(GETDATE()) == 4 ? "Apr" :
MONTH(GETDATE()) == 5 ? "May" :
MONTH(GETDATE()) == 6 ? "Jun" :
MONTH(GETDATE()) == 7 ? "Jul" :
MONTH(GETDATE()) == 8 ? "Aug" :
MONTH(GETDATE()) == 9 ? "Sep" :
MONTH(GETDATE()) == 10 ? "Oct" :
MONTH(GETDATE()) == 11 ? "Nov" :"Dec"

A quick code snippet to hopefully save you a couple of minutes of typing.

Happy Coding!

5Feb/140

GnuPG Encryption / Decryption in SSIS 2012

GnuPG (GNU Privacy Guard) is a free implementation of the OpenPGP standard as defined by RFC4880, not to be confused with the proprietary PGP (Pretty Good Privacy) version originally created by Phil Zimmermann. When needing a quick, easy, and free solution to encrypt and decrypt OpenPGP standard files in a SSIS package, GnuPG was the way to go.

Note to Advanced Users : All I am pretty much doing is creating a Execute Process Task, pointing to the GnuPG executable and passing some dynamic cmd args. If you are unaware of this process, read on!

25Aug/120

A connection cannot be made to redirector

I started learning about SQL Server Analysis Services interacting with and using SQL Server Integration Services, and I ran into an issue getting connected to my local server's Analysis Service. The full error message :

A Connection Cannot be made to redirector.Ensure that 'SQL BROWSER' Service is running. No connection could be made because the target machine actively refused it.

First things first though, make sure the service is running.

Start -> Component Services

Then look for the service.

If it's not, let's start it.

Go to SQL Server Configuration Manager

Look for the Sql Server Browser

Right click for the properties, and set the startup mode to manual

Some additional steps/solutions you may want to try

  • Try connecting to the instance using your IP, or localhost instead of a named instance.
  • Make sure there is not another computer on the network with the same name (Has happened with some VMs)
  • Check your firewall permissions
  • Repair your install

If all else fails, go to the MSDN's Resolving Common Connectivity Issues in SQL Server 2005 Analysis Services Connectivity Scenarios. That is where I found a few of these solutions. Take note, read the Error conditions in blue. Those are the general errors with the fixes below.

Hope this helps, or is able to point you in the right direction!

   
%d bloggers like this: