How to select different app.config for several build configurations
来源:互联网 发布:阿里云备案账号是什么 编辑:程序博客网 时间:2024/05/19 01:31
1. How to select different app.config for several build configurations
http://stackoverflow.com/questions/8082662/how-to-select-different-app-config-for-several-build-configurations?rq=1
You can try the following approach:
- Right-click on the project in Solution Explorer and select Unload Project.
- The project will be unloaded. Right-click on the project again and select Edit <YourProjectName>.csproj.
- Now you can edit the project file inside Visual Studio.
- Locate the place in *.csproj file where your application configuration file is included. It will look like:
<ItemGroup> <None Include="App.config"/> </ItemGroup>
- Replace this lines with following:
<ItemGroup Condition=" '$(Configuration)' == 'Debug' "> <None Include="App.Debug.config"/> </ItemGroup> <ItemGroup Condition=" '$(Configuration)' == 'Release' "> <None Include="App.Release.config"/> </ItemGroup>
I have not tried this approach to app.config
files, but it worked fine with other items of Visual Studio projects. You can customize the build process in almost any way you like. Anyway, let me know the result.
2. Calling methods from different Projects in one Solution
You need to add a reference to the 3rd project in your 1st project. To do this, right-click on your project, select "Add Reference," then select the project in your solution. Once your main project references the 3rd project, then you can access its public types.
- How to select different app.config for several build configurations
- Xcode 8 can't compile using different app group IDs for different configurations
- How to config languages when build BSP
- How to change appname or app icon for different flavor version?
- How to build OpenOCD for windows
- How to Build FFmpeg for Android
- How to build Android adb for ARM
- How to build Android adb for ARM .
- How to Build FFmpeg for Android
- How to Build FFmpeg for Android
- How to Build FFmpeg for Android
- How To Build CyanogenMod Android for smartphone
- how to build DLIB for iOS
- How to config spring objects in app.config
- how to book-keeping Gain/Loss for different Securities
- How to build kernel for Beaglebone for custom cape support
- How to use App.Config in WPF applications
- How to: subversion build number in your Android app
- PHP正则提取或替换img标记属性
- ImageViewLoader学习
- 解决ubuntu12.04下eclipse3.7启动问题--Could not load SWT library
- 消除关于.NET的四个误解
- webkit内核源代码导读2: FrameLoader的初步分析
- How to select different app.config for several build configurations
- SGU142 Keyword
- Android 开发常用代码片段
- 1.2 JavaScript流程控制
- dudu kan
- PHP超全局变量:$_SERVER
- webui框架的利与弊
- 1.2 JavaScript运算符
- HTML5 移动Web的离线应用 applicationCache & manifest - 3