Closed ZgblKylin closed 5 years ago
I jotted down some notes on how to run the terminal (from scratch) with VS2019 here.
The main juice is here (installs requirements from commandline):
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installershell.exe" modify --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community" --passive --norestart --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.Universal --add Microsoft.VisualStudio.Component.Windows10SDK.18362 --add Microsoft.VisualStudio.ComponentGroup.UWP.Support --add Microsoft.Component.VC.Runtime.OSSupport --add Microsoft.VisualStudio.Component.VC.v141.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.UWP.VC.v141 --add Microsoft.VisualStudio.Component.VC.v141.ATL --add Microsoft.VisualStudio.Component.VC.v141.MFC
The above command assumes the community edition. So if you are on another edition, double-check your paths. The workload/component IDs can be found here.
Nevermind, I downgraded to VS2017 and it works like a charm now
“wil/Common.h”: No such file or directory how is this error resolved???
I had similar issues because my file system was case-senstive. Converted it to non-sensitive and it went well
and the filesystem needs to be NTFS (building the sources from an exFat volume didn't work for me)
Here is a solution which I used to disable that recursively: https://stackoverflow.com/questions/51591091/apply-setcasesensitiveinfo-recursively-to-all-folders-and-subfolders
“wil/Common.h”: No such file or directory how is this error resolved???
You should try cloning the repository again via git clone (not downloading the ZIP file). Then you run these two commands within the Terminal directory:
git submodule update --init --recursive
Then, change directory into dep/nuget
Then, run: > nuget restore OpenConsole.sln
TIP: you may also try >nuget restore (path to openconsole sln) if nuget isn't in your PATH (which it probably isn't). Just remember to be in the nuget directory.
Hope this helps!
Agreed, cloning the Git repository and then running the steps appears to have solved the “wil/Common.h”: No such file or directory once the command >> git submodule update --init --recursive has been run.
I used these steps: from @christian-korneck post above.
git clone https://github.com/microsoft/Terminal.git cd Terminal git submodule update --init --recursive nuget restore OpenConsole.sln
I still get other errors when trying to build / deploy . I am now going to try downgrading to VS2017 and try the build.
One small hint for these who manage to build it (I managed only with VS2017).
Once deployed, in official doc says (...and also in one of the comments above) that will appear under: Windows Terminal (Preview)
...so if you search for this you won't find anything.
On my machine after I deployed it it's showing as: Windows Terminal (Dev Build)
Cheers
I confirm that I also only managed to get it built with VS2017.
Can't wait to play with the code a bit and see what cool things we can come up with.
nice
Would it be possible to have a tab for running pwsh.exe as administrator? How would such a configuration look like?
Would it be possible to have a tab for running pwsh.exe as administrator? How would such a configuration look like?
Not for now, see #691
FWIW, I was having errors because I didn't have ATL support. This StackOverflow answer helped me out.
“wil/Common.h”: No such file or directory how is this error resolved???
You should try cloning the repository again via git clone (not downloading the ZIP file). Then you run these two commands within the Terminal directory:
git submodule update --init --recursive
Then, change directory into dep/nuget
Then, run: > nuget restore OpenConsole.sln
TIP: you may also try >nuget restore (path to openconsole sln) if nuget isn't in your PATH (which it probably isn't). Just remember to be in the nuget directory.
Hope this helps!
Thank you very much! I made it.But there are other problems.
“wil/Common.h”: No such file or directory how is this error resolved???
You should try cloning the repository again via git clone (not downloading the ZIP file). Then you run these two commands within the Terminal directory:
git submodule update --init --recursive
Then, change directory into dep/nuget Then, run: > nuget restore OpenConsole.sln TIP: you may also try >nuget restore (path to openconsole sln) if nuget isn't in your PATH (which it probably isn't). Just remember to be in the nuget directory. Hope this helps!
Agreed, cloning the Git repository and then running the steps appears to have solved the “wil/Common.h”: No such file or directory once the command >> git submodule update --init --recursive has been run.
I used these steps: from @christian-korneck post above.
git clone https://github.com/microsoft/Terminal.git cd Terminal git submodule update --init --recursive nuget restore OpenConsole.sln
I still get other errors when trying to build / deploy . I am now going to try downgrading to VS2017 and try the build.
Thank you very much! I made it.I forget to cd Terminal..But I have another problem and I have no idea..
This is really fun. The green glow is awesome.
Can't wait to really dive into the code and get some things working.
Next order of business is to change the tab labels to the profile name.
For me, building with VS2019 fails with:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Microsoft\DesktopBridge\Microsoft.DesktopBridge.targets(261,5):
error MSB3774: SDK "Microsoft.VCLibs.Desktop, Version=14.0" konnte nicht gefunden werden.
[d:\Projekte\Terminal\pkg\appx\OpenConsolePackage.wapproj]
@CaptainMorgans @Meowv I seem to have missed something, how did you get the icons working?
@hasselrot You have to copy image files into %LOCALAPPDATA%\packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState and use them in the profile.json
@mKay00 Excellent! What is the key used in profile.json?
“wil/Common.h”: No such file or directory how is this error resolved???
You should try cloning the repository again via git clone (not downloading the ZIP file). Then you run these two commands within the Terminal directory:
git submodule update --init --recursive
Then, change directory into dep/nuget Then, run: > nuget restore OpenConsole.sln TIP: you may also try >nuget restore (path to openconsole sln) if nuget isn't in your PATH (which it probably isn't). Just remember to be in the nuget directory. Hope this helps!
Agreed, cloning the Git repository and then running the steps appears to have solved the “wil/Common.h”: No such file or directory once the command >> git submodule update --init --recursive has been run. I used these steps: from @christian-korneck post above. git clone https://github.com/microsoft/Terminal.git cd Terminal git submodule update --init --recursive nuget restore OpenConsole.sln I still get other errors when trying to build / deploy . I am now going to try downgrading to VS2017 and try the build.
Thank you very much! I made it.I forget to cd Terminal..But I have another problem and I have no idea..
Hey I ran into this issue as well and resolved it by deleting any saved settings and allowing the app to regenerate them.
I went to the following location
%LOCALAPPDATA%\packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState may also be %LOCALAPPDATA%\packages\Microsoft.WindowsDevTerminal_8wekyb3d8bbwe\RoamingState
and deleted any profiles.json file located there and relaunched the app.
@hasselrot "icon" See the blog post of Scott Hanselman for a reference: https://www.hanselman.com/blog/ANewConsoleForWindowsItsTheOpenSourceWindowsTerminal.aspx
当我使用Git bash时,我被告知
bash:nuget:command not found
如何解决它?
You should
When I used Git bash,I was told
bash:nuget:command not found
How to solve it?
You should use it in cmd
@christian-korneck Thank you for the steps. All worked up until the Deploy step.
========== Build: 21 succeeded, 4 failed, 0 up-to-date, 0 skipped ========== ========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
Errors below
Severity Code Description Project File Line Suppression State Error C1007 unrecognized flag '-Yu' in 'p2' TerminalControl C:\Terminal\src\cascadia\TerminalControl\LINK 1
Error LNK1257 code generation failed TerminalControl C:\Terminal\src\cascadia\TerminalControl\LINK 1
Error MIDL2011 [msg]unresolved type declaration [context]: Microsoft.Terminal.Settings.KeyChord [ Parameter 'chord' of Procedure 'SetKeyBinding' ( RuntimeClass 'TerminalApp.AppKeyBindings' ) ] TerminalApp C:\Terminal\src\cascadia\TerminalApp\AppKeyBindings.idl 62
Error MIDL2011 [msg]unresolved type declaration [context]: Microsoft.Terminal.Settings.IKeyBindings [ RuntimeClass 'TerminalApp.AppKeyBindings' ] TerminalApp C:\Terminal\src\cascadia\TerminalApp\AppKeyBindings.idl 59
Error C1083 Cannot open include file: 'winrt/TerminalApp.h': No such file or directory WindowsTerminal C:\Terminal\src\cascadia\WindowsTerminal\AppHost.h 7
Error C1083 Cannot open include file: 'winrt/TerminalApp.h': No such file or directory WindowsTerminal C:\Terminal\src\cascadia\WindowsTerminal\AppHost.h 7
Error C1083 Cannot open include file: 'winrt/TerminalApp.h': No such file or directory WindowsTerminal C:\Terminal\src\cascadia\WindowsTerminal\IslandWindow.h 7
Error C1083 Cannot open include file: 'winrt/TerminalApp.h': No such file or directory WindowsTerminal C:\Terminal\src\cascadia\WindowsTerminal\IslandWindow.h 7
Error Specified EntryPointExe 'WindowsTerminal.exe' was not found in the project outputs. CascadiaPackage C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\DesktopBridge\Microsoft.DesktopBridge.targets 413
I had these same problems. I was able to get this to build using VS2017 but I had to manually add the UWP C++ framework. I followed the instructions above with VS2017 and it worked.
We expect a lot of this to get fixed by #565. Otherwise, the README has been updated a lot in the past few days with additional information. And there have been a lot of config odds and ends merged into master that have lit up functionality in VS2019 like automatically installing the dependent packages.
我可以使用VS 2019构建它吗?
我恐怕你不能,我已经失败了23与VS2019建立......
Can I build it with VS 2019?
I'm afraid you can't, I have got 23 FAILED to build with VS2019...
I have been built with vs2019 sucessfully, in vs Installer,choose all v141 tools
Can I build it with VS 2019?
Absolutely you can. If you update the tool sets and strictly follow the steps you can easily build the code successfully. I have no idea why someone failed
I am trying to build using VS2017 and getting missing .h file error. How do I fix these?
I want to know that I am now Windows10 1809 Build 17763.503
, but I have not received the update file of Windows10 1903
, how should I update it?I have successfully generated the terminal project, but there is no SDK
for Win10 1903
, so I cannot deploy and run the project.Who can help me?
You have to be a Windows Insider. I think Release preview ring is enough. Go to Windows Settings, Update and Security and there is Windows Insider Program.
You have to be a Windows Insider. I think Release preview ring is enough. Go to Windows Settings, Update and Security and there is Windows Insider Program.
That is failed! It is sad.
I assume you have games installed on your PC? There are issues with anti-cheat software and thus it won't install, if you have anti cheat software installed. This workaround worked for me to install 1903, but I can't guarantee that you'll be able to play (all) online games after installing. I just moved the folder and moved it back after the update. https://twitter.com/zman982/status/1122049491140599808
Yes,it works. Thanks a lot.
I am trying to build using VS2019 and getting the namespace error.
https://docs.microsoft.com/en-us/uwp/api/microsoft.ui.xaml.controls?view=winui-2.1#classes From above the link, I tried to find the TabViewItem. There is no TabViewItem class.
Edit: I also checked "https://github.com/Microsoft/microsoft-ui-xaml". I installed "Microsoft.UI.Xaml.2.1.190405004.2". Maybe, it was on the old version(Microsoft.UI.Xaml.2.1.190405001-prerelease) but removed now?
需要加入Windows预览体验计划,才能收到1903(insider)的推送。否则需要等到正式发布。
1005268416@qq.com
From: GodK Date: 2019-05-16 00:55 To: microsoft/terminal CC: l1005268416; Comment Subject: Re: [microsoft/terminal] Guide for build and installation (#489) 我想知道我现在是Windows10 1809 Build 17763.503,但是我没有收到Windows10 1903的更新文件,我应该怎么更新呢。我已经成功生成了terminal项目,但是因为没有Win10 1903的SDK导致没有办法部署运行该项目?谁能帮帮我? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
@schuettecarsten I have the same issue before in both VS2017 and VS2019, and I solved it via repair my VS2017 (see https://github.com/microsoft/terminal/issues/837 for detail). Repair VS2019 may also works.
For me, building with VS2019 fails with:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Microsoft\DesktopBridge\Microsoft.DesktopBridge.targets(261,5): error MSB3774: SDK "Microsoft.VCLibs.Desktop, Version=14.0" konnte nicht gefunden werden. [d:\Projekte\Terminal\pkg\appx\OpenConsolePackage.wapproj]
Information you may needed (for chinese) 1 window 10 1903版本成功安装,done 2 VS 2019 部署该项目,done Oh yeah first time use the great VS
This is really fun. The green glow is awesome.
Can't wait to really dive into the code and get some things working.
Next order of business is to change the tab labels to the profile name.
I have deploy start the same window, but how can I add a ubuntu cmd ? what can I do ?
Was finally able to build and deploy the solution. I see a new shortcut named "Windows Terminal (Dev Build" but upon clicking, powershell window opens up and dont see any plus sign on the toolbar. What am I doing wrong?
Tab bar is hidden by default. Press Ctrl-T to create a new tab or go into settings in the drop down next to the plus button and change “Always show tab bar” to true.
Tab bar is hidden by default. Press Ctrl-T to create a new tab or go into settings in the drop down next to the plus button and change “Always so tab bar” to true.
Ah. That did it. Thank you!
There are several header files which have the line "#include
Huh? windows.h
is part of the Windows SDK. It has been for about a hundred years.
Hey I ran into this issue as well and resolved it by deleting any saved settings and allowing the app to regenerate them.
I went to the following location
%LOCALAPPDATA%\packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState may also be %LOCALAPPDATA%\packages\Microsoft.WindowsDevTerminal_8wekyb3d8bbwe\RoamingState
and deleted any profiles.json file located there and relaunched the app.
@drekryan Thank you.I tried and didn't make the mistake last time.But it didn't run correctly.I can't use it.
VS 2019 i used this successfully:
https://github.com/microsoft/terminal/issues/489#issuecomment-490151997
https://github.com/microsoft/terminal/issues/489#issuecomment-491489422
https://github.com/microsoft/terminal/issues/489#issuecomment-491603111
https://www.hanselman.com/blog/ANewConsoleForWindowsItsTheOpenSourceWindowsTerminal.aspx
I was redirected here because of atlbase files missing but since the other thread was closed I wasn't able to see the resolution directly. FYI: to newcomers with atlbase issue you need to install the ATL v142 (for me at this moment). Quoting it:
In Visual Studio, you can go to Tools->Get Tools and Features, which will open the Visual Studio Installer. From there you can click the Modify button for your Visual Studio version, then go to the Individual Components tab at the top. The C++ ATL components are in the section titled "SDKs, libraries, and frameworks" which is the last section in my list at least.
Fair warning, I had to install the V141 versions to get the atlbase error to go away, not the V142 versions in the picture.
I'm getting the following error:
It may have to do with the path double slashes, how can i get this solved?
I try to solve my problem, but I don't know what I make incorrect. I have error like:
Severity Code Description Project File Line Suppression State Error C1007 unrecognized flag '-Yu' in 'p2' TerminalControl C:\Terminal\src\cascadia\TerminalControl\LINK 1 Error LNK1257 code generation failed TerminalControl C:\Terminal\src\cascadia\TerminalControl\LINK 1 Error C1007 unrecognized flag '-Yu' in 'p2' TerminalApp C:\Terminal\src\cascadia\TerminalApp\LINK 1 Error LNK1257 code generation failed TerminalApp C:\Terminal\src\cascadia\TerminalApp\LINK 1
Can anyone tell me what I make wrong?
@PatrykZajac are you using the latest Windows 10 SDK (10.0.18362.0). Be sure it’s downloaded then retarget your solution to use this version of the SDK
@PatrykZajac are you using the latest Windows 10 SDK (10.0.18362.0). Be sure it’s downloaded then retarget your solution to use this version of the SDK
I upgraded windows to 1903 and now it's works. Thanks
This is really fun. The green glow is awesome.
Can't wait to really dive into the code and get some things working.
Next order of business is to change the tab labels to the profile name.
Nice, what theme or color did you used ?
Tools needed
Desktop Development with C++
. 1.2Universal Windows Platform Development
. 1.3Windows 10 SDK (10.0.18362.0)
. 1.4 If you're running VS2019, you'll also need to install eitherv141 Toolset
orv142 Toolset
.Terminal/dep/nuget
).Build Steps
git clone
this repository, not download .zip file.git submodule update --init --recursive
in Terminal folder.nuget restore OpenConsole.sln
(This step can be skipped, then Visual Studio should warn you that there are packages to restore - then restore).OpenConsole.sln
with Visual Studio.x86
/x64
) andrelease
mode, you may need to fix some build errors: 5.1 C2220 and code page warnings: All errors and warnings are encoding error of unicode characters, a helpful workaround is to modify corresponding file encoding toUTF-8 BOM
(Notepad++ is recommended). 5.2 Errors insrc/tools/vtpipeterm/main.cpp
: In addtion, you should also addu8
prefix before string literals with unicode characters, e.g. line395
,398
,401
and404
.Workaround
Try build with PR 458 or PR 549, both of them can build successfully.
Installation
Unfortunately, the generated .appx doesn't have any certificates, so it cannot be installed via double-click or powershell, the only way to install is to deploy the solution in VS.
Windows Settings
-Upgrade & Security
-For Developers
, switchApp sources
toDeveloper mode
.CascadiaPackage
project (underSolution/Terminal
), selectDeploy Solution
to install, then you'll findWindows Terminal (Preview)
in start menu.Settings
After open the terminal, you can't see any menu buttons.
Just press
Ctrl + T
to open a new tab, and you'll see a drop-down button in the tab bar.Click it and select
Settings
, then you can modify the configuration via openedprofiles.json
.Add WSL
profiles
, with content copied fromprofiles/cmd
.guid
.name
, such asWSL
.commandline
towsl.exe
.Then you'll find
WSL
in the drop-down menu of tab bar.Here're sample codes: