I like to write about my technical screw-ups – especially when I am sober enough to remember them (perhaps I have just found the root cause…) as they can serve either as warning not to try something, or as an indicator to my overall competence – I will let you all be judge of which category this rambling fits into.
Anyhow I tried this (sic. the title of this post) the other day with little success.
Normally I would not install any other product on an Exchange Server other than Anti-Virus or Backup software (even in a Lab) – however the situation demanded that I install Visual Studio and Exchange 2010 on the same box.
NOTE: It is important to understand that the work that I was doing was purely in a LAB – I would personally never consider doing this in a production environment.
To give you all a very simple idea of the setup that I am using, I have a 3 Server DAG configuration running on Windows 2008 R2 with Exchange 2010 SP1 RU5 – where on the first Node of the DAG I needed to install VS2010 for some development work.
This did not work out well. In fact it was a complete disaster!
Now I will admit that I had a few problems with the VS installer, as firstly I installed the wrong version of Visual Studio (2008 ~ don’t ask why I did this, I still cannot understand why I made such a basic error, might have something to do with Beer and the amount that I had consumed before I began).
I removed VS 2008, rebooted, and then attempted to install Visual Studio 2010 – which failed to complete several times – as each initial attempt terminated with a more perplexing error message than the last.
Finally (after a lot of perseverance) I managed to get Visual Studio 2010 onto the Server – however it was at this point where my problems really started!
Initially I discovered issues when running Powershell (either running the Exchange Management Shell or just normal PowerShell) – for example; attempting to execute commands such as “Get-MailboxDatabase” or “Get-EventLog”.
Each command would exit throwing an exception, then every subsequent command (any command) would throw an error message about not being able to initialise the thread.
Furthermore when trying to start the EMC, I received an error message about MMC Snap-in registration, after clearing the error dialog box the EMC would then crash out.
Whereas I cannot pin-point the actual cause of the errors (either through losing interest, needing more beer, or running out of time to do some development) – I suspect that by using my “no smoke without fire” troubleshooting principle I concluded that Visual Studio 2010 installs various .NET 4 runtime environments which caused a number of major issues with Exchange 2010 as its preferred run time is 3.5 SP1.
I cannot find anything on the web which provides a direct support stance on Exchange with Visual Studio 2010, however I have found some references to some issues with Exchange servers running .NET 4 in conjunction with Exchange 2010 SP1 here (in the comment section), and here.
Interestingly enough the following article (and table) here suggest that .NET 4 is supported if it is upgraded from 3.5 or 3.5 SP1 – however in my case one would expect that by virtue of the fact of installing VS 2010 with .NET 4 would upgrade the 3.5 runtime – for my situation it appeared not!
However all of the above being said, it does seem that if you (I) install(ed) Visual Studio BEFORE Exchange then VS and .NET 4.0 can run side-by-side with no issues.
Therefore given the above my recommendations on this scenario are:
- As a first option – don’t do it – best practices for Exchange is that no other software should be on the same machine as Exchange (unless it is backup, monitoring or AV related) – my findings would also suggest that .NET 4 should be installed with extreme care on an Exchange 2010 server
- In practice – If you do need to use Visual Studio with Exchange – install it on a dedicated Management Machine with the Exchange Management Tools installed
- If you do need VS on the Exchange Server – do not install it after you have installed Exchange – it seems that you will be asking for trouble
- If you are using VMWARE or any other Virtualisation product and decide that you need Visual Studio / .NET 4 on your Exchange Server – snapshot the machine before you install it (if you are using DAG you might wish to disable replication as restoring a snapshot within a DAG can get messy)
Visually the installation method that I used that did not kill either Exchange or Visual Studio 2010 – looks like the following:
To sign off – It does occur to me that perhaps there are some folks out there that have managed to install Visual Studio 2010 on the same machine as Exchange Server 2010 SP 1 without any issues – which is great – however from my own personal experience it seems like a good idea to either avoid it, or take extra care when doing so, and I hope that above helps.