-
Notifications
You must be signed in to change notification settings - Fork 8.1k
fix build in vscode #5453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
fix build in vscode #5453
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6b93dee
fix build in vscode
SteveL-MSFT c4d0993
address PR feedback
SteveL-MSFT c1f0bea
removed Test task as running tests require elevation on Windows
SteveL-MSFT b558516
address PR feedback
SteveL-MSFT 83beea4
add /property:GenerateFullPaths=true to build
SteveL-MSFT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -461,7 +461,7 @@ Fix steps: | |
| } | ||
|
|
||
| # setup arguments | ||
| $Arguments = @("publish") | ||
| $Arguments = @("publish","/property:GenerateFullPaths=true") | ||
| if ($Output) { | ||
| $Arguments += "--output", $Output | ||
| } | ||
|
|
@@ -570,9 +570,22 @@ Fix steps: | |
| } else { | ||
| $ReleaseVersion = (Get-PSCommitId) -replace '^v' | ||
| } | ||
| # in VSCode, depending on where you started it from, the git commit id may be empty so provide a default value | ||
| if (!$ReleaseVersion) { | ||
| $ReleaseVersion = "6.0.0" | ||
| $fileVersion = "6.0.0" | ||
| } else { | ||
| $fileVersion = $ReleaseVersion.Split("-")[0] | ||
| } | ||
|
|
||
| # in VSCode, the build output folder doesn't include the name of the exe so we have to add it for rcedit | ||
| $pwshPath = $Options.Output | ||
| if (!$pwshPath.EndsWith("pwsh.exe")) { | ||
| $pwshPath = Join-Path $Options.Output "pwsh.exe" | ||
| } | ||
|
|
||
| Start-NativeExecution { & "~/.rcedit/rcedit-x64.exe" "$($Options.Output)" --set-icon "$PSScriptRoot\assets\Powershell_black.ico" ` | ||
| --set-file-version $ReleaseVersion --set-product-version $ReleaseVersion --set-version-string "ProductName" "PowerShell Core 6" ` | ||
| Start-NativeExecution { & "~/.rcedit/rcedit-x64.exe" $pwshPath --set-icon "$PSScriptRoot\assets\Powershell_black.ico" ` | ||
| --set-file-version $fileVersion --set-product-version $ReleaseVersion --set-version-string "ProductName" "PowerShell Core 6" ` | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will fix |
||
| --set-requested-execution-level "asInvoker" --set-version-string "LegalCopyright" "(C) Microsoft Corporation. All Rights Reserved." } | Write-Verbose | ||
| } | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Can you add the same parameter to the
Clean Buildtask above? Also,Clean Buildreads a little awkward. What if we called this taskRebuild? On VS at least, that implies Clean, then Build.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW I was just going to warn you about this issue when I saw you not only already knew about it but solved it. 👍 Also, I tagged onto this VSCode issue on the $mscompile problem matcher not working - microsoft/vscode#34660
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will add to
Clean Buildwhich I think is named fineUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SteveL-MSFT I got a response from the VSCode team on the $mscompile issue. All we need to do is add the command line arg -
/property:GenerateFullPaths=true. I tried putting this around line 485:And it works! There may be other places where this arg needs to be provided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will add. Thanks!