Microsoft.Practices.Unity软件包在哪里? [英] Where is Microsoft.Practices.Unity package?
问题描述
一个小时前,我为正在使用的解决方案更新了nuget软件包,并收到了Unity抛出的错误消息,即
An hour ago I updated my nuget packages for the solution I'm working on and I get the error message, thrown by Unity, that
类型'IUnityContainer'是在未定义的程序集中定义的参考.您必须添加对程序集的引用'Microsoft.Practices.Unity,版本= 4.0.0.0,文化=中性,PublicKeyToken = 6d32ff45e0ccc69f'.
The type 'IUnityContainer' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Practices.Unity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=6d32ff45e0ccc69f'.
从那时起,我一直在搜寻有关此软件包位置的一些有用信息.有关该问题的文章较旧,涉及2.x版本.
Since then I have been googling to get some usable information about that where this package is. The articles, question around it are old, deals with 2.x version.
Nuget中没有这样的软件包.
There is no such package in Nuget.
我从Unity堆栈中安装了以下软件包:
I have the packages listed below from Unity stack installed:
<package id="Unity" version="4.0.2" targetFramework="net452" />
<package id="Unity.ServiceLocator" version="2.0.0" targetFramework="net452" />
<package id="Unity.WebAPI" version="5.2.3" targetFramework="net452" />
感谢您的帮助!
推荐答案
添加nuget后
Install-Package Unity
它位于
packages\Unity.4.0.1\lib\net45\Microsoft.Practices.Unity.dll
您可能只需要添加对此程序集的引用即可.
You probably just need to add a reference to this assembly.
这篇关于Microsoft.Practices.Unity软件包在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!