Cannot build locally 0.9.443 - 14 Builds error on the same tag used for the release #6665

Closed
opened 2026-01-31 00:44:15 +00:00 by claunia · 12 comments
Owner

Originally created by @tebeco on GitHub (Feb 29, 2020).

Environment

Windows build number: Microsoft Windows [Version 10.0.19041.113]
Windows Terminal version (if applicable): origin/release-0.9
VS2019 Preview 16.5.0 preview 4

Steps to reproduce

checkout origin/release-0.9
> git reset --hard
> git clean -fdx
> git submodule update --init --recursive
> nuget.exe restore
> start ./OpenConsole.sln

Change configuration and platform to RELEASE and x64
Then press Ctrl+Maj+B

Expected behavior

Build should pass

Actual behavior

14 errors on a tag that was used to release 0.9.443
image
I used that tag on purpose as it is the one that was used to push that code to the store, so i don't understand why this happen :(

Bad workaround

Is it intended that i manually have to change this to be able to build in Release ?
image

Originally created by @tebeco on GitHub (Feb 29, 2020). # Environment ```none Windows build number: Microsoft Windows [Version 10.0.19041.113] Windows Terminal version (if applicable): origin/release-0.9 VS2019 Preview 16.5.0 preview 4 ``` # Steps to reproduce ``` checkout origin/release-0.9 > git reset --hard > git clean -fdx > git submodule update --init --recursive > nuget.exe restore > start ./OpenConsole.sln ``` Change configuration and platform to `RELEASE` and `x64` Then press `Ctrl+Maj+B` # Expected behavior Build should pass # Actual behavior 14 errors on a tag that was used to release `0.9.443` ![image](https://user-images.githubusercontent.com/2266487/75611062-48160700-5b17-11ea-98e6-d2c9341cd4c0.png) I used that tag on purpose as it is the one that was used to push that code to the store, so i don't understand why this happen :( # Bad workaround Is it intended that i manually have to change this to be able to build in Release ? ![image](https://user-images.githubusercontent.com/2266487/75615271-f0d95c00-5b41-11ea-9f66-04ae878cea5a.png)
claunia added the Issue-QuestionNeeds-Tag-FixResolution-AnsweredArea-Build labels 2026-01-31 00:44:15 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Feb 29, 2020):

Unfortunately, release tags are implicitly tied to the VS version that was GA when they were made. This totally sucks, but there is not much we can do about it.

The errors you're hitting were fixed in #4722, which isn't being backported to 0.9 because we're not producing 0.9 builds using VS 16.5.

@DHowett-MSFT commented on GitHub (Feb 29, 2020): Unfortunately, release tags are implicitly tied to the VS version that was GA when they were made. This totally sucks, but there is not much we can do about it. The errors you're hitting were fixed in #4722, which isn't being backported to 0.9 because we're not producing 0.9 builds using VS 16.5.
Author
Owner

@tebeco commented on GitHub (Feb 29, 2020):

so what's the proper way to get a build working from Visual Studio ?
i mean until the bug from the store is fixed i manually Build and Publish Cascadia package

as the powershell script seems to do the build
i'm not sure how to publish the appx locally (using a self certificate for x64)

Did i missed the script for that or from now Vs is that only way ?
which you mean i would have to manually do that ?

also does it mean you are not hurt by that during development ? if so it mean you get no warning but vs2019 see a warning ?
i'm a bit lost TBH, regarding how/what to do to get vs build right after a "git clone" and following the md i found

@tebeco commented on GitHub (Feb 29, 2020): so what's the proper way to get a build working from Visual Studio ? i mean until the bug from the store is fixed i manually Build and Publish Cascadia package as the powershell script seems to do the build i'm not sure how to publish the appx locally (using a self certificate for x64) Did i missed the script for that or from now Vs is that only way ? which you mean i would have to manually do that ? also does it mean you are not hurt by that during development ? if so it mean you get no warning but vs2019 see a warning ? i'm a bit lost TBH, regarding how/what to do to get vs build right after a "git clone" and following the md i found
Author
Owner

@DHowett-MSFT commented on GitHub (Feb 29, 2020):

I'll try to answer these in order.

The proper way to get a working build from VS is to Build and Publish, or just press F5 with CacadiaPackage/Release/x64 selected as the project/configuration.

The powershell scripts were intended for building OpenConsole (conhost.exe) and most of them date to before we were open-source.

If you provide a code signing key, CascadiaPackage_TemporaryKey.pfx, in the src/cascadia/CascadiaPackage folder, it will be used to sign the msix/appx that comes out of the build script.

If you don't do that, it is very difficult to install the MSIX produced by the command-line build scripts. VS is much easier.

During development, my team uses the latest non-preview version of Visual Studio, which was 16.4 when we produced version 0.9. I'm usually running preview versions, but they can be unstable for internal microsoft engineers 😄

You should be able to build master by...

  1. Checking out the repository
  2. Doing a git submodule update --init --recursive
  3. Opening OpenConsole.sln in Visual Studio, choosing x64, Release, CascadiaPackage
  4. Pressing F5 or Build and Run

You should be able to build 0.9 by checking out the 0.9 release tag, cherry-picking the fix in #4722, and then doing the same things as above.

@DHowett-MSFT commented on GitHub (Feb 29, 2020): I'll try to answer these in order. The proper way to get a working build _from VS_ is to Build and Publish, or just press F5 with CacadiaPackage/Release/x64 selected as the project/configuration. The powershell scripts were intended for building OpenConsole (conhost.exe) and most of them date to before we were open-source. If you provide a code signing key, `CascadiaPackage_TemporaryKey.pfx`, in the `src/cascadia/CascadiaPackage` folder, it will be used to sign the msix/appx that comes out of the build script. If you don't do that, it is very difficult to install the MSIX produced by the command-line build scripts. VS is much easier. During development, my team uses the latest non-preview version of Visual Studio, which was 16.4 when we produced version 0.9. I'm usually running preview versions, but they can be unstable for internal microsoft engineers :smile: You should be able to build _master_ by... 1. Checking out the repository 2. Doing a `git submodule update --init --recursive` 3. Opening OpenConsole.sln in Visual Studio, choosing x64, Release, CascadiaPackage 4. Pressing <kbd>F5</kbd> or _Build and Run_ You should be able to build _0.9_ by checking out the 0.9 release tag, cherry-picking the fix in #4722, and then doing the same things as above.
Author
Owner

@tebeco commented on GitHub (Feb 29, 2020):

I'll go read #4722 tomorrow, thx for the link

to clarify what i attempted is exactly what you described and it seems that either i did something wrong either something is not clear as i could not even restore or build ^^

i did generate a CascadiaPackage_TemporaryKey.pfx (in fact the wizard did that for me ^^ after the build once i right click publish)

but then the question is, is there an alternate/existing way that might not be documented to produce the same result as "right click > publish" (next, next....) so that opening VS is optional ?
that would be fine too, all i'm trying to do is to get something published in order to ship the output of the "publish" and then run "Install.ps1"
this is what we did at work for 0.5 and 0.6
I wonder that if i could achieve that from powershell ;)
that would allow some automation (like a CI here)

@tebeco commented on GitHub (Feb 29, 2020): I'll go read #4722 tomorrow, thx for the link to clarify what i attempted is exactly what you described and it seems that either i did something wrong either something is not clear as i could not even restore or build ^^ i did generate a `CascadiaPackage_TemporaryKey.pfx` (in fact the wizard did that for me ^^ after the build once i right click publish) but then the question is, is there an alternate/existing way that might not be documented to produce the same result as "right click > publish" (next, next....) so that opening VS is optional ? that would be fine too, all i'm trying to do is to get something published in order to ship the output of the "publish" and then run "Install.ps1" this is what we did at work for 0.5 and 0.6 I wonder that if i could achieve that from powershell ;) that would allow some automation (like a CI here)
Author
Owner

@DHowett-MSFT commented on GitHub (Feb 29, 2020):

So, if you have CascadiaPackage_TemporaryKey.pfx in the right folder (and it is named exactly that).. the msbuild invocations will produce a signed msix file for you so you don't need to use Visual Studio 😄

@DHowett-MSFT commented on GitHub (Feb 29, 2020): So, _if_ you have CascadiaPackage_TemporaryKey.pfx in the right folder (and it is named exactly that).. the `msbuild` invocations will produce a signed `msix` file for you so you don't need to use Visual Studio :smile:
Author
Owner

@tebeco commented on GitHub (Mar 2, 2020):

@DHowett

As other issues were closed in favor of this one.
I'm curious if you are also struck with this one #4753 ?

What's your workflow, let's say if you got someone new joining your team, as if you follow the md file for building, and just use Visual Studio it does not seems to either restore and/or build.

I understand the powershell seems to be working, and i have to thx you for pointing that i need to first create the pfx.
But as of the current documentation, i was either struck but nuget restore being broken (might be an insider bug) and also by (WarnAsError).

I'm wondering here if you are in fact using Visual Studio or not (i guess the current state of WarnAsError will never allow anyone to build in VS ?)

@tebeco commented on GitHub (Mar 2, 2020): @DHowett As other issues were closed in favor of this one. I'm curious if you are also struck with this one #4753 ? What's your workflow, let's say if you got someone new joining your team, as if you follow the `md file` for building, and just use `Visual Studio` it does not seems to either restore and/or build. I understand the powershell seems to be working, and i have to thx you for pointing that i need to first create the `pfx`. But as of the current documentation, i was either struck but nuget restore being broken (might be an insider bug) and also by (WarnAsError). I'm wondering here if you are in fact using Visual Studio or not (i guess the current state of `WarnAsError` will never allow anyone to build in VS ?)
Author
Owner

@zadjii-msft commented on GitHub (Mar 2, 2020):

This is what I do:

  1. I've already got the git submodules checked out, and nuget packages restored.
  2. I check out whatever branch I'm going to be working on.
  3. I write code in Sublime Text, so I make edits in that usually.
  4. I'll alt-tab over to VS, and confirm the changes build by building CascadiaPackage. I'll typically just right click on it to build only that project:
    image
  5. Then, if it's a Terminal feature, I'll usually just hit go in VS to run it:
    image

You can usually just skip step 3, and go straight to 4. I usually end up with dumb compilation mistakes, so I'll often just build TerminalAppLib to verify that it compiles at all, then hit the big green play button once I've sorted out the compilation errors.

And that's about it. Sometimes if I'm just working on tests, I'll use the cmd scripts in the tools/ directory to build the test project and run it without needing to alt-tab to VS.

@zadjii-msft commented on GitHub (Mar 2, 2020): This is what I do: 0. I've already got the git submodules checked out, and nuget packages restored. 1. I check out whatever branch I'm going to be working on. 2. I write code in Sublime Text, so I make edits in that usually. 3. I'll alt-tab over to VS, and confirm the changes build by building CascadiaPackage. I'll typically just right click on it to build only that project: ![image](https://user-images.githubusercontent.com/18356694/75690367-558ed680-5c68-11ea-92e2-cd2a5a87553b.png) 4. Then, if it's a Terminal feature, I'll usually just hit go in VS to run it: ![image](https://user-images.githubusercontent.com/18356694/75690428-748d6880-5c68-11ea-93f4-b2419669657d.png) You can usually just skip step 3, and go straight to 4. I usually end up with dumb compilation mistakes, so I'll often just build `TerminalAppLib` to verify that it compiles at all, then hit the big green play button once I've sorted out the compilation errors. And that's about it. Sometimes if I'm just working on tests, I'll use the cmd scripts in the `tools/` directory to build the test project and run it without needing to alt-tab to VS.
Author
Owner

@tebeco commented on GitHub (Mar 2, 2020):

So now i'm wondering why i'm hit by these 14 warn as error here ?
As i did Ctrl+Maj+B (Rebuild all), either these Warn are raised outside of CascadiaPackage "Build tree", or i don't get it ^^
i'll delete my copy of the repo, start fresh and see if that pass or not

@tebeco commented on GitHub (Mar 2, 2020): So now i'm wondering why i'm hit by these 14 warn as error here ? As i did `Ctrl+Maj+B` (Rebuild all), either these `Warn` are raised outside of `CascadiaPackage` "Build tree", or i don't get it ^^ i'll delete my copy of the repo, start fresh and see if that pass or not
Author
Owner

@tebeco commented on GitHub (Mar 2, 2020):

also :

I've already got the git submodules checked out, and nuget packages restored.

that was one of the possible issue, does the docs of the repo need to be updated to state how to restore the nuget packages ?
Both scenario are not working :
dotnet restore
right click > restore package for solution

I had to download nuget.exe and run a nuget restore on the sln folder

@tebeco commented on GitHub (Mar 2, 2020): also : > I've already got the git submodules checked out, and nuget packages restored. that was one of the possible issue, does the docs of the repo need to be updated to state how to restore the nuget packages ? Both scenario are not working : `dotnet restore` `right click > restore package for solution` I had to download `nuget.exe` and run a `nuget restore` on the `sln folder`
Author
Owner

@zadjii-msft commented on GitHub (Mar 2, 2020):

I mean there's a nuget.exe that we just put directly into our repo to make our lives easier:
https://github.com/microsoft/terminal/tree/master/dep/nuget

and the cmd script I often use will just perform the restore before every build:
https://github.com/microsoft/terminal/blob/master/tools/bcz.cmd#L69

@zadjii-msft commented on GitHub (Mar 2, 2020): I mean there's a `nuget.exe` that we just put directly into our repo to make our lives easier: https://github.com/microsoft/terminal/tree/master/dep/nuget and the cmd script I _often_ use will just perform the restore before every build: https://github.com/microsoft/terminal/blob/master/tools/bcz.cmd#L69
Author
Owner

@tebeco commented on GitHub (Mar 2, 2020):

Will see if i open a PR here to change the md about building in visual studio, to specify something like "if you directly build in visual studio, you will need to explictly restore first using nuget.exe etc ..."

To be honest i wonder why dotnet restore does not work.
C++ package are not yet properly supported ? hope it land on 5.x, will open an issue in nuget/home later about that

@tebeco commented on GitHub (Mar 2, 2020): Will see if i open a PR here to change the `md` about `building in visual studio`, to specify something like "if you directly build in visual studio, you will need to explictly restore first using nuget.exe etc ..." To be honest i wonder why `dotnet restore` does not work. C++ package are not yet properly supported ? hope it land on 5.x, will open an issue in `nuget/home` later about that
Author
Owner

@tebeco commented on GitHub (Mar 2, 2020):

@zadjii-msft
thx for this :

I'll alt-tab over to VS, and confirm the changes build by building CascadiaPackage. I'll typically just right click on it to build only that project:

It seems to be working properly whereas Ctrl+Shift+B won't
Building cascadia build only 29 projects out of the 62 projects ^^
(... and now on master it seems to bypass these Warning, may be fixed already)

@tebeco commented on GitHub (Mar 2, 2020): @zadjii-msft thx for this : > I'll alt-tab over to VS, and confirm the changes build by building CascadiaPackage. I'll typically just right click on it to build only that project: It seems to be working properly whereas `Ctrl+Shift+B` won't Building cascadia build only `29 projects` out of the `62 projects` ^^ (... and now on master it seems to bypass these Warning, may be fixed already)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#6665