This morning I fired up Google Reader and was excited to see
this post on
DotNetKicks
about a new "Image Generator" control in ASP.NET 3.5. I do a fair
amount of image manipulation for my current position, and displaying
images to clients is always an issue. Currently, we're using a Java
viewer that works nicely on the client, once it's been finally loaded in the browser. Unfortunately, the load time is prohibitive, what with a nearly 1.5 MB download, not to mention the time it takes for the JRE to fire up and load the plugin. So I'm always on the lookout for new ways to display images in a browser. This tool is advertised as a "speedy way of generating, transforming, caching images in ASP.net." All right! I've worked with several APIs that are available from various vendors, and though a couple of them have solutions that are quite good, a freely available tool would be great. I hurried over to CodePlex and
downloaded the assembly and examples.
One thing I always find strange about downloading stuff from CodePlex is that I often have trouble figuring out where to put it. Like many developers, I'm sure, I have a huge directory tree packed with all of my code, which is organized to me, but would probably be impossible to dig through for anyone else. After downloading, I attempted to drop the assembly into the GAC, but got the ubiquitous "Assembly <xxx> is required to be strongly named" error. OK, then. I settled on creating a "strongly named" folder in my code-maze, dropped the DLL into it, and created a website project to play around with it. Then I remembered the sample projects, and happily using my new two-monitor setup at work (finally!!), I opened the example "SimpleGeneratedImage" website on one monitor and my test project on the other. After jockeying the referenced assembly to get it pointed at the right file, I F5'd the example project and was a little startled to see this error:
Could not load file or assembly 'System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Hmmm, I don't see that reference anywhere. Ah, there it is, in the web.config. OK, what the hell is that guy? As you can probably tell by now, I haven't had the time to keep up with the super-huge pink elephant sitting in the middle of the virtual ASP.NET room that is
MVC. So I plugged "System.Web.Abstractions" into a Google search and the first hit I get is
Microsoft's page for ASP.NET MVC Preview 2. Ah ha. I have done a little poking around on the MVC framework, but always get interrupted with "real" work. I do know enough that CodePlex is probably a good place to start. So I headed back over to CodePlex's ASP.NET section and found
a download for ASP.NET MVC CodePlex Preview 4, which I figured would suffice, since 4 > 2. Upon clicking the link for the application download and agreeing to the license, I watched Firefox download an .msi file. Awesome! An MSI! Someone had the brilliant idea of creating a deployment project to simplify the integration for me, the lowly tool user! I happily ran the MSI and watched the install, then switched back to my VS2008 IDE with the sample project loaded and rebuilt.
Could not load file or assembly 'System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
What the hell? Shouldn't the MSI have taken care of all of this? Maybe I have the wrong MSI? Wait, it didn't even ask me where to install itself. I find the install folder in Program Files\Microsoft ASP.NET\ASP.NET MVC CodePlex Preview 4\Assemblies, and there's the elusive System.Web.Abstractions.dll. I switch to view my GAC, assuming I'd find the files registered there. Nope. OK, then, I'll do it the old fashioned way. I gacutil the three "System" DLL's, and they don't give me any "strong naming" issues and appear to register fine. Except, I notice that the version on the System.Web.Abstractions assembly is "0.0.0.0." Hmm, that's odd. Must be a weird refresh thing. I switch back to my IDE and rebuild.
Could not load file or assembly 'System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
|
Son of a bitch! |
Now, I know this isn't really a big deal, but it really burns my ass that these uber-developers can't take a few minutes and 1) let me know that there are prerequisites and 2) make an MSI file that actually does
something. This issue keeps coming up for me with the various plugins and toolkits I "install." In a deadline-driven developing world, I do as much as I can to keep up with emerging patterns and practices. But when I run into roadblocks that could be eradicated with some simple forethought by the developing team, it stifles my ability (and my desire) to use this stuff. I understand that CodePlex is generally for open-source, bleeding edge code that might eventually get included in the framework, and hence isn't "polished." But when did developers forget that their audience is probably going to like them a lot more if they make their stuff easy to integrate?
After complaining more to a
friend, he made me feel really stupid by pointing out that I just needed to install
.Net 3.5 SP1. After this install, I was able to build everything just fine. Of course, I haven't had the time to actually do anything with it. So, lesson learned: When downloading and installing stuff from CodePlex,
make sure the framework is the latest and greatest.