I want to publish the C# project,Visual Studio 2019 ,WPF.
First, application publish; Second, install the application; Third, a window pops up after the application installation is complete, showing an error: "An error occurred while loading the configuration file"
I want to put the configuration file in the publish application.
[Code in Visual Studio 2019 WPF][2]
(MainWindow.cs)
private void MainWindow_OnContentRendered(object sender, EventArgs e) { // loading the configuration file try { Config = RimageConfig.LoadFromFile("config.json"); } catch { ShowError**("An error occurred while loading the configuration file", Close);** return; }
(config.json) { "Rk": 0.3167,// "Rb": -1.6349, "Rg": 8.6982, "Rt": 200, //"CLeft": 655, //655 "CLeft": 520, //655 "CTop": 120, "CWidth": 2350, "CHeight": 2300, "Pa": 100, "Pb": 30, //"Pa": 255, //"Pb": 0, }