The program loads dll files from a subfolder. In debug in Visual Studio Professional 2022 it runs, as it should, but in release mode the following line throws the inner exception "Invalid URI: The URI is Empty"
OB = Activator.CreateInstance(t, con.getConnection());
OB
is an Object
variable t
is a type variable, which is "service", a class I wrote and is defined in the dlls con.getConnection()
is a Databaseconnection
It also works for prior dlls but for new ones it throws the error.
I compared the working dlls with the broken ones.
I found the problem on my own. My program pointed on the wrong Database in Release Mode, where the URI is saved, which occure the error
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.