NuGet reference problems (& solution)

So I went to update the project I’m working on to use NLog from NuGet.  It all went swimmingly, until I promoted and went to check out the CI web site.  Low and behold I got a giant YSOD — it said there was a reference problem.  So fine — it wasn’t a big deal — time to roll back to the old 1.0 version.  Once I promoted and built that, everything on the CI site was fine.  Went to check out my local install though, and now it was broken with reference error.  So I did the usual thing:  reset IIS, deleted the temp IIS files, and checked the .dll in the .\bin directory.  And I still got the error.  So time to escalate — I broke out the fusion log.  And it turns out that with my new Windows 7 setup the YSOD and Scott Hanselman’s instructions point to the wrong place.  So stackoverflow to the rescue with this post:

New reg location: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion

Now I found the problem:  NuGet adds a line to the web.config file when you reference a new addin.  This reference was not removed when I deleted the NLog NuGet package, so IIS was trying to load a NLog file that didn’t exist and hence the error.  This also explained why I the CI install was working because I haven’t been promoting my web.config.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s