Design Limbo

Archive for August, 2009

TeamCity + InstallAware + {SmartAssembly} = Win

by Shawn on Aug.05, 2009, under Business, Development

Being one of the only developers on a few projects means that I cannot spend hours configuring builds, managing releases, coordinating builds and the like. I need to spend time refining my product, testing, QA and selling it. I just released a product from my company and tracked how much time it took me, out of a build/revision to get the final installer package ready for distribution. On average I spend about 25% of my time moving files around, running programs, building, waiting and resetting to get the two deliverables out for every build.

Time holes like that one can kill your motivation and your project. As a business owner and developer I need to spend time building my client base, working with customers and refining my product. Major amount of time spent doing anything else could hurt me and my company down the road. I believe this is why a lot of small development shops have trouble or fail completely, they aren’t ready for the marathon, they prepared for the 100 meter dash.

Realizing that I was spending too much time doing work that should be automated I started to look around at the tools I had available to me, low and behold they all look like they could work together. TeamCity is a Build and Continuous Integration Server that free version, the Professional Version, that is perfect for my size. We also use it at my work and a co-worker has it doing some amazing things. So I installed TeamCity on a old piece of hardware I had lying around and got it running. I used NAnt to get the project configured correctly and build.

Once TeamCity was up and running I needed to get my assemblies and executables protected by {SmartAssembly}, which is my .Net Framework code/IP protection tool of choice. {SA} support command line execution so it was a snap calling their command line application from NAnt in my build script.

Finally it was time to build my MSI installer using InstallAware. I’ve gone back and forth on my setup creator for a long time. I’ve used InstallShield, WISE, MSI Factory and others but I just felt comfortable with IA. Although you have to buy the Developer edition to get the ability to do command line building it could be worth it. Also they broke the command line build in 9.0 on purpose which required a UI handle, so it couldn’t be run by a service. Thankfully they fixed it in 9.06, but what a bad mistake. I just added the variables to NAnt and away I went.

The last piece of the puzzle was serving up these completed setup packages. Thankfully TeamCity has the concept of Artifacts, which when I setup are pointed to the setup.exe emitted from InstallAware.

The result? unit tested, compiled, secured and packaged file, ready for QA and release.

image

I love the smell of automation in the morning.

2 Comments :, , , more...

UAC Enable your C# Application

by Shawn on Aug.03, 2009, under Development

I recently ran into an issue with a desktop side application I was developing that did some manipulation against some files in the program files direction. Because of the permissions assigned on that directory a person with UAC turned on couldn’t run the application and was presented with a very nasty .Net exception box.

The fix was to have the application always run in admin mode, removing the permissions issue. With some Googling I determined that all I needed to do was click the “View UAC Settings” button in the Application Properties. But wait, that is VB only apparently.

To get this working what I had to do was add the Application Manifest File from the “Add New Item” dialog.

image 

image

Then once it was added to the solution I opened it up and changed one line from:

image

to

image

I then re-compiled and it was good to go, the little shield appeared on the executable image without any other work required. It too me a few searches before I found anyone that mentioned C# not having the "View UAC Settings” button and you had to add the file manually. It’s a shame that MS is still having VB.Net so drastically different from C# from a Visual Studio UI side in things like that. Apparently they are under the distinct impression that we need to spend more time on ‘plumbing’ and not working on our business logic.

Leave a Comment :, , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...