Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Set ExtensionInstallationFolder #2 #1210

Merged
merged 6 commits into from
Aug 31, 2017
Merged

Set ExtensionInstallationFolder #2 #1210

merged 6 commits into from
Aug 31, 2017

Conversation

grokys
Copy link
Contributor

@grokys grokys commented Aug 31, 2017

To make sure that the extension is always installed to the same directory (VS 2017 only). #990 did this originally but that wasn't merged as I thought that our issue had been resolved without it. Seems it's still needed as it's causing problems with the VS Installer.

grokys added 2 commits August 31, 2017 11:32
Updated `Microsoft.VisualStudio.Sdk.BuildTasks.14.0` to 14.0.215.
To make sure that the extension is always installed to the same
directory.
@grokys grokys changed the title WIP: Set ExtensionInstallationFolder #2 Set ExtensionInstallationFolder #2 Aug 31, 2017
@grokys grokys requested review from jcansdale and shana August 31, 2017 10:10
shana
shana previously approved these changes Aug 31, 2017
Copy link
Contributor

@shana shana left a comment

Choose a reason for hiding this comment

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

LGTM

@shana
Copy link
Contributor

shana commented Aug 31, 2017

Heh, actually no it's not good, you need to set the flag on all build types, not just debug.

@grokys
Copy link
Contributor Author

grokys commented Aug 31, 2017

Fixed!

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\Microsoft.VisualStudio.Sdk.BuildTasks.14.0.14.0.23-pre\build\Microsoft.VisualStudio.Sdk.BuildTasks.14.0.props" Condition="'$(VisualStudioVersion)' == '14.0' And Exists('..\..\packages\Microsoft.VisualStudio.Sdk.BuildTasks.14.0.14.0.23-pre\build\Microsoft.VisualStudio.Sdk.BuildTasks.14.0.props')" />
<Import Project="..\..\packages\Microsoft.VisualStudio.Sdk.BuildTasks.14.0.14.0.215\build\Microsoft.VisualStudio.Sdk.BuildTasks.14.0.props" Condition="Exists('..\..\packages\Microsoft.VisualStudio.Sdk.BuildTasks.14.0.14.0.215\build\Microsoft.VisualStudio.Sdk.BuildTasks.14.0.props')" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

We'll need to keep the $(VisualStudioVersion)' == '14.0', if we want it to work in VS2015 and VS2017.

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
<Import Project="..\..\packages\Microsoft.VisualStudio.Sdk.BuildTasks.14.0.14.0.215\build\Microsoft.VisualStudio.Sdk.BuildTasks.14.0.props" Condition="Exists('..\..\packages\Microsoft.VisualStudio.Sdk.BuildTasks.14.0.14.0.215\build\Microsoft.VisualStudio.Sdk.BuildTasks.14.0.props')" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Again, we need to keep $(VisualStudioVersion)' == '14.0'. 😉

@@ -15,6 +15,7 @@
<OutputPath>..\..\build\$(Configuration)\</OutputPath>
<VsixType>v3</VsixType>
<IsProductComponent>false</IsProductComponent>
<ExtensionInstallationFolder>GitHub Extension for Visual Studio</ExtensionInstallationFolder>
Copy link
Collaborator

@jcansdale jcansdale Aug 31, 2017

Choose a reason for hiding this comment

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

How about just GitHub? It's in the Extensions folder of Visual Studio after all. 😉

<Import Project="..\..\packages\Microsoft.VSSDK.BuildTools.15.0.26201\build\Microsoft.VSSDK.BuildTools.targets" Condition="'$(VisualStudioVersion)' == '15.0' And Exists('..\..\packages\Microsoft.VSSDK.BuildTools.15.0.26201\build\Microsoft.VSSDK.BuildTools.targets')" />
<Import Project="..\..\packages\Microsoft.VisualStudio.Sdk.BuildTasks.14.0.14.0.215\build\Microsoft.VisualStudio.Sdk.BuildTasks.14.0.targets" Condition="Exists('..\..\packages\Microsoft.VisualStudio.Sdk.BuildTasks.14.0.14.0.215\build\Microsoft.VisualStudio.Sdk.BuildTasks.14.0.targets')" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

More $(VisualStudioVersion)' == '14.0'...

@jcansdale
Copy link
Collaborator

Visual Studio 2015

When installed from Visual Studio (F5):

image

When installed with AllUsers=false:

image

When installed with AllUsers=true:

image

Visual Studio 2017

When installed with AllUsers=true:

image

Tried to revert (there's no uninstall option):
image

I'm now stuck on the following when I try to open the Extensions manager:

image

@jcansdale
Copy link
Collaborator

I'm going to follow instructions from #1206 to try to unscramble this.

Will this happen to anyone who has been auto-updated to the previous version?

@jcansdale
Copy link
Collaborator

jcansdale commented Aug 31, 2017

I've followed the recovery steps from #1206.

When I loaded VS 2017 again I got the following (which is one of our old packages):

image

When I try opening the Extensions and Updates..., I'm still seeing:

image

😭

Looks like I hit the wrong hashid:
c:\programdata\Microsoft\VisualStudio\Packages\_Instances\<hashid>\state.json dir.

It's working again now. Phew!

@jcansdale
Copy link
Collaborator

jcansdale commented Aug 31, 2017

When launching from VS 2017 using F5, I get the following:
image

This is an easy fix. I'll push...

When it runs, assemblies are loaded form the following locations:

image

When installed with AllUSers=false, the extension installs here:

image

It looks like ExtensionInstallationFolder is an AllUsers=true specific feature.

Copy link
Collaborator

@jcansdale jcansdale left a comment

Choose a reason for hiding this comment

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

I've given this a beating and believe it's working as expected. LGTM. 😄

@shana shana merged commit 199108f into master Aug 31, 2017
@shana shana deleted the fixes/installation-folder branch August 31, 2017 17:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants