buildconfiguration

#if debug --> #if myOwnConfig?

蓝咒 提交于 2019-11-30 02:36:42
is there a way in c# to use a custom Configuration like "#if DEBUG" I need a "#if OFFLINE" as my Build-Config's name is "Offline" (only for further debug-purposes too)... Thanks! Build -> Configuration manager -> Active solution configuration -> New... Create a new configuration "Offline". Project -> Properties -> Build -> Configuration -> Offline Conditional compilation symbols: type OFFLINE Save project. Yes, you can. But before you can, follow these steps: In Visual Studio, go to Properties -> Build. At the configuration dropdown, select "Offline" Add "OFFLINE" to the "Conditional

Swift: iOS Deployment Target Command Line Flag

北城余情 提交于 2019-11-29 08:58:26
问题 How do I check the iOS deployment target in a Swift conditional compilation statement? I've tried the following: #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_8_0 // some code here #else // other code here #endif But, the first expression causes the compile error: Expected '&&' or '||' expression 回答1: TL;DR? > Go to 3. Solution 1. Preprocessing in Swift According to Apple documentation on preprocessing directives: The Swift compiler does not include a preprocessor. Instead, it takes

Post build event depending on configuration name in new ASP.NET 5 project

时光总嘲笑我的痴心妄想 提交于 2019-11-29 04:34:48
I'm writing a unified project for 3 smart TVs. I have also 3 configurations created in Visual Studio . Now I want to execute some CLI scripts depending on selected configuration. The problem is in new ASP.NET 5 project I don't have an editor for post build events. I know I have to do this in project.json . What I found is: "scripts": { "postbuild": "" } But using this one I can't create different CLI scripts for different configurations. I found also: "configurations": { }, And I guess this is probably what I want, but... How to use it? Intellisense has no power here and also I wasn't lucky

“the outputpath property is not set for this project” error

ぃ、小莉子 提交于 2019-11-28 04:02:14
I have a multi project solution in Visual Studio 2008. I just added a new Configuration called Release-VersionIncrement to the solution, specifying "use release" configuration as baseline. All project files were updated with that configuration. However, when I am trying to compile a specific project using this configuration, I get the following error: Error 5 The OutputPath property is not set for this project. Please check to make sure that you have specified a valid Configuration/Platform combination. Configuration='Release-VersionIncrement' Platform='AnyCPU' C:\WINDOWS\Microsoft.NET

Android - use ant to create build configurations that change configuration values

不打扰是莪最后的温柔 提交于 2019-11-27 18:52:05
What I want is a way to have settings that are dependent on build configuration. To give a specific example, my android application connects to a web service. In development, I want the service url to be pulled in from a configurable value. In Test, I want a different value pulled in. In production, yet another value. So, in code I have something like this: public class HttpRequestHelper { private static String GetServiceUrl(ServiceAction action) { return serviceUrl + action.toString(); } } By default (when debugging/running through eclipse), I want that url to be http://localhost:1234 In Test

Xcode: TEST vs DEBUG preprocessor macros

ⅰ亾dé卋堺 提交于 2019-11-26 21:56:39
When creating a new project with unit tests, Xcode sets the build configuration to Debug for the Test scheme (same for the Run scheme). Should I differentiate between Run (Command-R) & Test (Command-U) schemes? I.e., should I create a new Build Configuration called Test, add a preprocessor macro TEST=1 to it, and use it as the build configuration for the Test scheme instead? Or, should I just keep Run & Test both as Debug? I come from a Ruby/Rails background, where you usually have test, development, and production environments. It seems to me that Debug is like development and Release is like

Xcode: TEST vs DEBUG preprocessor macros

点点圈 提交于 2019-11-26 08:08:11
问题 When creating a new project with unit tests, Xcode sets the build configuration to Debug for the Test scheme (same for the Run scheme). Should I differentiate between Run (Command-R) & Test (Command-U) schemes? I.e., should I create a new Build Configuration called Test, add a preprocessor macro TEST=1 to it, and use it as the build configuration for the Test scheme instead? Or, should I just keep Run & Test both as Debug? I come from a Ruby/Rails background, where you usually have test,