0

We have to deploy our web project on several (possible 10) servers , We've developed Nant script that doing the Job , but We've face with problem , that Microsoft.Web.Infrastructure.dll that is one of the dependencies doesn't deployed what ever we do.

Could anyone please explain how can add reference to this dll , and mark it copy local or something ? I'll try to explain what's hapening , when I am adding reference to this dll to our proj , the reference added to web.config like :

<assemblies>
    <add assembly .... blah blah />
</assemblies>

This means that assembly should be in GAC , right ? I can see it well if I am clicking on Property Pages in visual studio , and going to refereces tab , I can see that this Dll is in Gac.

Ok , the following command

gacutil.exe -l Microsoft.Web.Infrastructure returns with no Result !

So where is this assembly stored ? How the magic is done by Microsoft ???

How can I remove it from GAC ???

Anyone ?

PS. One of the possible resolutions that I've found on web. Is to run Package Manager and install it from there again ... but for me it's not a options , we aren't connected to internet for security reasons.

4

2 回答 2

0

如果您已经针对 MVC 开发并假设它安装在 GAC 中,为什么不直接通过http://www.asp.net/mvc/mvc3将它安装在目标服务器上

如果您有一个 proj 文件可以使用,但您没有选择一个全是 sln 和 web.config 的网站项目,则复制本地解决方案非常棒。

您可以通过您的网站属性页面添加参考(来自您的 nuget 包)您听起来好像您已经拥有 nuget 包,但如果没有,您只需右键单击 bin 文件夹并管理包 - Microsoft.Web.Infrastructure - 安装如果添加这个对 bin 文件夹的包引用,您将看到一个新文件:bin\Microsoft.Web.Infrastructure.dll.refresh

这仅包含包中实际 dll 的链接 -..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll

该 dll 将在构建时被复制到 bin 文件夹中。

于 2013-08-19T10:05:44.590 回答
0

我建议您使用 webmatrix / web 平台安装程序在每台服务器上安装 DLL。

于 2013-08-19T10:16:51.047 回答