Visual Studio fails to restore NuGet because src\cascadia\TerminalApp\packages.config has two copies of Microsoft.UI.Xaml #16979

Open
opened 2026-01-31 05:28:59 +00:00 by claunia · 0 comments
Owner

Originally created by @dmachaj on GitHub (Mar 11, 2022).

Windows Terminal version

commit f17c2babd4

Windows build number

No response

Other Software

Visual Studio 2022 (17.1.1)

Steps to reproduce

Fresh clone of Terminal repo
Restore git submodules
Open OpenConsole.sln
Try to build x64|Debug

Expected Behavior

It builds

Actual Behavior

NuGet restore fails and 11 projects fail with it. Clicking "Manage NuGet for Solution" has this error:
image

Clicking "Show errors in output" has this output:
An error occurred while reading file 'v:\T\terminal\src\cascadia\TerminalApp\packages.config': There are duplicate packages: Microsoft.UI.Xaml

Sure enough packages.config has two copies of XAML:
<?xml version="1.0" encoding="utf-8"?> <packages> <package id="Microsoft.Toolkit.Win32.UI.XamlApplication" version="6.1.3" targetFramework="native" /> <package id="Microsoft.UI.Xaml" version="2.7.0" targetFramework="native" /> <package id="Microsoft.UI.Xaml" version="2.7.0-prerelease.210913003" targetFramework="native" /> <package id="Microsoft.Windows.CppWinRT" version="2.0.210825.3" targetFramework="native" /> <package id="Microsoft.Internal.PGO-Helpers.Cpp" version="0.2.34" targetFramework="native" /> </packages>

Looking at "git blame" this was introduced as part of 53a454fbd3 on 2/25/2022.

Originally created by @dmachaj on GitHub (Mar 11, 2022). ### Windows Terminal version commit f17c2babd4f22c21b9ad0897f884b2b3dbe173f1 ### Windows build number _No response_ ### Other Software Visual Studio 2022 (17.1.1) ### Steps to reproduce Fresh clone of Terminal repo Restore git submodules Open OpenConsole.sln Try to build x64|Debug ### Expected Behavior It builds ### Actual Behavior NuGet restore fails and 11 projects fail with it. Clicking "Manage NuGet for Solution" has this error: ![image](https://user-images.githubusercontent.com/46852402/157956157-3388fa15-2e84-410d-b94b-85206ff7cdc1.png) Clicking "Show errors in output" has this output: `An error occurred while reading file 'v:\T\terminal\src\cascadia\TerminalApp\packages.config': There are duplicate packages: Microsoft.UI.Xaml` Sure enough packages.config has two copies of XAML: `<?xml version="1.0" encoding="utf-8"?> <packages> <package id="Microsoft.Toolkit.Win32.UI.XamlApplication" version="6.1.3" targetFramework="native" /> <package id="Microsoft.UI.Xaml" version="2.7.0" targetFramework="native" /> <package id="Microsoft.UI.Xaml" version="2.7.0-prerelease.210913003" targetFramework="native" /> <package id="Microsoft.Windows.CppWinRT" version="2.0.210825.3" targetFramework="native" /> <package id="Microsoft.Internal.PGO-Helpers.Cpp" version="0.2.34" targetFramework="native" /> </packages>` Looking at "git blame" this was introduced as part of https://github.com/microsoft/terminal/commit/53a454fbd3e2992be5c1f2c8ed9e2c2974f0e7b8 on 2/25/2022.
claunia added the Needs-TriageResolution-Fix-CommittedIssue-BugNeeds-Tag-Fix labels 2026-01-31 05:29:00 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16979