Wednesday, April 30, 2008

"AL.exe" was not found

So, as I said earlier I am setting up CruiseControl.Net to begin my company's journey into Continuous Integration.  My earlier problem is not solved but I have moved on from the 2.0 build to the 3.5 build.

Now, I am not one to get frustrated easily.  I typically keep moving and document my challenges as I go. So I ran my project in CC and I got the following message:

C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets (2083,9): errorMSB3091: Task failed because "AL.exe" was not found, or the correct Microsoft Windows SDK is not installed. The task is looking for "AL.exe" in the "bin" subdirectory beneath the location specified in the InstallationFolder value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0A. You may be able to solve the problem by doing one of the following: 1) Install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5. 2) Install Visual Studio 2008. 3) Manually set the above registry key to the correct location. 4) Pass the correct location into the "ToolPath" parameter of the task.

What is a person to do when presented with options for a solution to a problem?  Well first I did what it said. Or so I thought.  I diligently went to the msdn download center for the Windows SDK for Windows Server 2008 and .Net Framework 3.5 and installed the web installation setup.exe. (pet peeve==Why call an exe setup?  Use words to tell me what it is going to setup. ie.. WinSDK4Win2008and.NetFW3.5Setup.exe - which is what I named it.) After the install, which I thought was complete, I looked to see if it actually installed AL.exe in the said directory.

Nope.

It didn't install AL.exe at all.  Why?  I don't know.  So I thought maybe I didn't install it properly so I downloaded the iso. Mounted it to a virtual disk using UltraISO. Installed everything.  You might think it installed AL.exe in the said directory, but Nope. it did install AL.exe.  But it did it in the v6.1\bin directory.  I thought, ok it is there and the registry key mentioned is slightly different so lets try the build.

Nope.  Didn't work.

So I opened regedit and added the above key by exporting the v6.1 directory to a .reg file and editing that file to be v6.0A. using the path to the v6.1 directory. This is gonna work!

Nope.

So I was confused. What else could be the issue?  So I looked in the directory where AL.exe is and there is a file called al.exe.config.  Hmm? What could that be? I opened it up and here is what it had in it:

<?xml version ="1.0"?>
<configuration>
    <startup>
        <supportedRuntime version="v2.0.50727"/>
    </startup>
</configuration>

Well, It doesn't have an entry for version 3.0 or 3.5.  So I added it. Heehe. No it looked like this:

<?xml version ="1.0"?>
<configuration>
    <startup>
        <supportedRuntime version="v2.0.50727"/>
        <supportedRuntime version="v3.0"/>
        <supportedRuntime version="v3.5"/>
    </startup>
</configuration>

Force a build in CC and low and behold - Green!

I am not sure why Microsoft made me go through all of this but it works now!

Monday, April 28, 2008

New Challenge


So this Monday morning has given me a new challenge that I am looking forward to solving. I began working on moving to CruiseControl.Net and MSBuild for our CI. This is in the very early stages. I decided to use the least resistance path to setting up CruiseControl.


I setup CruiseControl (done this many times at my previous job) without incident. I edited the ccnet.config file to use perforce. I am still getting an error there but went around it by getting latest to my workspace. I'll deal with that later. Created a sample project and solution. Got CC to build it. Hurray, I'm in the clear!

Nope.

I grabbed an existing solution with about ten C++ projects, no external dependencies, and a quick build time inside visual studio. I pointed CC to it and BANG, big fat error:

C:\Projects\CCTestProj\CCTestProj.sln (,): error MSB4018: The "ResolveVCProjectOutput" task failed unexpectedly. System.ArgumentException: Illegal characters in path. at System.IO.Path.CheckInvalidPathChars(String path) at System.IO.Path.IsPathRooted(String path) at Microsoft.Build.Tasks.ResolveVCProjectOutput.ResolveUsingVCEngineObjectModel(ITaskItem projectRef, String configName, String&amp; resolvedAssemblyPath, String&amp; resolvedImportLibraryPath) at Microsoft.Build.Tasks.ResolveVCProjectOutput.Execute() at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode howToExecuteTask, Hashtable projectItemsAvailableToTask, BuildPropertyGroup projectPropertiesAvailableToTask, Boolean&amp; taskClassWasFound)

Names have been changed to protect the innocent.

I thought, Illegal characters in the path? What is this? Visual Studio builds it fine. Why is MSBuild having a problem. So I dug around some. Thought it was related to references or something like that. No path problems could be found. Nothing in the CC log or the MSBuild log was helpful

So I decided to create a new solution and slowly bring in one project at a time to see where the problem lays. I created the solution added an existing project which was the first project in the build order of the original solution. CC built it fine. I grabbed the next project. No problems. I grabbed the third project in the original solution's build order and CC built it without a problem. I was getting nowhere fast.

But then I noticed CC and MSBuild was not building the projects in order. I thought, David you forgot to set the project dependencies in Visual Studio for the solution to build in the right order. There are no direct references but I wanted it to build in the same order as the original solution just in case. So this is where we were at:

Projects build order in original solution:
P1
P2
P3
Project build order in new solution:
P1
P3
P2

So I set in visual studio that P2 depended on P1 and built in VS. Worked. I then forced a build in CC and Viola! Same error as above.

I posted this in the MS forums and waiting for a reply. I am also doing some more experimenting to further define the problem.

Monday, August 27, 2007

Hanselman's Util List

 

Simply the most comprehensive list of must-have's ever.  Every year some are added, others are replaced or removed.  I now have a c:\utils directory full of useful tools that i use often.

Get them all and use them!

Wednesday, January 10, 2007

Ouch! not it! not it!

Man, Steve, you tag hard. So I haven't written an entry since December...

Tangent:  Happy new Year everyone and I hope you all had a great Holiday Season.  Now, get back to work. We have a March 31st Code Complete deadline!

So let me explain what I've been tagged with.  It is something called a blogmeme. This is the blog world's version of a chain letter.  Now I don't make a habit of passing chain letters on so at the end of this I may or may not tag someone else (of course, I have to know someone who blogs to tag, which I don't)

So here it goes, 5 things you don't know about me:

  1. My favorite movie is "It's a Wonderful Life".  Go ahead call me a sap. I don't care.
  2. I am a photography buff and you can see some of my work at bossphoto.net
  3. Some have seen my duet of Meatloaf's Paradise By The Dashboard Lights in which I sing Ellen Foley's part (the girl).
  4. I have a mole in the middle of my back
  5. I'm becoming a huge modern Country Music fan.  Its the only music these days that I can actually understand the lyrics and don't mind my 8 year old son to hear.

Well, that's that! I have decided that I don't know anyone who has a blog so this arm of the game of tag has ended...

Every party needs a pooper...

Tuesday, December 19, 2006

This is scary stuff!

I just read a story that scared the living $#!^ out of me. In this story. written by Ryan Naraine, entitled Hackers Selling Vista Zero-Day Exploits, it says that with $50,000 you could by your way into a Vista hack.  Now, I just installed Vista on one of my home machines to explore how applications react, and ways I might develop applications for that environment, so I noticed and read the story at eWeek.com. 

But, the scary part of the article was not about Vista, it was about this auction that hackers have.  Evidently there is an auction that hackers buy and sell everything from back-doors into software to credit card info including the pin numbers.

Imagine people sitting around bidding on your credit card number and pin that some hacker stole from you because you went to a phishing site and didn't know it.  These people, they buyers and sellers, are the scum of the earth and should be prosecuted to the fullest extent of the law.  No. I take that back.  They should be strung up by their toes, with a vintage 1998 Colorado Tape backup drive hanging from each of their ten fingers until it is determined that they could never write another line of code.  Then they should be neutered so they could never have a child.  They should have an electronic bracelet that would send a shock through their system if they even come close to mouse.

Some people may feel that I am being a little harsh. And maybe I am. But, do you enjoy spending 5 hours at a client's site removing mal-ware?  I don't. if it weren't for Grisoft and with ewido and AVG I would still be there trying to get rid of that trojan!