diff --git a/Build/build.fsx b/Build/build.fsx index 28fad9c48..48bf64e61 100644 --- a/Build/build.fsx +++ b/Build/build.fsx @@ -264,6 +264,13 @@ Target "BuildMonoSamples" (fun _ -> info.WorkingDirectory <- "." info.Arguments <- (@"-debug -out:./_Mono/Sample1/Sample1.exe .\Sample1\Program.cs")) (TimeSpan.FromMinutes 5.0) if result <> 0 then failwith "Mono compilation failed" + + // Fix up symbol file to have the MVId emitted by the System.Reflection.Emit code + let assembly = System.Reflection.Assembly.ReflectionOnlyLoadFrom (FullName "./_Mono/Sample1/Sample1.exe") + let mvid = assembly.ManifestModule.ModuleVersionId.ToByteArray(); + let symbols = System.IO.File.ReadAllBytes("./_Mono/Sample1/Sample1.exe.mdb") + mvid|> Array.iteri (fun i x -> symbols.[i+16] <- x) + System.IO.File.WriteAllBytes("./_Mono/Sample1/Sample1.exe.mdb", symbols) ) let SimpleInstrumentingRun (samplePath:string) (binaryPath:string) (reportSigil:string) = diff --git a/MCS/MCS.fsproj b/MCS/MCS.fsproj index 19a737377..d773a9999 100644 --- a/MCS/MCS.fsproj +++ b/MCS/MCS.fsproj @@ -1,6 +1,5 @@  - Debug AnyCPU @@ -56,7 +55,7 @@ - +