简体   繁体   中英

vistual Studio VB.NET build message

I have a VB.NET solution with only one project inside it, which compiles fine:

But every time to Run it, get ABC.Data.Secure not found.

Note that project is built successfully and run good. I have a hard time finding where this ABC.Data.Secure comes from.

------ 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.

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

Like Claudio said in his comment, you most likely are referencing a DLL that is itself referencing this ABC.Data.Secure. 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.

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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