简体   繁体   中英

Visual Studio: referenced dll file on disk resets after adding it into resources

I want add file reference in assembly in Visual Studio to some file on the hard disk. And also i want place the file in the resources of the project. But after i added file into resources, Visual Studio replace my own file reference to resources directory. Eg i added reference C:/Dir/myfile.dll , Visual Studio replace it with MyProject/Resources/myfile.dll . I need my assembly looking for file at C:/Dir/ location. Obviously, assembly search the file in startup directory first, and crashing if can not find it. Can I forced set my assembly searching order of referenced files?

我可以建议您使用一种变通方法来重命名放入资源中的文件,这至少应该停止覆盖您的库。

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