$vbprojPath = "TaskFlow\taskFLOW.vbproj"
$devExpressBasePath = "D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework"
$content = Get-Content $vbprojPath -Raw

# Liste aller DevExpress-Referenzen, die aktualisiert werden müssen
$replacements = @(
    @{
        Old = '    <Reference Include="DevExpress.Charts.v21.2.Core, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
    </Reference>'
        New = '    <Reference Include="DevExpress.Charts.v21.2.Core, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.Charts.v21.2.Core.dll</HintPath>
    </Reference>'
    },
    @{
        Old = '    <Reference Include="DevExpress.CodeParser.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />'
        New = '    <Reference Include="DevExpress.CodeParser.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
      <HintPath>D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.CodeParser.v21.2.dll</HintPath>
    </Reference>'
    },
    @{
        Old = '    <Reference Include="DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />'
        New = '    <Reference Include="DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
      <HintPath>D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.Data.v21.2.dll</HintPath>
    </Reference>'
    }
)

foreach ($replacement in $replacements) {
    $content = $content.Replace($replacement.Old, $replacement.New)
}

Set-Content $vbprojPath $content -NoNewline
Write-Host "Updated DevExpress references"
