Transformation not applied (web.config)

Mar 7, 2011 at 12:02 PM

Using: Currently running NuGet.exe 1.2.20216.59

I can't get the transformation feature to work on a C# MVC3 app.

I copied the elmah (so I'm sure it works) web.config.transform into my own package, but it's NOT applied when installing the package? But when installing elmah package, the transformation is applied.

Any help?

Ken

Mar 7, 2011 at 12:58 PM

Please check the contents of your package with 7zip or the nuget package explorer to be sure the content files are making it into the package.

Also, I believe the transformations are only applied when you use the powershell console to install. We may have changed this recently though.

Check that both of those are good.

HTH
____
Rob
"Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds
http://ferventcoder.com
http://twitter.com/ferventcoder

Mar 7, 2011 at 1:32 PM

Package contains folder 'content' with file copied file: web.config.transform

 

I only use the powershell console, and not the library ref dialog

 

Thanks

Developer
Mar 7, 2011 at 2:47 PM

Transforms are applied via the console or the dialog, it doesn't matter where the install is run from. Did you unzip the package and verify the contents? You're sure you were installing it into a web project?

Mar 7, 2011 at 7:02 PM

Absolutely sure. I can email you the package. And the MVC3 web project. It's just small examples to try out NuGet.

Mar 7, 2011 at 7:05 PM

I'd suggest unzipping both the Elmah package and yours, and compare the contents. If that doesn't give it away, start with your package being *exactly* the same as Elmah (which we know works), and then change one thing at a time until if no longer works, which should surface the issue.

Mar 7, 2011 at 7:06 PM

Also, make sure you restart VS and clear the IE cache after each attempt to make sure you are not using an old version of your package.

Mar 8, 2011 at 6:37 AM

Ok, after clean cache and restart of VS and IIS (I'm hosting at my own server), it worked. Thanks.

Developer
Mar 8, 2011 at 6:54 AM

FWIW, we fixed a lot of the over caching issues in the next version :).

Mar 8, 2011 at 6:59 AM

Super. That's great. ;-)