Microsoft.Practices.Unity 包在哪里?

Where is Microsoft.Practices.Unity package?(Microsoft.Practices.Unity 包在哪里?)
本文介绍了Microsoft.Practices.Unity 包在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个小时前,我为我正在研究的解决方案更新了我的 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

它位于

packagesUnity.4.0.1lib
et45Microsoft.Practices.Unity.dll 

您可能只需要添加对此程序集的引用.

You probably just need to add a reference to this assembly.

这篇关于Microsoft.Practices.Unity 包在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)