anchor.diff:              |> not))
   
       xmlDoc.Root.Elements()
  -    |> withName "ItemGroup"
  +    |> withNameAndCondition "ItemGroup"
       |> Seq.map (fun item ->
           (item.Elements(), [])
           ||> Seq.foldBack (fun el src ->
  -            if el.Name.LocalName = "Compile" then
  +            if el.Name.LocalName = "Compile" && checkCondition el then
                   el.Elements() |> withName "Link"
                   |> Seq.tryHead |> function
                   | Some link when Path.isRelativePath link.Value ->
  
positive.code: 
  // See #1455: F# compiler generates *.AssemblyInfo.fs in obj folder, but we don't need it
  let removeFilesInObjFolder sourceFiles =
      let reg = System.Text.RegularExpressions.Regex(@"[\\\/]obj[\\\/]")
      sourceFiles |> Array.filter (reg.IsMatch >> not)
  
  let loadPrecompiledInfo (opts: CrackerOptions) otherOptions sourceFiles =
  
negative.code:         // yield "--target:library"
      |]
  
  let MSBUILD_CONDITION = Regex(@"^\s*'\$\((\w+)\)'\s*([!=]=)\s*'(true|false)'\s*$", RegexOptions.IgnoreCase)
  
  /// Simplistic XML-parsing of .fsproj to get source files, as we cannot
  /// run `dotnet restore` on .fsproj files embedded in Nuget packages.
  let getSourcesFromFablePkg (opts: CrackerOptions) (projFile: string) =
      let withName s (xs: XElement seq) =
          xs |> Seq.filter (fun x -> x.Name.LocalName = s)
  
      let checkCondition (el: XElement) =
          match el.Attribute(XName.Get "Condition") with
          | null -> true
          | attr ->
              match attr.Value with
              | Naming.Regex MSBUILD_CONDITION [_; prop; op; bval] ->
                  let bval = Boolean.Parse bval
                  let isTrue = (op = "==") = bval // (op = "==" && bval) || (op = "!=" && not bval)
                  let isDefined =
                      opts.FableOptions.Define
                      |> List.exists (fun d -> String.Equals(d, prop, StringComparison.InvariantCultureIgnoreCase))
                  // printfn $"CONDITION: {prop} ({isDefined}) {op} {bval} ({isTrue})"
                  isTrue = isDefined
              | _ -> false
  
      let withNameAndCondition s (xs: XElement seq) =
          xs |> Seq.filter (fun el -> el.Name.LocalName = s && checkCondition el)
  
      let xmlDoc = XDocument.Load(projFile)
      let projDir = Path.GetDirectoryName(projFile)
  