conditional installation

Mar 29, 2012 at 8:52 AM

I would like nuget installs different binaries depending on the version of the Mvc project it is in, ie. different dlls depending if the environment is Mvc2, Mvc3, or Mvc 4 beta. How can I check the kind of project the package is going to be installed in? Nuget offers the easy opportunity do choose the dll to install according to the target .Net version, but what about other properties of a project? How can I chem them?

Developer
Mar 29, 2012 at 7:41 PM
Nuget won't give this level of granularity. The best you can do us write powershell to sniff the project type guid abs write logic to copy files or do whatever it is yiu want to.

Sent from my Windows Phone

From: frankabbruzzese
Sent: 3/29/2012 12:53 AM
To: David Fowler
Subject: conditional installation [nuget:350435]

From: frankabbruzzese

I would like nuget installs different binaries depending on the version of the Mvc project it is in, ie. different dlls depending if the environment is Mvc2, Mvc3, or Mvc 4 beta. How can I check the kind of project the package is going to be installed in? Nuget offers the easy opportunity do choose the dll to install according to the target .Net version, but what about other properties of a project? How can I chem them?

Mar 30, 2012 at 3:56 PM

mmm If I have to sniff the project Guid I prefer to sniff the version of the Mvc library that is referenced in the project(), it is more close to what I need. It is more a matter of binary incompatibilities than of project structure....Hope there is an easy enough way to do this.

Developer
Mar 30, 2012 at 7:00 PM
Sure, regardless, you have to write custom powershell logic.

Sent from my Windows Phone

From: frankabbruzzese
Sent: 3/30/2012 7:57 AM
To: David Fowler
Subject: Re: conditional installation [nuget:350435]

From: frankabbruzzese

mmm If I have to sniff the project Guid I prefer to sniff the version of the Mvc library that is referenced in the project(), it is more close to what I need. It is more a matter of binary incompatibilities than of project structure....Hope there is an easy enough way to do this.

Apr 1, 2012 at 1:56 PM

Done. I sniffed the MajorVersion of the Mvc reference to decide which dll to install...and it is working.

Thanks

Apr 3, 2012 at 11:03 AM
Edited May 3, 2012 at 10:16 AM
Hi, dffowler there
 sorry for being new here. Where can I save the custom logic and restore it?

dfowler wrote:
Sure, regardless, you have to write custom powershell logic.

Sent from my Windows Phone

From: frankabbruzzese
Sent: 3/30/2012 7:57 AM
To: David Fowler
Subject: Re: conditional installation [nuget:350435]

From: frankabbruzzese

mmm If I have to sniff the project Guide I prefer to sniff the version of the Mvc library that is referenced in the project(), it is more close to what I need. It is more a matter of binary incompatibilities than of project structure....Hope there is an easy enough way to do this.