Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Install-VSCode.ps1 script #716

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
daviwil merged 1 commit into PowerShell:develop from daviwil:install-script
May 7, 2017
Merged

Conversation

@daviwil
Copy link
Contributor

@daviwil daviwil commented May 7, 2017

This change adds a new script that can be used to install Visual Studio
Code and the PowerShell extension. The intent is for this script to be
shipped to the PowerShell Gallery so that one can easily get the script
and install VS Code in a single line of PowerShell.

rkeithhill reacted with thumbs up emoji
Copy link
Contributor Author

daviwil commented May 7, 2017

Would definitely appreciate some feedback on the quality of this script!

Copy link
Contributor

dfinke commented May 7, 2017

Uninstalled both the current and insiders vs code versions. Ran the script, worked like a charm. I'll try again and make sure the PSES ext is not installed too.

image

#>
[CmdletBinding()]
param(
[Parameter(Mandatory=$false)]
Copy link
Contributor

@rkeithhill rkeithhill May 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I usually don't bother specifying Mandatory=$false since that is the default. Other than that LGTM.

Copy link
Contributor Author

@daviwil daviwil May 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh yep, thanks!

This change adds a new script that can be used to install Visual Studio
Code and the PowerShell extension. The intent is for this script to be
shipped to the PowerShell Gallery so that one can easily get the script
and install VS Code in a single line of PowerShell.
Copy link
Contributor Author

daviwil commented May 7, 2017

Thanks guys!

@daviwil daviwil merged commit fc2ea7b into PowerShell:develop May 7, 2017
@daviwil daviwil deleted the install-script branch May 7, 2017 20:33
Copy link

Although this worked initially, I tried uninstalling the PowerShell Extension before uninstalling VSCode, and this time got this error which left VSCode installed without the PowerShell Extension:
image

Copy link
Contributor Author

daviwil commented May 8, 2017

Argh, yeah, VS Code has this weird thing where they need to update their internal extension metadata by restarting the editor. If you uninstall the extension and close the editor then try to reinstall the extension via command line, VS Code throws up. Not sure if there's a way around that yet, but I'll see what I can figure out.

Thanks for letting me know!

Copy link

Ah that was my bad then as I didn't restart code before uninstalling during the test.
It worked as expected once I did the above, but struggled to delete the previously downloaded "vscode-stable.exe" file in $env:TEMP. That looks like a known issue though, so I manually deleted before the successful test shown below:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

@rkeithhill rkeithhill rkeithhill approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /