Installing the Python Tools in a 'Visual Studio Shell' based 'solution'

Dec 9, 2013 at 7:26 PM
Hi!

I use Atmel Studio 6.1 which is based on 'Visual Studio Shell'. And I would love to install the Python Tool there. Is there a way to do this? Or is this 'Visual Studio Shell' incompatible with Visual Studio?

Best regards and thanks in advance,
Noel
Coordinator
Dec 9, 2013 at 8:33 PM
Is it based on Visual Studio Integrated Shell or Isolated Shell?

If you have VS proper (non-Express) installed on the same machine, and Studio projects etc "merge" into that VS, then it is Integrated; if it remains separate from VS, then it is Isolated. PTVS should install just fine into Integrated Shell (this is exactly what the "PTVS Integrated" installer is).

If it is Isolated, then you won't be able to use the regular installer, but it is quite likely that if you build your own installer that targets your customized Shell, or use other means of installing the extension into the appropriate VS hive (this is actually as easy as downloading and building the source code for PTVS), then it will work. If you're interested in pursuing this, I can go into more details about how you can try this with minimal effort.
Dec 9, 2013 at 8:59 PM
Thank you very much for your reply. It seems to be a Isolated shell (I found a 'Microsoft Visual Studio 2010 Shell (Isolated) - ENU' folder). It would be nice if you could point me to some documentation of if you have any further hints.
Coordinator
Dec 9, 2013 at 10:26 PM
First of all, take a look at the build instructions page for PTVS. Since you're probably not interested in web or HPC features in this context, you should only need the VS SDK dependency to build the project. I would also recommend starting with the source code for 2.0 release, instead of the trunk (which contains a bunch of new code that is not tested as thoroughly).

Now, by default, it builds a bunch of .vsix files that are not readily installable into VS (we have an MSI-based installer that handles that instead; the .vsix are meant to be used for debugging, when you run the extension directly from VS). However, it is possible to change the build so that produced .vsix are regular VS packages that can be installed simply by running them. To do so, you need to locate source.extension.vsixmanifest files in the source, and comment out or delete the following:
<InstalledByMsi>true</InstalledByMsi>
You will also need to enable their installation into Isolated Shell. This is handled by the SupportedProducts element in the manifest, which normally looks something like this:
    <SupportedProducts>
      <!-- The Edition specifications are minimums; any SKU equal or 'higher'
           will accept them. -->
      <VisualStudio Version="10.0">
        <Edition>Pro</Edition>
      </VisualStudio>
    </SupportedProducts>
You need to add an IsolatedShell element to it:
    <SupportedProducts>
      <!-- The Edition specifications are minimums; any SKU equal or 'higher'
           will accept them. -->
      <VisualStudio Version="10.0">
        <Edition>Pro</Edition>
      </VisualStudio>
      <IsolatedShell Version="6.1">AtmelStudio</IsolatedShell>
    </SupportedProducts>
Now you can build the solution, and run Microsoft.VisualStudio.ReplWindow.vsix and Microsoft.PythonTools.vsix - when the installation dialog for the VSIX shows up, you should see Atmel Studio in the list of VS versions to which it will be installed.