Announcement

Collapse
No announcement yet.

HS3 Plugin Samples

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • tonlof
    replied
    Originally posted by spud View Post
    you have to change it from Build/Configuration Manager,
    The problem was that Build menu was missing and I follow some guide to activate it but it fails. Then I install VB 2010 Express on another windows 7 English and the Build menu works fine to unhide.

    Then I export all settings and import it to the "problem computer" but it did not appear anyway soo I think I have a bad installation of VB2010 or may be some problem with non English windows version.

    So everything is now working with my English windows 7

    I'm sorry that the thread got so long, maybe I should have created a separate thread. Admin feel free to move it if possible.
    At the same time, I would like to thank everyone for a persistent help.

    Leave a comment:


  • dcorsus
    replied
    Originally posted by spud View Post
    win7 32-bit or 64-bit?
    64 bit

    Leave a comment:


  • enigmatheatre
    replied
    Originally posted by spud View Post
    j

    you have to change it from Build/Configuration Manager, somehow if you change from My PRoject/Compile it doesn't work
    Yep thats it.

    Well done spud. Thanks.

    Greig

    Leave a comment:


  • spud
    replied
    Originally posted by dcorsus View Post
    I'm using Win7 & Studio 2010
    win7 32-bit or 64-bit?

    here I' using win7 64-bit & Studio 2010

    Leave a comment:


  • dcorsus
    replied
    Originally posted by tonlof View Post
    Thank you Spud for your ideas.
    I have delete all output folders, change platform to x86 in both debug and release and still have same error. I would be happy if anyone could try the zipfile (HSPI_SAMPLE) so there is no problem with the latest zip.
    Just downloaded, the zipfile. Only issue was that HSCF reference was not OK. After setting that, compiled error free, runs remote under debugger, no problem.

    Which version of Compiler are you using? Which OS version? I'm using Win7 & Studio 2010. I DO NOT copy any of the reference DLLs, I point the reference to the files in the HS3 directory AND compile into the HS3 directory. I'm on HS3 version .38

    If I change the CPU type like Spud is indicating than I have the same problem.


    Dirk

    Leave a comment:


  • spud
    replied
    just tried again with HSPI_SAMPLE, got the same error as you.

    then I changed platform to x86 from Build/Configuration Manager menu and everything is ok now

    you have to change it from Build/Configuration Manager, somehow if you change from My PRoject/Compile it doesn't work

    Leave a comment:


  • tonlof
    replied
    Originally posted by enigmatheatre View Post
    HI Tony,


    I to am getting this so you are not alone. I will see what I can do to solve it.

    Greig.
    Thank you Greig I have struggled with it whole day.

    Leave a comment:


  • enigmatheatre
    replied
    Originally posted by tonlof View Post
    Thank you Spud for your ideas.
    I have delete all output folders, change platform to x86 in both debug and release and still have same error. I would be happy if anyone could try the zipfile (HSPI_SAMPLE) so there is no problem with the latest zip.
    HI Tony,


    I to am getting this so you are not alone. I will see what I can do to solve it.

    Greig.

    Leave a comment:


  • tonlof
    replied
    Thank you Spud for your ideas.
    I have delete all output folders, change platform to x86 in both debug and release and still have same error. I would be happy if anyone could try the zipfile (HSPI_SAMPLE) so there is no problem with the latest zip.

    Leave a comment:


  • spud
    replied
    Did you try to change it to "x86" instead of "Any CPU" and rebuild it?
    This was my problem and there is good chances this is yours too; it's the first tip given by msdn for the System.BadImageFormatException: http://msdn.microsoft.com/en-us/libr...=vs.90%29.aspx

    Also when you change to x86 and rebuild, it is then written to a different directory so make sure you use the good one.

    Leave a comment:


  • tonlof
    replied
    Originally posted by dcorsus View Post
    Still concerned about this: C:/utveckling/HSPI_SAMPLE/bin/Debug/HomeSeerAPI.DLL

    why is this not your c:\Program Files (x86)\Homeseer HS3 \HomeSeerAPI.DLL ??

    Did you copy the HomeSeerAPI.DLL to some other directory? Is this file accessible, perhaps corrupt, perhaps old?

    Dirk
    I have add them directly from Homeseer root folder.
    Attached Files

    Leave a comment:


  • dcorsus
    replied
    Originally posted by tonlof View Post
    Here is the exception error but I can't say that I become wiser

    System.TypeInitializationException was unhandled
    Message=The type initializer for 'HSPI_SAMPLE.Main' threw an exception.
    Source=HSPI_SAMPLE
    TypeName=HSPI_SAMPLE.Main
    StackTrace:
    at HSPI_SAMPLE.Main.Main()
    at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
    at System.Runtime.Hosting.ApplicationActivator.CreateInstance(A ctivationContext activationContext, String[] activationCustomData)
    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssem blyDebugInZone()
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()
    InnerException: System.BadImageFormatException
    Message=Could not load file or assembly 'HomeSeerAPI, Version=1.0.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
    Source=HSPI_SAMPLE
    FileName=HomeSeerAPI, Version=1.0.1.0, Culture=neutral, PublicKeyToken=null
    FusionLog==== Pre-bind state information ===
    LOG: User = ithemmet-Dator\ithemmet
    LOG: DisplayName = HomeSeerAPI, Version=1.0.1.0, Culture=neutral, PublicKeyToken=null
    (Fully-specified)
    LOG: Appbase = file:///C:/utveckling/HSPI_SAMPLE/bin/Debug/
    LOG: Initial PrivatePath = NULL
    Calling assembly : HSPI_SAMPLE, Version=1.0.0.5, Culture=neutral, PublicKeyToken=null.
    ===
    LOG: This bind starts in default load context.
    LOG: Using application configuration file: C:\utveckling\HSPI_SAMPLE\bin\Debug\HSPI_SAMPLE.exe.config
    LOG: Using host configuration file:
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machi ne.config.
    LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
    LOG: Attempting download of new URL file:///C:/utveckling/HSPI_SAMPLE/bin/Debug/HomeSeerAPI.DLL.
    ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.

    StackTrace:
    at HSPI_SAMPLE.Main..cctor()
    InnerException:
    Still concerned about this: C:/utveckling/HSPI_SAMPLE/bin/Debug/HomeSeerAPI.DLL

    why is this not your c:\Program Files (x86)\Homeseer HS3 \HomeSeerAPI.DLL ??

    Did you copy the HomeSeerAPI.DLL to some other directory? Is this file accessible, perhaps corrupt, perhaps old?

    Dirk

    Leave a comment:


  • tonlof
    replied
    Originally posted by dcorsus View Post
    Have you tried to run it in Studio itself? Does the source code debugger show you where it goes wrong?

    Dirk
    Here is the exception error but I can't say that I become wiser

    System.TypeInitializationException was unhandled
    Message=The type initializer for 'HSPI_SAMPLE.Main' threw an exception.
    Source=HSPI_SAMPLE
    TypeName=HSPI_SAMPLE.Main
    StackTrace:
    at HSPI_SAMPLE.Main.Main()
    at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
    at System.Runtime.Hosting.ApplicationActivator.CreateInstance(A ctivationContext activationContext, String[] activationCustomData)
    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssem blyDebugInZone()
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()
    InnerException: System.BadImageFormatException
    Message=Could not load file or assembly 'HomeSeerAPI, Version=1.0.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
    Source=HSPI_SAMPLE
    FileName=HomeSeerAPI, Version=1.0.1.0, Culture=neutral, PublicKeyToken=null
    FusionLog==== Pre-bind state information ===
    LOG: User = ithemmet-Dator\ithemmet
    LOG: DisplayName = HomeSeerAPI, Version=1.0.1.0, Culture=neutral, PublicKeyToken=null
    (Fully-specified)
    LOG: Appbase = file:///C:/utveckling/HSPI_SAMPLE/bin/Debug/
    LOG: Initial PrivatePath = NULL
    Calling assembly : HSPI_SAMPLE, Version=1.0.0.5, Culture=neutral, PublicKeyToken=null.
    ===
    LOG: This bind starts in default load context.
    LOG: Using application configuration file: C:\utveckling\HSPI_SAMPLE\bin\Debug\HSPI_SAMPLE.exe.config
    LOG: Using host configuration file:
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machi ne.config.
    LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
    LOG: Attempting download of new URL file:///C:/utveckling/HSPI_SAMPLE/bin/Debug/HomeSeerAPI.DLL.
    ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.

    StackTrace:
    at HSPI_SAMPLE.Main..cctor()
    InnerException:

    Leave a comment:


  • dcorsus
    replied
    Originally posted by tonlof View Post
    Hi Dirk, Yes on both. I have no problem with the other samples in the zipfile. Only HSPI_SAMPLE
    Have you tried to run it in Studio itself? Does the source code debugger show you where it goes wrong?

    Dirk

    Leave a comment:


  • tonlof
    replied
    Originally posted by dcorsus View Post
    In the references section, do you have the Reference "HomeSeerAPI" pointing to the right file, ie the HS3 file? Is the target framework set to .NET 4?

    Dirk
    Hi Dirk, Yes on both. I have no problem with the other samples in the zipfile. Only HSPI_SAMPLE

    Leave a comment:

Working...
X