Program D is missing--in-depth understanding of "unhandled FileNotFoundException"

Source: Internet
Author: User

In the machine room when the length will encounter such problems under such a problem, in fact, can not load D layer, in solving the problem also found a lot.


First of all, to understand what our program's folder is, each layer of folder open includes the bin and obj folders.

Bin is the abbreviation of binary, Chinese meaning is binary meaning. This means that the final binary executable is generated under this folder.

Each layer of the room that is done in VS is compiled to generate a dll,dll executable file can also be understood as an assembly.

OBJ is an abbreviation for object that holds temporary files generated by the authoring process.


The following is a structural diagram of the machine room reconfiguration:



What kind of DLL does the Bin/debug folder have in each layer?
u: BLL,DAL, Entity, faced, factory, Idal
faced: Faced, BLL, Entity, Factory, Idal
in the BLL: BLL, Entity, Factory, Idal
Factory: Factory, Entity, Idal
idal: Entity, Idal
When a reference is added to VS, there will be added direct references and indirectly referenced DLLs in the corresponding bin file, for example, in the U layer we only add references to B layer, entity layer, faced layer, so there are three DLLs under the bin of the U layer. However, in the Bin folder there will be Idal and factory DLLs, the latter two are indirect references added.
at the same time we will find that only in the U layer has the DAL other layers are not, this shows that the DAL in the U layer is not added by indirect reference, and the DAL layer is the implementation of the Idal layer does not have any layer of reference d layer, so there is no DAL layer in other layers, The DAL in the U-layer is because the output path of the DAL layer in VS is the bin/debug of the U layer. and the D-Layer output path must also be the U-layer, or you will be prompted as above error.
because we set the U-Layer as the startup item in the reconstructed room, it starts from the U layer when the program is run and looks for the DLLs in each layer from the U layer. If the output path of the D layer is not the Bin/debug folder of the U-layer, and because there are no layers to the D-layer reference, then the DLL in the U-layer can not find the DAL layer will error.
the way to prevent such errors is to set the output path of the D layer to the Bin/debug folder on the U-level.

Program D is missing--in-depth understanding of "unhandled FileNotFoundException"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.