简体   繁体   English

vistual Studio VB.NET生成消息

[英]vistual Studio VB.NET build message

I have a VB.NET solution with only one project inside it, which compiles fine: 我有一个VB.NET解决方案,其中只有一个项目,可以很好地编译:

But every time to Run it, get ABC.Data.Secure not found. 但是每次运行它时,都找不到ABC.Data.Secure。

Note that project is built successfully and run good. 请注意,项目已成功构建并且运行良好。 I have a hard time finding where this ABC.Data.Secure comes from. 我很难找到此ABC.Data.Secure的来源。

------ Rebuild All started: Project: ABC.Web.UI.MyAPP, Configuration: Debug .NET ------

Preparing resources...
Updating references...
The dependency 'ABC.Data.Secure' could not be found.
Performing main compilation...
Building satellite assemblies...



---------------------- Done ----------------------

    Rebuild All: 2 succeeded, 0 failed, 0 skipped

I search for DHR.Data.Secure in all files inside the solution (including the hidden) but could not find it. 我在解决方案内的所有文件(包括隐藏文件)中搜索DHR.Data.Secure,但找不到它。

==================================================== ================================================== ==

Like Claudio said in his comment, you most likely are referencing a DLL that is itself referencing this ABC.Data.Secure. 就像克劳迪奥(Claudio)在他的评论中所说,您很可能引用的是本身引用此ABC.Data.Secure的DLL。 This won't cause a problem, until a line of code that tries to call something within that assembly is hit and the CLR attempts to locate and load the assembly. 这不会造成问题,直到命中了尝试在该程序集中调用某些内容的代码行,并且CLR尝试找到并加载该程序集为止。

I've had a similar problem in the past, where my application would run fine on my development machine, but crash because of the missing reference. 过去我也遇到过类似的问题,我的应用程序可以在开发机器上正常运行,但是由于缺少参考而崩溃。 While your program isn't crashing, you could use the same technique I did to try and isolate it. 当您的程序没有崩溃时,您可以使用与尝试隔离它相同的技术。 It's pretty simple. 很简单

Remove your references one by one until the error goes away, and you'll now know what assembly is causing this. 逐个删除引用,直到错误消失,现在您将知道导致此错误的程序集。 You might have to hack your program apart to get it to even compile when you're removing the references. 在删除引用时,您可能不得不分开程序才能使其编译。 Make sure it's checked into source control or you're using a copy! 确保已将其签入源代码管理,或者您正在使用副本!

Once you've identified it, you might be able to remove the program's dependancies on this assembly and remove it from your project all together, but that might not be an easy thing to do. 一旦确定了它,就可以删除程序对该程序集的依赖关系,并将其从项目中全部删除,但这并不是一件容易的事。 At least you'll have a better idea why you're getting the error, and maybe clues to help you track down the underlying cause. 至少您将有一个更好的主意, 为什么会出现错误,并可能提供一些线索来帮助您找到根本原因。 Maybe the offending DLL is one of your own? 也许令人讨厌的DLL是您自己的一个?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM