anchor.diff:      override x.OnCreateCompilationParameters(config : DotNetProjectConfiguration, kind : ConfigurationKind) : DotNetCompilerParameters = 
           let pars = new FSharpCompilerParameters()
           // Set up the default options
  -        if (supportedPlatforms |> Array.exists (fun x -> x.Contains(config.Platform))) then pars.PlatformTarget <- config.Platform
  -        if (kind = ConfigurationKind.Debug) then 
  +        if supportedPlatforms |> Array.exists (fun x -> x.Contains(config.Platform)) then pars.PlatformTarget <- config.Platform
  +        match kind with
  +        | ConfigurationKind.Debug -> 
               pars.AddDefineSymbol "DEBUG"
               pars.Optimize <- false
               pars.GenerateTailCalls <- false
  -        if (kind = ConfigurationKind.Release) then 
  +        | ConfigurationKind.Release -> 
               pars.Optimize <- true
               pars.GenerateTailCalls <- true
  -        // TODO: set up the documentation file to be AssemblyName.xml by default (but how do we get AssemblyName here?)
  -        // pars.DocumentationFile <- ""
  -        //    System.IO.Path.GetFileNameWithoutExtension(config.CompiledOutputName.ToString())+".xml" 
  +        | _ -> ()
  +        //pars.DocumentationFile <- config.CompiledOutputName.FileNameWithoutExtension + ".xml"
           pars :> DotNetCompilerParameters
       
       override x.OnGetSupportedClrVersions() = 
  
positive.code:     inherit DotNetProject()
      // Keep the platforms combo of CodeGenerationPanelWidget in sync with this list
      let supportedPlatforms = [| "anycpu"; "x86"; "x64"; "itanium" |]
      
      let langServ = MDLanguageService.Instance
      
      let invalidateProjectFile() =
          try
              let options = langServ.GetProjectCheckerOptions(self.FileName.ToString(), [("Configuration", IdeApp.Workspace.ActiveConfigurationId)])
              langServ.InvalidateConfiguration(options)
              langServ.ClearProjectInfoCache()
          with ex -> LoggingService.LogError ("Could not invalidate configuration", ex)
      
      let invalidateFiles (args:#ProjectFileEventInfo seq) =
  
negative.code:             if MDLanguageService.SupportedFileName (projectFileEvent.ProjectFile.FilePath.ToString()) then
                  invalidateProjectFile()
  
      [<ProjectPathItemProperty ("TargetProfile", DefaultValue = "")>]
      member val TargetProfile = String.Empty with get, set
  
      [<ProjectPathItemProperty ("TargetFSharpCoreVersion", DefaultValue = "")>]
      member val TargetFSharpCoreVersion = String.Empty with get, set
  
      override x.OnInitialize() =
          base.OnInitialize()
  
      override x.OnInitializeFromTemplate(createInfo, options) =
        base.OnInitializeFromTemplate(createInfo, options)
        if options.HasAttribute "FSharpPortable" then initilisedAsPortable <- true
        if options.HasAttribute "TargetProfile" then x.TargetProfile <- options.GetAttribute "TargetProfile"
        if options.HasAttribute "TargetFSharpCoreVersion" then x.TargetFSharpCoreVersion <- options.GetAttribute "TargetFSharpCoreVersion"
  
      override x.OnGetDefaultImports (imports) =
          base.OnGetDefaultImports (imports)
          // By default projects use the F# 3.1 targets file unless only 3.0 is available on the machine.
          // New projects will be created with this targets file
          // If FSharp 3.1 is available, use it. If not, use 3.0
          if initilisedAsPortable then
            if MSBuildProjectService.IsTargetsAvailable(FSharp31PortableImport) then imports.Add (FSharp31PortableImport)
            else failwith "F# portable target not found"
          
          else
            if MSBuildProjectService.IsTargetsAvailable(FSharp31Import) then imports.Add (FSharp31Import)
            else imports.Add (FSharp3Import)
      
      override x.OnWriteProject(monitor, msproject) =
          base.OnWriteProject(monitor, msproject)
          // This updates the old guid to the new one on saving the project
          try 
              let fsimportExists = 
                  msproject.Imports 
                  |> Seq.exists (fun import -> import.Project.EndsWith("FSharp.Targets", StringComparison.OrdinalIgnoreCase))
              if fsimportExists then 
                  msproject.GetGlobalPropertyGroup().GetProperties()
                  |> Seq.tryFind (fun p -> p.Name = "ProjectTypeGuids")
                  |> Option.iter (fun guids -> 
                         guids.Element.InnerText <- guids.Element.InnerText.Split ([| ';' |], StringSplitOptions.RemoveEmptyEntries)
                                                    |> Array.filter (fun guid -> not (guid.Equals ("{4925A630-B079-445D-BCD4-3A9C94FE9307}", StringComparison.OrdinalIgnoreCase)))
                                                    |> String.concat ";")
          with exn -> LoggingService.LogWarning("Failed to remove old F# guid", exn)
      
  