locked
stdole.dll RRS feed

  • Question

  • I'm trying to deploy a program that has excel interlop in it and I can getit installed on any computer. I'm getting the message:

    PLATFORM VERSION INFO
     Windows    : 5.1.2600.196608 (Win32NT)
     Common Language Runtime  : 2.0.50727.832
     System.Deployment.dll   : 2.0.50727.832 (QFE.050727-8300)
     mscorwks.dll    : 2.0.50727.832 (QFE.050727-8300)
     dfdll.dll    : 2.0.50727.42 (RTM.050727-4200)
     dfshim.dll    : 2.0.50727.42 (RTM.050727-4200)

    SOURCES
     Deployment url   : file:///K:/billingmngr/publish/TestApp.application
     Deployment Provider url  : file://glmifs3/shared/billingmngr/publish/TestApp.application
     Application url   : file://glmifs3/shared/billingmngr/publish/TestApp_1_0_0_16/TestApp.exe.manifest

    IDENTITIES
     Deployment Identity  : TestApp.application, Version=1.0.0.16, Culture=neutral, PublicKeyToken=b55df9cf635f4084, processorArchitecture=msil
     Application Identity  : TestApp.exe, Version=1.0.0.16, Culture=neutral, PublicKeyToken=b55df9cf635f4084, processorArchitecture=msil, type=win32

    APPLICATION SUMMARY
     * Installable application.

    ERROR SUMMARY
     Below is a summary of the errors, details of these errors are listed later in the log.
     * Activation of K:\billingmngr\publish\TestApp.application resulted in exception. Following failure messages were detected:
      + Strong name signature not valid for this assembly stdole.dll.

    COMPONENT STORE TRANSACTION FAILURE SUMMARY
     No transaction error was detected.

    WARNINGS
     There were no warnings during this operation.

    OPERATION PROGRESS STATUS
     * [8/13/2008 4:38:58 PM] : Activation of K:\billingmngr\publish\TestApp.application has started.
     * [8/13/2008 4:39:00 PM] : Processing of deployment manifest has successfully completed.
     * [8/13/2008 4:39:00 PM] : Installation of the application has started.
     * [8/13/2008 4:39:00 PM] : Processing of application manifest has successfully completed.
     * [8/13/2008 4:39:13 PM] : Request of trust and detection of platform is complete.

    ERROR DETAILS
     Following errors were detected during this operation.
     * [8/13/2008 4:39:15 PM] System.Deployment.Application.InvalidDeploymentException (SignatureValidation)
      - Strong name signature not valid for this assembly stdole.dll.
      - Source: System.Deployment
      - Stack trace:
       at System.Deployment.Application.ComponentVerifier.VerifyStrongNameAssembly(String filePath, AssemblyManifest assemblyManifest)
       at System.Deployment.Application.ComponentVerifier.StrongNameAssemblyComponent.Verify()
       at System.Deployment.Application.ComponentVerifier.VerifyComponents()
       at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
       at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
       at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState subState, ActivationDescription actDesc)
       at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut)
       at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

    COMPONENT STORE TRANSACTION DETAILS
     No transaction information is available.

    Any suggestions?

    Monday, August 18, 2008 12:58 PM

Answers

  • It sounds that you missing the DLL so cause the error. You should add interop DLL to your project instead of just refer it from COM. And then include it to your application in the publish page. I have meet such kind of problem before. So I always add it to the project before using it and the problem solved.

    Friday, August 22, 2008 2:11 AM

All replies

  •  

    Are you including the Interop tools as a prerequisite in your deployment?

     

    RobinS.

    GoldMail.com

     

    Monday, August 18, 2008 6:02 PM
  •  

    I didn't see it as a part of the prerequisites in the prerequisites button under the publish tab. Should I be looking somewhere else?

    Monday, August 18, 2008 7:16 PM
  • Do you happen to be using VS2008, and is the version of Office you're targeting 2007? If so, if you install SP-1 for VS2008, it will add the PIA's to the prerequisite list.

     

    If not, you have to add it yourself.

     

    Post back and let me know, and if needed, I will post instructions on adding it.

     

    RobinS.

    GoldMail.com

    Monday, August 18, 2008 9:08 PM
  • I'm running version 2005 and I'm targeting 2007 of office. I'm also running 2.0.5.0727 SP1 framework. Does that help?

    Tuesday, August 19, 2008 1:24 PM
  • Hi 2Bwell

     

    Base on my experience, when you want to deploy an application which have COM reference. You should use Registration-free COM technology. If your operating system version is higher than Windows XP SP2, you can use this technology to deploy COM without registry it on the client computer which install the application.

    Here is an article: Registration-Free Activation of COM Components

     

    As for the Strong Name, please check if the interop has already be signed. Right click on the refered interop DLL and view the property, if the Strong Name is true, the assembly has been signed, if it is false, you should sign it first. At the property page of the project, there is a tabpage named “Signing”, click it and check the “Sign the assembly” CheckBox and choose an exist *.snk file to sign your assembly.

     

    If you have any more question, please feel free to let me know.

     

    Best Regards,

    Kira Qian

     

    Windows Forms General FAQs
    Windows Forms Data Controls and Databinding FAQs

    Thursday, August 21, 2008 7:44 AM
  • This is just flat out insane.

    I am linking to a snk file and do have it set to sign. I read about the COM components and it looks really complicated. The thing I don’t understand is if I copy it on to the computer it works perfectly fine, so I’m going to my DOS roots and just going to create a bat file to update it. Thanks all for the help. I’m sure if I was smarter and had more time I’d be right with ya.

     

    Thursday, August 21, 2008 2:11 PM
  • It sounds that you missing the DLL so cause the error. You should add interop DLL to your project instead of just refer it from COM. And then include it to your application in the publish page. I have meet such kind of problem before. So I always add it to the project before using it and the problem solved.

    Friday, August 22, 2008 2:11 AM
  • That was it. I ran attrib /s stole.dll > stodole.txt. It gave me a bunch of results and some were locked out due to security. I ended up adding:

    C:\Program Files\Microsoft.NET\Primary Interop Assemblies\stdole.dll

     

    and it deploys fine now. Thanks.

    Friday, August 22, 2008 2:24 PM
  • That was it. I ran attrib /s stole.dll > stodole.txt. It gave me a bunch of results and some were locked out due to security. I ended up adding:

    C:\Program Files\Microsoft.NET\Primary Interop Assemblies\stdole.dll

     

    and it deploys fine now. Thanks.


    Hi

    I'm facing the same problem. How did you add the file? What did you add?

    Thanks
    Thursday, April 2, 2009 2:11 PM
  • My guess would be that he added stdole.dll to his project, and included it in the deployment (build action = content, copy to output = always). Give that a try and see if it works.

    RobinS.
    GoldMail.com
    Ts'i mahnu uterna ot twan ot geifur hingts uto.
    Friday, April 3, 2009 8:46 AM
  • My guess would be that he added stdole.dll to his project, and included it in the deployment (build action = content, copy to output = always). Give that a try and see if it works.

    RobinS.
    GoldMail.com
    Ts'i mahnu uterna ot twan ot geifur hingts uto.

    Hi

    Ok, but the problem is that i don't know how and where to add the file. I'm on the publish tab in the VB2008 IDE and I don't see where I can add a file.
    Friday, April 3, 2009 9:07 AM
  • Try right-clicking on your main solution and choose "add existing item". select the stdole.dll (Obviously you're going to have to find it beforehand). Set build action = "content" and copy-to-output as "copy always".

    Do you have it listed in the References for any of the projects? If so, you'll want to remove the reference and add it, pointing it a tthe file in the project that you just added.

    This will cause it to be deployed with everything else. I don't know if it will work, mind you, but it will deploy with your app. I always though stdole.dll was a system file and would go in the GAC, but hey, it's free to try.

    RobinS.
    GoldMail.com
    Ts'i mahnu uterna ot twan ot geifur hingts uto.
    Friday, April 3, 2009 9:59 PM
  • Chris,
    I am sure you must have had solved the problem " Strong name signature not valid for this assembly stdole.dll" by following RobinDotNet instructions.


    I am sure there are alot of newbies who are still unable to solve it finding difficulties in the steps involved. (like a colleague, who had to google it for 4 days, and still failing)

    Here is the steps involve that should solve the problem (NOTE: for newbies and intermediate users... Advanced users would have solved it by now)

     

    1)      Open Visual Studio Command Prompt.

    2)      Locate stdole.dll (default path is: c:\program files\common files\Microsoft Shared\MsEnv\publicAssemblies) … The path may vary. You may need to search stdole.dll if its not in publicassemblies folder.

    3)      Once you are in the directory where stdole.dll is located in Visual Studio Command Prompt, you need to create a signature key using Strong Name Utility, how?

    4)      Type “sn –k stdole.snk” (the keyfile name does not necessarily have to be stdole.snk, it could be anything)

    5)      Stdole.snk file will be created, giving a success message “key pair written to stdole.snk”

    6)      After a signature file is created, we will need to sign out dll file.

    7)      Now, Type

    “ildasm stdole.dll /out:stdole.il”

    8)      Re-Assemble using your strong-name key
            “ilasm stdole.il /res:stdole.res /dll /key:stdole.snk /out:stdole.dll”

    9)      A Success message should appear “Operation Completed Successfully”

    10)  To verify if the whole process has been successful and if stdole.dll has been properly signed, Type:

    “sn -vf stdole.dll”

    11)  “Assembly ‘stdole.dll’ is valid” should appear now.

     

    Now you will have to attach this assembly in your solution.

     

    I will be following RobinDotNet instructions now. (Full credit given to RobinDotNet)

     

    12)  Right click your solution icon (Top Right area) and choose "Add Existing Item".

    13)  Browse to the folder where the signed stdole.dll file is located. And select this signed stdole.dll file.

    14)  After you have attached this file with the solution, it will be better to attach this file with all the projects you have in the solution.

    15)  For example, you have 3 projects in this solution.

    16)  You will have to right-click References folder and choose ‘Add Reference’

    17)  Again browse to the folder where the signed stdole.dll file is located and select it. It should be added in the project references.

    18)  Repeat step 16-17 for the remaining 2 projects.

    19)  Now verify that all the 3 projects have stdole.dll referenced plus the solution should also have this file referenced.

    20)  Now finally deploy you project.

     

    I hope this helped.

     






    Thursday, July 2, 2009 8:15 AM
  • Hi, 
    I solved the problem this way.
    1. clicked on my solution and i wanted to add a reference. There i found 4 paths to stdole.dll

    2. I opened the path "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11" and "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office12" where i found the stdole.dll wich was 16kb large and not signed

    3. Opened the path "C:\Program Files (x86)\Microsoft.NET\Primary Interop Assemblies" where i found the stdole.dll wich was 25kb large and signed

    4. I replaced the unsigned dlls with the signed ones and did another publish and it worked.

    It is still kinda strange that the dlls that come with office are not signed but the ones who come with .net framework are?

     
    • Proposed as answer by RobinDotNet Monday, February 8, 2010 9:12 PM
    Thursday, February 4, 2010 12:49 PM