Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7002619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:57:07+00:00 2026-05-27T20:57:07+00:00

I have a package Ninject.Extensisons.Wcf which shall be installed differently depending on the type

  • 0

I have a package Ninject.Extensisons.Wcf which shall be installed differently depending on the type of the project to which it is installed. In the case where WCF is hosted in IIS (any project containing global.asax) a second package Ninject.Web.Common needs to be installed together with the package. For all other project types such as libraries, Console, WinForms, WPF applications this package should not be installed.

Is it somehow possible to achieve this e.g., using a powershell script? Or do I have to deploy two different packages in this case?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:57:07+00:00Added an answer on May 27, 2026 at 8:57 pm

    Unfortunately the current nuspec file does not provide for managing dependencies based on project type. We currently support targeting different framework versions, but that doesn’t apply in your situation.

    It is recommended that all dependencies are handled using package references. Although it would be technically possible to download and install a package using a PowerShell script, this is not supported and will most likely break in future versions.

    First determine if it would actually be a problem to reference a web package in a non-web project. Just because assemblies are referenced, if they are not used, it should not have an impact.

    If it turns out that having the web dependency causes undesirable side-effects, then you’ll need to create separate packages.

    I would split up your package into logical pieces. As you state, you have a package that is used by non-web projects. Web projects require a dependency on a different package.

    So now you have 2 logical packages:

    • MyProject
    • MyProject.Web
      • MyProject (dependencies)
      • SomeOtherPackage

    So a user would Install-Package MyProject for non-web projects, and Install-Package MyProject.Web for web projects.

    At this point you would be done and everything would be fine. But I think you should consider another step. One of the issues I see with these split packages is that I have to figure out which particular package I need to install. I have to know that I need the “Web” version.

    At this point, determine the typical use case for your package. If 90% of your users will be installing the Web version, then I would make a “meta” package that simply has dependencies for your common packages.

    In your case I would make 3 packages:

    • MyProject (meta package)
      • MyProject.Web
    • MyProject.Web
      • MyProject.Core
      • SomeOtherPackage
    • MyProject.Core (common non-web package)

    By creating the “meta” package, you can reserve the “short” package name for the most common case. This meta package only has dependencies to other packages.

    A good example of this is the SignalR package.

    Hope this was helpful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an SSIS package, which depending on a boolean variable, should either go
I have a package which has various features that depend on AUCTeX. As it
I have a package for R which contains several jar files. For better maintenance
I have a package which I've just replaced and the method being called (ASP.NET
I have a package-private interface called AbstractServer which offers three methods: start() , stop()
I'm using Ninject to do dependency injection. I have a userService in which I
I have many Java source files which I need to change their package line
I have .rpm package which is converted from .deb in Ubuntu with alien. In
I have SSIS package which executes several minutes. It copies data to my PROD
In Java they have package access specifier which enables the function to be used

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.