videomili.blogg.se

Locad configuration from vshost.exe.config
Locad configuration from vshost.exe.config







Locad configuration from vshost.exe.config windows#

It doesn't seem to be caused by the project type, since we're able to reproduce the issue with a Console Application as well as a Windows Forms Application.Īlternatively, could we use another solution to manage the configuration for each of our environment? Net Framework 4.5.1, but we also reproduced the problem with. To add to the confusion, we created multiple test projects, using the same AfterBuild target, and some of them work correctly, others don't. The same problem happens whether we try to Start with the Debug configuration or the Test configuration. We tried cleaning the solution, performing a Rebuild before debugging, manually deleting the bin\. file before launching, but it seems that the hosting process always copies the configuration from the default App.config file. However, if we Start the application from Visual Studio, with the Visual Studio hosting process, the correct configuration is copied to bin\.exe.config, but it seems that Visual Studio doesn't copy the correct configuration to bin\. The goal of the AfterBuild target is to replace the Release configuration ( App.config) when building/executing with the Debug configuration ( nfig) or the Test configuration ( nfig).Įverything works as intended when we publish the application (Release, App.config) or if we build the application and launch the bin\.exe (Debug or Test). In the nfig file, we store the configuration for our user-acceptance environment. In the nfig file, we store the configuration for our local debugging needs. In the App.config file, we store the configuration for our Release environment. Test is a pre-production environment used for user-acceptance tests. Debug is the local debugging configuration. We're using an AfterBuild target in the vbproj to replace the config file depending on the selected configuration : Īs an example, let's say we have 3 configurations : Debug, Test, Release.







Locad configuration from vshost.exe.config