terminal
terminal copied to clipboard
MSB4006: "circular dependency" in `main`
I like so much this project that I was thinking about getting the latest features sooner without having to wait for new official releases to be published in the microsoft store. So I was wondering what's the recommended way to do that... My first thought was trying to build origin/main by myself expecting this would be the "production" branch but I've realized is not, for instance, when I tried building 165d3edde9ca850f25f7c1e740b5661461fcf175 I'd get some crashes:
Build FAILED.
"D:\terminal\OpenConsole.sln" (Build target) (1) ->
"D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj.metaproj" (default target) (2) ->
"D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj" (default target) (99) ->
"D:\terminal\src\cascadia\WindowsTerminal\WindowsTerminal.vcxproj" (GetTargetPath target) (100:3) ->
"D:\terminal\src\cascadia\TerminalSettingsEditor\Microsoft.Terminal.Settings.Editor.vcxproj" (default target) (109) ->
(MarkupCompilePass2 target) ->
D:\terminal\src\cascadia\TerminalSettingsEditor\AddProfile.xaml(63,56): XamlCompiler warning WMC1506: OneWay bindings require at least one of their steps to support raising notifications when their value changes [D:\terminal\src\cascadia\TerminalSettingsEditor\Microsoft.Terminal.Settings.Editor.vcxproj]
D:\terminal\src\cascadia\TerminalSettingsEditor\Launch.xaml(107,56): XamlCompiler warning WMC1506: OneWay bindings require at least one of their steps to support raising notifications when their value changes [D:\terminal\src\cascadia\TerminalSettingsEditor\Microsoft.Terminal.Settings.Editor.vcxproj]
D:\terminal\src\cascadia\TerminalSettingsEditor\Launch.xaml(60,56): XamlCompiler warning WMC1506: OneWay bindings require at least one of their steps to support raising notifications when their value changes [D:\terminal\src\cascadia\TerminalSettingsEditor\Microsoft.Terminal.Settings.Editor.vcxproj]
D:\terminal\src\cascadia\TerminalSettingsEditor\Appearances.xaml(52,40): XamlCompiler warning WMC1506: OneWay bindings require at least one of their steps to support raising notifications when their value changes [D:\terminal\src\cascadia\TerminalSettingsEditor\Microsoft.Terminal.Settings.Editor.vcxproj]
"D:\terminal\OpenConsole.sln" (Build target) (1) ->
"D:\terminal\src\cascadia\TerminalAzBridge\TerminalAzBridge.vcxproj" (default target) (76) ->
D:\terminal\packages\Microsoft.Windows.CppWinRT.2.0.210825.3\build\native\Microsoft.Windows.CppWinRT.targets(223,13): error MSB4006: There is a circular dependency in the target dependency graph involving target "CppWinRTComputeGetResolvedWinMD". [D:\terminal\src\cascadia\TerminalAzBridge\TerminalAzBridge.vcxproj]
"D:\terminal\OpenConsole.sln" (Build target) (1) ->
"D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj.metaproj" (default target) (2) ->
"D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj" (default target) (99) ->
(_BuildDependentProjects target) ->
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\DesktopBridge\Microsoft.DesktopBridge.targets(497,5): error MSB4181: The "MSBuild" task returned false but did not log an error. [D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj]
4 Warning(s)
2 Error(s)
Which makes sense I guess, as I've realized mostly of the main commits pipelines are failing quite often so I guess this is just a dev branch.
So, what'd be the recommended way to get the latest features that are still not available in the microsoft store app? Or is it just better to stick to the official microsoft store one instead and being more patient π?
@brupelo you could checkout the latest release branch i.e. 2f1d2ea0d (HEAD -> release-1.16, tag: v1.16.3463.0, origin/release-1.16) however building from main is where all the fun is!
main is the correct, most up to date branch. We've been seeing these circular dependency errors for about a week now, before the holidays, but never had a chance to get to the root cause. Congrats, this is now the thread
A mail thread I read once mentioned removing /m might help?
It's also a flakey failure, so just running the build again might fix it.
@zcobol , @zadjii-msft Hey guys, thanks to clarify! all clear now, I guess it just makes sense to start using main directly from now on rather than the microsoft store old stable one then.
One question regarding this, so I assume the result of running bcz.cmd would give me a portable package, right? Now, how can I start using my old settings now? Also, me just being dummy but, what's the way to run the terminal from the D:\terminal\bin\x64\Debug directory? As I see a bunch of exes and when I double click wt.exe nothing will show up. Still trying to familiarize myself with the tools directory (bcx, bzc, bx, bz), which I guess the acronyms stands for (b)build (c)clean (z)solution (x)project
As for the MSB4006 issue, did you figure out a way to reproduce this one deterministically without making a cold build (ie: razzle && bcz) ? Asking cos I guess waiting ~9min-12min per build is not the smart way to go here π
Here's my last attempts using latest main (547349af77df16d0eed1c73ba3041c84f7b063da)
bcz
"D:\terminal\OpenConsole.sln" (Clean;Build target) (1) ->
"D:\terminal\src\cascadia\TerminalAzBridge\TerminalAzBridge.vcxproj" (Clean;Build target) (89:2) ->
D:\terminal\packages\Microsoft.Windows.CppWinRT.2.0.210825.3\build\native\Microsoft.Windows.CppWinRT.targets(2
23,13): error MSB4006: There is a circular dependency in the target dependency graph involving target "CppWinRTC
omputeGetResolvedWinMD". [D:\terminal\src\cascadia\TerminalAzBridge\TerminalAzBridge.vcxproj]
"D:\terminal\OpenConsole.sln" (Clean;Build target) (1) ->
"D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj.metaproj" (Clean;Build target) (2) ->
"D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj" (default target) (85:2) ->
(_BuildDependentProjects target) ->
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\DesktopBridge\Microsoft.DesktopBridg
e.targets(497,5): error MSB4181: The "MSBuild" task returned false but did not log an error. [D:\terminal\src\ca
scadia\CascadiaPackage\CascadiaPackage.wapproj]
25 Warning(s)
2 Error(s)
Time Elapsed 00:08:49.16
rm -rf ..\bin && bz rel
1158 Warning(s)
0 Error(s)
Time Elapsed 00:12:24.33
bz rel
4 Warning(s)
0 Error(s)
Time Elapsed 00:01:02.80
bz
"D:\terminal\OpenConsole.sln" (Build target) (1) ->
"D:\terminal\src\cascadia\TerminalAzBridge\TerminalAzBridge.vcxproj" (default target) (78) ->
D:\terminal\packages\Microsoft.Windows.CppWinRT.2.0.210825.3\build\native\Microsoft.Windows.C
ppWinRT.targets(223,13): error MSB4006: There is a circular dependency in the target dependency
graph involving target "CppWinRTComputeGetResolvedWinMD". [D:\terminal\src\cascadia\TerminalAz
Bridge\TerminalAzBridge.vcxproj]
"D:\terminal\OpenConsole.sln" (Build target) (1) ->
"D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj.metaproj" (default target) (2
) ->
"D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj" (default target) (97) ->
(_BuildDependentProjects target) ->
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\DesktopBridge\Micro
soft.DesktopBridge.targets(497,5): error MSB4181: The "MSBuild" task returned false but did not
log an error. [D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj]
4 Warning(s)
2 Error(s)
Time Elapsed 00:00:56.13
bz
Build succeeded.
"D:\terminal\OpenConsole.sln" (Build target) (1) ->
"D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj.metaproj" (default target) (2
) ->
"D:\terminal\src\cascadia\CascadiaPackage\CascadiaPackage.wapproj" (default target) (99) ->
"D:\terminal\src\cascadia\WindowsTerminal\WindowsTerminal.vcxproj" (GetTargetPath target) (100:
3) ->
"D:\terminal\src\cascadia\TerminalSettingsEditor\Microsoft.Terminal.Settings.Editor.vcxproj" (d
efault target) (111) ->
(MarkupCompilePass2 target) ->
D:\terminal\src\cascadia\TerminalSettingsEditor\AddProfile.xaml(63,56): XamlCompiler warning
WMC1506: OneWay bindings require at least one of their steps to support raising notifications w
hen their value changes [D:\terminal\src\cascadia\TerminalSettingsEditor\Microsoft.Terminal.Set
tings.Editor.vcxproj]
D:\terminal\src\cascadia\TerminalSettingsEditor\Launch.xaml(107,56): XamlCompiler warning WMC
1506: OneWay bindings require at least one of their steps to support raising notifications when
their value changes [D:\terminal\src\cascadia\TerminalSettingsEditor\Microsoft.Terminal.Settin
gs.Editor.vcxproj]
D:\terminal\src\cascadia\TerminalSettingsEditor\Launch.xaml(60,56): XamlCompiler warning WMC1
506: OneWay bindings require at least one of their steps to support raising notifications when
their value changes [D:\terminal\src\cascadia\TerminalSettingsEditor\Microsoft.Terminal.Setting
s.Editor.vcxproj]
D:\terminal\src\cascadia\TerminalSettingsEditor\Appearances.xaml(52,40): XamlCompiler warning
WMC1506: OneWay bindings require at least one of their steps to support raising notifications
when their value changes [D:\terminal\src\cascadia\TerminalSettingsEditor\Microsoft.Terminal.Se
ttings.Editor.vcxproj]
4 Warning(s)
0 Error(s)
Time Elapsed 00:00:51.50
Read in sequence attempts 1/2/3/4/5... Now, this is interesting, in attempt 4 you'll see the crashes while in attempt 5 you won't. I guess the project dag resolution is not deterministic?
Sorry for the delays - we've all been OOF for the holidays.
In general, I don't actually use bcz to clean build the Terminal anymore. That was much more valuable when it was just conhost, but clean builds with cppwinrt are just prohibitively expensive.
Unfortunately, building an app package on the commandline is also just kinda a chore, and there's no way to avoid that. I'd recommend following these steps if you're really committed to the idea. I've found that the fastest inner loop is just hitting "deploy" in VS though. VS has some extra magic built into it that lets an incremental rebuild go a lot faster for a Package than msbuild alone.
Then, you can run the Terminal with the windowsterminal.exe that's in the src\cascadia\CascadiaPackage\bin\%platform%\%configuration%\Appx directory. That Appx dir has all the dependencies laid out in a way that should work to double-click.
TerminalAzBridge.vcxproj
<!-- Dependencies -->
<ItemGroup>
<ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalConnection\TerminalConnection.vcxproj">
<Project>{CA5CAD1A-44BD-4AC7-AC72-6CA5B3AB89ED}</Project>
</ProjectReference>
<ProjectReference Include="$(OpenConsoleDir)src\types\lib\types.vcxproj" />
</ItemGroup>
But that's not the GUID for TerminalConnection π
I haven't seen one of these since #15008. I'll give it a week, but I think this is fixed now βΊοΈ
Hey all, our bot's been acting up the last few weeks. This issue has been marked as requiring author feedback, but hasn't had any activity in the last week. We're gonna close it to tidy up. Feel free to continue the discssion in the comments - we can always reopen if new information comes to light. Thanks!