I am currently working on a project where I am using the NVelocity templating engine, which is a .NET port of the open source Apache Velocity project. So I downloaded the package from SourceForge and dropped the NVelocity.dll file into my /bin folder thinking all would be well. And it was locally, no problems at all. It wasn’t until I went to deploy my Web Application Project that I started to run into issues. It seemed that the .dll had some dependencies that were not documented ( at least not obviously! ) as I was getting the following on publish:
“Could not load file or assembly NVelocity.dll or one of its dependencies. The system cannot find the file specified.”
So I loaded up Dependency Walker to see what was going on and I noticed the following:
Error: Modules with different CPU types were found.
OK, so I am running a x64 system, that can be expected. It also noted that IEShims.dll was missing, though that seemed to be a bit of a redherring. After a while of wading through Dependecy Walker screens and wondering if I had just wasted the past half day of work it dawned on me that I hadn’t even checked NuGet. And lucky enough NVelocity is available as a package there.
So I ran the NuGet package, it installed fine, and it deployed without any issues on the first try!
So the moral of the story is check NuGet first, there are tons of packages available and you might even find something new and interesting.
