的NuGet包:使用不同的MVC版本可用时 [英] Nuget Package: Use Different MVC Version When Available

查看:171
本文介绍了的NuGet包:使用不同的MVC版本可用时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个开放源码的NuGet包 AttributeRouting 。目前,包装组件参考System.Web.Mvc第2版。我想引用MVC 3/4在MVC 3/4的项目,因此,Windows 8 / VS 2011的用户没有安装MVC 2使用包。任何人都知道的一种方式做到这一点?谷歌已经不是我的朋友。

I've got an open source nuget package AttributeRouting. Currently the packaged assemblies reference System.Web.Mvc version 2. I'd like to reference MVC 3/4 in MVC 3/4 projects, so that users of Windows 8/VS 2011 don't have to install MVC 2 to use the package. Anyone know of a way to do this? Google has not been my friend.

推荐答案

目前,的NuGet无法做到这一点。这就是为什么有在的NuGet库库的独立MVC2和MVC3包。

Current, Nuget can't do this. This is why there are separate MVC2 and MVC3 packages of libraries in the Nuget gallery.

所以,你必须创建一个单独的NuGet包MVC3和MVC4(如有必要)

So you have to create a separate Nuget package for MVC3 and MVC4 (if necessary)

这篇关于的NuGet包:使用不同的MVC版本可用时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆