Visual Studio 在哪里引用实际的 NuGet 引用的 DLL? [英] Where does Visual Studio is referring the actual NuGet referenced DLL?

查看:46
本文介绍了Visual Studio 在哪里引用实际的 NuGet 引用的 DLL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 NuGet 添加了 Autofac 库,我在我的参考文献中看到了它,如下所示.

但是当我点击 Autofac 的属性 [F4] 时,它在 Visual Studio 中显示空属性框.

另外,我在 packages 文件夹下没有看到 Autofac 文件夹.

我在 .csproj 文件中只看到包引用.那么它是如何定位DLL的呢?实际的 DLL 在哪里?我看到它会自动进入 BIN.它是怎么来的?

主要问题:我可以在本地构建解决方案,但相同的解决方案在 TFS 构建代理上失败.无法找到 NuGet 参考.那么在哪里可以找到 DLL 引用呢?或者如何将其推送到 TFS?

解决方案

假设您使用的是 TFS 2015,NuGet 还原任务名称应为 NuGet Installer,位于 Package 下添加任务时.

所以,如果你已经在构建机器中安装了 Nuget,那么你可以直接使用任务.您还可以为 TFS 2015 构建自定义 nuget.exe -- 只需指定 NuGet.exe 的路径

可以参考

I've added Autofac library using NuGet and I see it in my references as shown below.

But when I check the properties [F4] of Autofac by clicking on it, it shows empty property box in Visual Studio.

Also, I don't see Autofac folder under packages folder.

I see only Package reference in .csproj file. Then how does it locates the DLL? Where is the actual DLL? I see it's automatically coming inside BIN. How does it come?

Main Issue: Locally I'm able to build the solution but same solution fails on TFS build agents. It's unable to find the NuGet reference. So where can I find DLL references? or how to push it to TFS?

解决方案

Assume you are using TFS 2015, the NuGet Restore task name should be NuGet Installer which under Package when you add tasks.

So, if you have installed Nuget in the build machine, then you can use the task directly. You can also custom nuget.exe for TFS 2015 build -- Just specify the Path to NuGet.exe

You can refer to Mummy's blog- Custom nuget.exe for TFS 2015 build for details.

这篇关于Visual Studio 在哪里引用实际的 NuGet 引用的 DLL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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