Thursday, January 31, 2013

The Last 30 Rock

I have only seen a handfull of 30 Rock episodes (not a fan) but this one, the last of the series, was surely the worst.

What the hell just happened?

Wednesday, January 23, 2013

InstallShield 2012: Install .NET If not already installed


I am hoping the free (LE) version of InstallShield 2012 will be adequate for my needs. So far so good.

.NET Framework Dependency
.NET 4.5 ships with Windows 8 but it needs to be installed on Windows 7 which is my current deployment target. InstallShield lets you include this dependency and will even include the standalone redistributable and install it in the installation process.



Now when you build .net 4.5 will be included in the output. Deploy to your target machine Install and you get a prompt to install .net 4.5 then your installer starts up.

NOTE: For .NET 4.5, you will most likely have to reboot, which the installer will ask you todo.

After restart, the installer should pick up where it left off. If not, just fire it up manually.

Saturday, January 19, 2013

Visual Studio 2012 does not provide an installer! Also notes migrating from visual studio 2008 to 2012


What the what! Visual Studio can't build a Windows Setup.exe anymore? This seems ludicrous on the face of it, but there are alternatives. No, my VS 2008 installer project did not work in 2012. I got an 'incompatible' error. Luckily, it wasn't very good so I just dumped and I'm starting over. 


I'm going to give InstallShield a go because its free and I don't think my installer needs are very complicated right now. WiX is the kitchen sink if you need it.

Getting started with InstallShield LE, from MSDN.

Here is a 5 minute video on how to quickly setup Install Shield LE via VS 2010. The audio is brutal, its like Kramer pretending to be the MovieFone audio prompt.

After installing InstallShield LE it makes you restart your computer. Flashback to Windows 98.

Otherwise my solution migrated to VS 2012 with no problems. 

Certificate Problem
Then I did a rebuild I got this error:

Error 1 Cannot import the following key file: . The key file may be password protected. To correct this, try to import the certificate again or import the certificate manually into the current user’s personal certificate store.

I don't know what this means but something on Stackoverflow says its the .pfx file. I found 2 of them and just deleted them from my project.

Then I get this error:

Error 1 Unable to find manifest signing certificate in the certificate store.

Ugh, found a blog entry which solved this by removing certificate signing all together. If I need to sign this application, I'll figure that out later. 

Last thing, switched from .NET 3.5 to 4.5. Just open project Properties and change the framework. Easy enough. I can run the program from VS 2012! 

Now to get the new installer implemented.

Thursday, January 17, 2013

Visual Studio 2012: Setup VisualHG, Mercurial, TortoiseHG and connect to Beanstalk


My current project is a Visual Studio 2008 C# application and I'm using Beanstalk to host the Mercurial repository.

Why Mercurial?
My lack of experience with git led me to Mercurial (aka hg on a *nix system). Mercurial simplifies the command set which, I'm hoping, will reduce the learning curve. Currently, only two people will be touching the source code and overlap should be minimal. I primarily need backup and versioning, merges will be rare.

VisualHG Installing on Visual Studio 2012 on Windows 8
The only real option out there as a Visual Studio plugin for Mercurial is VisualHG. There is a known bug installing with Visual Studio 2012, fix is discussed on the Discussion Board. Basically (after following the VisualHG install directions), you to tell VS to refresh itself by running this from a cmd prompt running as admin:

Windows Key + X -> Command Prompt (Admin)
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv /setup

Configure Mercurial to use Beanstalk
In order to use VisualHG, we have to install and setup Mercurial,TortoiseHg, and PuTTY. Beanstalk has a good guide for this.

PuTTY
The directions in the beanstalk guide are mostly sufficient but for pageant you want to put it in the startup folder.

If your not sure how to add things to the Startup folder in Windows 8, you aren't alone! Instructions here.

I made a shortcut on the desktop for pageant (right click pageant.exe, Send to-> Desktop), then copied the shortcup to the startup folder.

I also made a shortcut to AppData on my Favorites as I'll probably being in here quite a bit while writing apllications targeting the Windows desktop.

SSH Cache
I found one odd thing in the beanstalk guide, the last part regarding SSH Cache

You’ll need to store the Beanstalk host in your SSH cache. Perform this one-time step from the command line:
plink -ssh ssh://hg@username.beanstalkapp.com
Answer “Y” when SSH asks you to “Store key in cache?”

This doesn't work. What does work is (after cd to your PuTTY install directory):
plink -ssh hg@username.beanstalkapp.com
Where 'username' is the prefix of the url to your beanstalk account. http://username.beanstalkapp.com should get you to your beanstalk page.

Connect to Beanstalk
The connection is actually managed by TortoiseHg and beanstalk has a good guide for this as well.

After following these guides I have my repository downloading from beanstalk!

Windows 8 First Things First


First Things First
The very first things I did when my Windows 8 machine was up and running:
  1. Open Internet Explorer in order to download Chrome and Firefox
  2. Removed IE icons everywhere 
  3. Setup Chrome Sync and bam I can easily move between my PC and my Mac 
  4. Removed the Norton crap and turned on Windows Defender. I guess that's adequate, I'm certainly not paying for Norton to clutter up this fresh machine.
  5. Install Evernote and Skitch desktop applications because the Windows 8 Store 'app' version is for a tablet and is pretty useless on a laptop (more on this later)
  6. Install Google Drive
At this point I can do all my everyday tasks on either the PC or Mac without too much headache, everything is in sync.

To Work!
Download Visual Studio 2012 and install it. Still need to setup source control plugins and import source code.

Helpful Hints
Windows 8 does NOT have a traditional Start menu. This takes some getting used to but thankfully there are some very useful keyboard shortcuts. These 3 are my favorites so far.
  • Windows Key + X pulls up a nice context window (thats really hard to get a screenshot of). Quick access to Control Panel, Run, command prompt, System, Desktop to name a few
  • Windows Key + C opens the 'Charms', same as pushing your mouse to the top right corner
  • Windows Key + Q opens the new Start menu and puts the cursor right in the search box, similar to Mission Control on a Mac

Windows 8 Impressions


I'll be giving my thoughts and impressions Windows 8 as I setup my new work machine. It is a Thinkpad T530 with Windows 8 Pro and 8 GB ram Core i7 at 2.40 GHz. My comparisons are based on my previous Windows 7 Dell which was heavily loaded down with corporate IT crap. And of course my MacBook Pro (2009) which is still going strong even though baby pictures and videos have filled my 320 GB hard drive. 

System Info

First impression of the Thinkpad:
  1. This thing is fast!
  2. The keyboard is great. Different from a Mac, but probably just as good
  3. It's a 15" screen, same as the MBP, but the machine is quite a bit larger. This is not for business travel.
  4. The Port Replicator I ordered with it does a fantastic job pushing video over USB to my DVI monitor