-
Notifications
You must be signed in to change notification settings - Fork 224
Figure out debug and release builds #73
Comments
Do we want to also thing about the other things that go along with build configurations? E.g. config transformations (not that we necessarily want transformations) to decide/modify/set/unset different config values? E.g. time-outs for things might be longer, or we'd set customErrors=on/off/meme, etc.. Or maybe it's problematic if we conflate a "debug" vs. "release" build with different deployment settings? Anyway I'm just spewing out some thoughts so that I'll remember this when it comes time to discuss. |
Nope, this is mostly about compiler settings. Things you're talking about are in the application layer. Today in VS Debug/Release configuration just means, "use these compiler settings". Right now our project.json pivots on target framework because it maps directly to nuget folders. We don't have a way (neither does nuget), to target debug/release builds within a single nuget package. |
Today in VS debug/release runs web.config.transforms too for Debug/Release, doesn't it? |
Yep, and that's a mistake. |
OK good then we're in agreement 😄 |
Related to #235 |
I'll take a first pass at this, adding a parameter to build that will allow building debug/release builds. |
Proposal 1:{
"frameworks": {
"net45": {
"compilationOptions": {
"define": [ "ALWAYS" ]
},
"dependencies": {
"Newtonsoft.Json": "5.0.8"
},
"configurations": {
"debug": {
"compilationOptions": {
"define": [ "DEBUG", "TRACE" ],
"optimize": false,
"debugSymbols": "full"
}
},
"release": {
"compilationOptions": {
"define": [ "RELEASE", "TRACE" ],
"optimize": true,
"debugSymbols": "pdbOnly"
}
}
}
}
}
} Proposal 2:{
"dependencies": { },
"configurations": {
"net45": {
"compilationOptions": {
"define": [ "ALWAYS" ]
},
"dependencies": {
"Newtonsoft.Json": "5.0.8"
}
},
"net45|debug": {
"compilationOptions": {
"define": [ "DEBUG", "TRACE" ],
"optimize": false,
"debugSymbols": "full"
}
},
"net45|release": {
"compilationOptions": {
"define": [ "RELEASE", "TRACE" ],
"optimize": true,
"debugSymbols": "pdbOnly"
}
}
}
} Proposal 3{
"compilationOptions": {
"define": [ "ALWAYS" ]
},
"configurations": {
"debug": {
"compilationOptions": {
"define": [ "DEBUG" ],
"optimize": false,
"debugSymbols": "full"
},
"release": {
"compilationOptions": {
"define": [ "RELEASE" ],
"optimize": true,
"debugSymbols": "pdbOnly"
}
}
},
"frameworks": {
"net45": {
"compilationOptions": {
"define": [ "NET45_ALWAYS" ]
},
"configurations": {
"debug": {
"compilationOptions": {
"define": [ "NET45_DEBUG" ]
}
}
}
}
}
} This proposal puts target frameworks into a separate node instead of baking it into the configurations node. KPM Changes
K Changes
DefaultsThe roslyn compiler will have known defaults for the debug/release configurations: Debug: {
"compilationOptions": {
"define": [ "DEBUG", "TRACE" ],
"optimize": false,
"debugSymbols": "full"
}
} Release {
"compilationOptions": {
"define": [ "RELEASE", "TRACE" ],
"optimize": true,
"debugSymbols": "pdbOnly"
}
} When doing a regular kpm build, it will default to debug for configurations: {
"configurations": {
"debug": { },
"release": { }
},
"frameworks": {
"net45": { },
"k10": { }
}
}
Open questions:
|
I prefer proposal 1, to avoid combinatorial explosion, which I currently Rafael Teixeira On Tue, Jul 8, 2014 at 5:46 AM, David Fowler [email protected]
|
I'm leaning towards 3 |
Proposal 3 was implemented |
Today we don't have a way to specify debug or release. We need something here.
The text was updated successfully, but these errors were encountered: