@@ -132,7 +132,7 @@ module Tooling =
132
132
let targetLocation = " build/tools/nuget/nuget.exe"
133
133
if ( not ( File.Exists targetLocation))
134
134
then
135
- trace " Nuget not found %s . Downloading now"
135
+ trace ( sprintf " Nuget not found at %s . Downloading now" targetLocation )
136
136
let url = " http://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
137
137
Directory.CreateDirectory( " build/tools/nuget" ) |> ignore
138
138
use webClient = new WebClient()
@@ -209,16 +209,16 @@ module Tooling =
209
209
210
210
let DotNet = new DotNetTooling( " dotnet.exe" )
211
211
212
- type DotNetFrameworkIdentifier = { MSBuild: string ; Nuget: string ; }
212
+ type DotNetFrameworkIdentifier = { MSBuild: string ; Nuget: string ; DefineConstants : string ; }
213
213
214
214
type DotNetFramework =
215
215
| Net45
216
216
| Net46
217
217
static member All = [ Net45; Net46]
218
218
member this.Identifier =
219
219
match this with
220
- | Net45 -> { MSBuild = " v4.5" ; Nuget = " net45" ; }
221
- | Net46 -> { MSBuild = " v4.6" ; Nuget = " net46" ; }
220
+ | Net45 -> { MSBuild = " v4.5" ; Nuget = " net45" ; DefineConstants = " TRACE;NET45 " ; }
221
+ | Net46 -> { MSBuild = " v4.6" ; Nuget = " net46" ; DefineConstants = " TRACE;NET46 " ; }
222
222
223
223
type MsBuildTooling () =
224
224
let msbuildProperties = [
@@ -227,6 +227,11 @@ module Tooling =
227
227
]
228
228
229
229
member this.Exec output target framework projects =
230
- MSBuild output target ( msbuildProperties |> List.append [( " TargetFrameworkVersion" , framework.MSBuild)]) projects |> ignore
230
+ let properties = msbuildProperties
231
+ |> List.append [
232
+ ( " TargetFrameworkVersion" , framework.MSBuild);
233
+ ( " DefineConstants" , framework.DefineConstants)
234
+ ]
235
+ MSBuild output target properties projects |> ignore
231
236
232
237
let MsBuild = new MsBuildTooling()
0 commit comments