Archive for Visual Studio

Using Visual Studio 2010 CTP with VMWare

// April 30th, 2009 // No Comments » // .Net, VMWare, Visual Studio

I recently need to run Visual Studio 2010 October 2008 CTP with VMWare since Microsoft Virtual PC can’t handle USB at all. For my company that is a big limitation since we have hardware locks that sits in the USB port. VMWare to the rescue!

Step one is to convert the Virtual PC image to an VMWare image. Luckily that’s an fairly easy process, if you are a lucky owner of VMWare Workstation. If not, there is a free converter tool to download from the VMWare site, but I have not tried that one for myself since I have VMWare Workstation here. Follow these steps to convert the image:

1. File -> Import or Export -> Next -> Next
2. Source Type = Other -> Next
3. Virtual Machine = select the VPC image -> Next -> then wait, takes a while
4. Source Data = Convert all disks and maintain size -> Next -> Next
5. Destination = Other Virtual Machine -> Next
6. Virtual Machine Name = whatever -> Location = Choose path -> Next
7. Import and convert (full clone) -> Next -> then wait, takes a while
8. Bridged network -> Next -> Next
9. Finish!
10. Wait for the conversion to complete. Mine took around 30 min.

Ok, that wasn’t too hard, eh? Most of the steps are the default values in the wizard. So, now we have a shiny new VMWare image ready to boot. And it will boot just fine. The “minor” problem is that the CTP expired Jan 1 2009. WT*? And there is no new CTP out yet, so what to do? You need to set back the date in the image and make sure that neither VMWare nor Vista override that setting with automatic synchronization of the date and time. After a LOT of googling and finugeling and trickery I finally got it right. Find the .vmx file for you VMWare image and add the following lines:

rtc.startTime = 1226188800
tools.syncTime = "FALSE"
time.synchronize.continue = false
time.synchronize.restore = false
time.synchronize.resume.disk = false
time.synchronize.resume.memory = false
time.synchronize.shrink = false
time.synchronize.tools.startup = FALSE

Make sure you don’t have duplicate entries. If you do, VMWare will whine when you try to boot. The cryptic number 1226188800 is a UNIX timestamp that equals Nov 09 2009, which is well within the expiration limits for the CTP.

Only a few more things to be aware of, then you should be all set. After you boot, go into the date and time settings in Vista and make sure that the “internet time synchronization” is turned off. Install VMWare tools (if it is not already there) and then go to it’s settings and double check that the time synchronization is turned off there too.

Phew! If you carefully followed the steps outlined here you will be able to run the CTP for ETERNITY! Why anyone would actually do that is beyond me, but hey, who am I to judge?

If this helped you in any way, please let me know in the comments. Thanks!

Solving Visual Studio’s trust issues

// April 8th, 2009 // No Comments » // .Net, Security, Troublesolving, Visual Studio

I use Subversion for all my code. I also like to keep my checked out code on a mapped network share since it has backup and is accessible from outside my main dev machine. With this setup you will sooner or later (probably sooner) run into the problem with Visual Studio not trusting the network share, and subsequently hitting you in the face and kicking you in the groin. To make our beloved studio behave more decent, I executed the following line of goodness into a Visual Studio Command Prompt:

caspol -machine -addgroup 1 -url file://h:/* FullTrust -name DevShare

This will put the mapped drive “h:” in the “Full Trust” group. Just replace the drive name (and perhaps choose another name than “DevShare”) with your specifics, and you should be good to go! Hopefully this will help someone. If not, you could check out the following post on StackOverflow.