c# - Illegal character in path in released version but not in debug mode -


enter image description heretl;dr why when running debug mode application works in release not?

i using mvvm load file path process data. when using debugger version loads, validates , converts fine, when using published/released version fails unable track occurs. 1 note tried accompanied long file paths included @"\\?\" attached our converter.

    public static string checkfilepath(string filepath)     {         //network location         if (filepath.startswith(@"\\"))         {             filepath = filepath.trimstart(@"\\".tochararray());             return @"\\?\unc\" + filepath;         }         //local location         if (!filepath.startswith(@"\\?\") && (!filepath.startswith(@"\\") || !filepath.startswith(@"\\?\unc\")))         {             return @"\\?\" + filepath;         }         return filepath;     } 

also we're using 4.6.2 , using try , accomodate long file paths. please note converter check see if has @"\\?\" or @"\\" , replaces following required long path. converter may not problem... great!

alright help, found workaround. turns out there wrong published version versus release version kind of jdweng said. if run executable release works, when try install via publish, not.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -