@@ -132,7 +132,7 @@ module Tooling =
132132 let targetLocation = " build/tools/nuget/nuget.exe"
133133 if ( not ( File.Exists targetLocation))
134134 then
135- trace " Nuget not found %s . Downloading now"
135+ trace ( sprintf " Nuget not found at %s . Downloading now" targetLocation )
136136 let url = " http://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
137137 Directory.CreateDirectory( " build/tools/nuget" ) |> ignore
138138 use webClient = new WebClient()
@@ -209,16 +209,16 @@ module Tooling =
209209
210210 let DotNet = new DotNetTooling( " dotnet.exe" )
211211
212- type DotNetFrameworkIdentifier = { MSBuild: string ; Nuget: string ; }
212+ type DotNetFrameworkIdentifier = { MSBuild: string ; Nuget: string ; DefineConstants : string ; }
213213
214214 type DotNetFramework =
215215 | Net45
216216 | Net46
217217 static member All = [ Net45; Net46]
218218 member this.Identifier =
219219 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 " ; }
222222
223223 type MsBuildTooling () =
224224 let msbuildProperties = [
@@ -227,6 +227,11 @@ module Tooling =
227227 ]
228228
229229 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
231236
232237 let MsBuild = new MsBuildTooling()
0 commit comments