且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Visual Studio:针对调试和发布模式区分app.config

更新时间:2023-01-02 22:27:03

通过上下文菜单在解决方案资源管理器中卸载项目.

Unload the project in Solution Explorer via the context menu.

通过上下文菜单编辑.csproj文件并添加以下内容:

Edit the .csproj file via the context menu and add this:

<PropertyGroup>
    <AppConfig>App.$(Configuration).config</AppConfig>
</PropertyGroup>