Compilation errors

Apr 12, 2012 at 2:28 PM

Hi,

 

I would like to see how this plugin works and I have downloaded the latest source (pytools-70f7b11cf95c.zip).
I am using VS201 Ultimate SP1 + VS 2010 SDK SP1 but when I try to compile I get the following errors :

Error 5 Exception has been thrown by the target of an invocation. ReplWindowError 7 Exception has been thrown by the target of an invocation. PythonToolsError 9 Could not load file or assembly 'Microsoft.PythonTools.Profiling, Version=1.8.40818.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) C:\Developer\cygwin\home\Joe\projects\parsing\VisualStudioIntegration\pytools_70f7b11cf95c\Release\Product\Python\Profiling\CreatePkgDef ProfilingError 10 Strong name validation failed. (Exception from HRESULT: 0x8013141A) C:\Developer\cygwin\home\Joe\projects\parsing\VisualStudioIntegration\pytools_70f7b11cf95c\Release\Product\Python\Profiling\CreatePkgDef ProfilingError 12 Could not load file or assembly 'Microsoft.PythonTools.IronPython, Version=1.8.40818.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) C:\Developer\cygwin\home\Joe\projects\parsing\VisualStudioIntegration\pytools_70f7b11cf95c\Release\Product\Python\IronPython\CreatePkgDef IronPythonError 13 Strong name validation failed. (Exception from HRESULT: 0x8013141A) C:\Developer\cygwin\home\Joe\projects\parsing\VisualStudioIntegration\pytools_70f7b11cf95c\Release\Product\Python\IronPython\CreatePkgDef IronPython

about the signing problem I suppose I need to generate my own keypair but what about the other issues ?

Thanks

Apr 12, 2012 at 2:37 PM
Edited Apr 12, 2012 at 2:41 PM

When I generate new keypair then I got ons of errors like :

 

Error 3 'Microsoft.PythonTools.Debugger.DebugAttach' is inaccessible due to its protection level C:\Developer\cygwin\home\Vincent\projects\parsing\VisualStudioIntegration\pytools_70f7b11cf95c\Release\Product\Python\AttacherX86\PyAttacherX86.cs 18 20 AttacherX86Error 4 The type 'Microsoft.PythonTools.Interpreter.Default.CPythonInterpreterFactory' has no constructors defined C:\Developer\cygwin\home\Vincent\projects\parsing\VisualStudioIntegration\pytools_70f7b11cf95c\Release\Product\Python\Analyzer\PyLibAnalyzer.cs 153 32 AnalyzerError 5 'Microsoft.PythonTools.Interpreter.Default.CPythonInterpreterFactory' is inaccessible due to its protection level C:\Developer\cygwin\home\Vincent\projects\parsing\VisualStudioIntegration\pytools_70f7b11cf95c\Release\Product\Python\Analyzer\PyLibAnalyzer.cs 153 36 AnalyzerError 6 'Microsoft.PythonTools.Interpreter.Default.CPythonInterpreter' does not contain a constructor that takes 2 arguments C:\Developer\cygwin\home\Vincent\projects\parsing\VisualStudioIntegration\pytools_70f7b11cf95c\Release\Product\Python\Analyzer\PyLibAnalyzer.cs 154 59 AnalyzerError 7 'Microsoft.PythonTools.Interpreter.Default.CPythonInterpreter' is inaccessible due to its protection level C:\Developer\cygwin\home\Vincent\projects\parsing\VisualStudioIntegration\pytools_70f7b11cf95c\Release\Product\Python\Analyzer\PyLibAnalyzer.cs 154 63 Analyzer
...

And I have noticed that PyDebugAttach is referenced in the project but I have a warning :Warning 88 The project 'PyDebugAttach' cannot be referenced.  This is not a .NET assembly.

And do I really need to install all this HPC stuff because I am only interested to see how syntax highlighter is implemented ? So I just want to lanch in debug and put a breakpoint in GetClassificationSpans.

Apr 13, 2012 at 6:00 PM

Ok maybe I am frightening everyone with my compilation erros, so my question is what are the steps to
compile python tools ? Is there anything special to know ? What about code signing, should I create my own key pairs ?

Thanks 

Coordinator
Apr 13, 2012 at 6:54 PM

Sorry, just missed this before...  Instead of generating a new key pair just go to Release\Product\Setup\PythonToolsInstaller and open the SnInternal.reg
or SnInternal64.reg depending on if you're on 32-bit or 64-bit OS.  That will enable skip verification for the PTVS assemblies and you won't get the strong name validation errors.

Apr 13, 2012 at 9:57 PM

Thanks but still doesn't work so I am trying to install HPCPack2008R2SP3Exp.zip (http://www.microsoft.com/download/en/details.aspx?id=6535) and when I try I get a message  :

"HPC Pack for workstation can only be installed on a computer that is a member of a Microsoft Active Directory Domain.
To install HPC Pack for Workstation on this computer, cancel this wizard, join this computer to a domain, and then run the 
wizard again."

If I ignore this message, only the client utilities will be installed, so what should I do ?

Coordinator
Apr 13, 2012 at 10:25 PM

Wow, I guess everyone else who's built has been on a domain, that's surprising and a bummer!  We should update our installer so that it can be built w/o all of this stuff being installed, and just have it build w/o the HPC feature.

If you want to just remove the build of the HPC stuff from the installer I think you can remove the:

    <ProjectReference Include="..\PythonHpcSupport\PythonHpcSupport.wixproj">
      <Name>PythonHpcSupportMsm</Name>
      <Project>{45DBE334-D497-4441-B136-5BA636173D26}</Project>
      <Private>True</Private>
      <RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
      <RefTargetDir>INSTALLLOCATION</RefTargetDir>
    </ProjectReference>

That's in Release\Product\Setup\PythonToolsInstaller\PythonToolsInstaller.wixproj

and then remove all of:

    <Property Id="HPC_CLIENT_INSTALLED">
      <ComponentSearch Id="SchedUtil" Guid="4BC84A98-B96A-4564-8BD7-11CE7340DA3B" Type="file" />
    </Property>   

        <Merge Id="PythonHpc" Language="1033" SourceFile="$(var.TargetDir)PythonHpcSupportMsm.msm" DiskId="1" />

      <Feature Id="Feature_WinHpc" AllowAdvertise="no" Level="1" Title="Windows HPC Support" Description="Windows HPC Support">
        <Condition Level="2">NOT HPC_CLIENT_INSTALLED</Condition>
        <MergeRef Id="PythonHpc"/>
      </Feature>

from Release\Product\Setup\PythonToolsInstaller\PythonToolsInstaller.wxs

 

Apr 14, 2012 at 12:16 AM
Edited Apr 14, 2012 at 12:24 AM

Ok finally I have installed HPC (without adding my pc on a domain I just clicked next and it only installed the hpc client
then I could install the hpc sdk.

When trying to rebuild I got these errors 

Error 5 Exception has been thrown by the target of an invocation. ReplWindow
Error7 Exception has been thrown by the target of an invocation. PythonTools
Error 9 Exception has been thrown by the target of an invocation. Profiling

and that was due to the fact I already had installed python tools so I uninstalled and I managed to compile everything.

However when I set PythonTools as Startup Project and once the Experimental Instance of Visual is launched when I try to open a .py file I don't see any syntax highligting, why ?

Coordinator
Apr 14, 2012 at 1:09 AM
You can also do an advanced per user install which will let you build and keep a build installed.

Sent from my Windows Phone

From: smartmobili
Sent: 4/13/2012 4:17 PM
To: Dino Viehland
Subject: Re: Compilation errors [pytools:352039]

From: smartmobili

Ok finally I have installed HPC (without adding my pc on a domain I just clicked next and it only installed the hpc client
then I could install the hpc sdk.

When trying to rebuild I got these errors

Error 5 Exception has been thrown by the target of an invocation. ReplWindow
Error7 Exception has been thrown by the target of an invocation. PythonTools
Error 9 Exception has been thrown by the target of an invocation. Profiling

and that was due to the fact I already had installed python tools so I uninstalled and I managed to compile everything.

Thanks

Apr 14, 2012 at 10:04 AM

When opening a .py file or creating a new python project I get an exception here :

internal static IntellisenseController GetOrCreateController(IComponentModel model, ITextView textView) {
            IntellisenseController controller;
            if (!textView.Properties.TryGetProperty<IntellisenseController>(typeof(IntellisenseController), out controller)) {
                var intellisenseControllerProvider = (
                   from export in model.DefaultExportProvider.GetExports<IIntellisenseControllerProvider, IContentTypeMetadata>()
                   from exportedContentType in export.Metadata.ContentTypes
                   where exportedContentType == PythonCoreConstants.ContentType && export.Value.GetType() == typeof(IntellisenseControllerProvider)
                   select export.Value
                ).First();
                controller = new IntellisenseController((IntellisenseControllerProvider)intellisenseControllerProvider, textView);
            }
            return controller;
        }

because sequence containes no elements. IronPython 2.7.1 was installed before I build the project, could it explain it doesn't work ?

Apr 16, 2012 at 9:55 AM

Argh I found !!!

Actually I have to compile in Release to make it work, seems that debug mode is broken.