.NET没有在PATH为我的C#DLL搜索 [英] .NET does not search in PATH for my C# DLL

查看:96
本文介绍了.NET没有在PATH为我的C#DLL搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个C#DLL说DLL1由另一个C#中引用的DLL说DLL2。该路径DLL1指定的ENV变量PATH。当我尝试编译DLL 2,在DLL2报告错误,它找不到装配DLL1。我不知道我怎么能做到这一点我以为路径由NET的DLL搜索中使用。

I have a C# dll say dll1 that is referenced by another C# dll say dll2 . The path to dll1 is specified in the env variable PATH. when I try to compile dll2 , the dll2 reports error that it could not find the assembly dll1. I am not sure how I can make this happen I thought PATH was used in Dll search by .Net.

等待一些有用的建议

谢谢 Karandeep马利克

Thanks Karandeep Malik

推荐答案

路径是不搜索的。 MSDN上这文章介绍了如何在运行时定位组件。

The PATH is not searched at all. This article on msdn explains how the runtime locates assemblies.

这篇关于.NET没有在PATH为我的C#DLL搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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