Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Distributing Application

Distributing Application

Scheduled Pinned Locked Moved C#
csharpvisual-studiohelpquestionannouncement
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jason Pyke
    wrote on last edited by
    #1

    I've written an export type C# application which formats and saves an excel spreadsheet. I added a reference to excel using the .net ide and all seems to work fine on my pc. When I copy the exe (including Excel, VBIDE and Office dlls) to the target pc the application seems to run (and create the target file), but the file it creates contains about 10 characters, all of which are jibberish. The target PC contains the same version of excel as mine, does anyone knowwhat I need to do to make the app work? Do I need to register any of the dlls? Thanks for any help Jason

    H 1 Reply Last reply
    0
    • J Jason Pyke

      I've written an export type C# application which formats and saves an excel spreadsheet. I added a reference to excel using the .net ide and all seems to work fine on my pc. When I copy the exe (including Excel, VBIDE and Office dlls) to the target pc the application seems to run (and create the target file), but the file it creates contains about 10 characters, all of which are jibberish. The target PC contains the same version of excel as mine, does anyone knowwhat I need to do to make the app work? Do I need to register any of the dlls? Thanks for any help Jason

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      No, you do not need to register the DLLs (the only assemblies you would register are those that contain CCWs, or COM-Callable Wrappers - the interop assemblies you're using are RCW, or Runtime-Callable Wrappers, to COM servers already registered). Instead of create the interop assemblies yourself, use the PIAs (Primary Interop Assemblies) from Microsoft - the official assemblies created by them. You can download them for Office XP (just search for Office PIAs on http://msdn.microsoft.com[^]) or install them with Office 2003 Professional as ".NET Framework Support" or something like that. Make sure that these assemblies are either deployed to the same directory as the assemblies you've created (and pay attention to code access security policies if they're not running on the local machine), or install them into the GAC (Global Assembly Cache) using gacutil.exe, ngen.exe (also pre-JITs the IL), drag and drop them to %WINDIR%\assembly, or using an installer like Windows Installer (for which VS.NET has basic installer projects).

      Microsoft MVP, Visual C# My Articles

      A 1 Reply Last reply
      0
      • H Heath Stewart

        No, you do not need to register the DLLs (the only assemblies you would register are those that contain CCWs, or COM-Callable Wrappers - the interop assemblies you're using are RCW, or Runtime-Callable Wrappers, to COM servers already registered). Instead of create the interop assemblies yourself, use the PIAs (Primary Interop Assemblies) from Microsoft - the official assemblies created by them. You can download them for Office XP (just search for Office PIAs on http://msdn.microsoft.com[^]) or install them with Office 2003 Professional as ".NET Framework Support" or something like that. Make sure that these assemblies are either deployed to the same directory as the assemblies you've created (and pay attention to code access security policies if they're not running on the local machine), or install them into the GAC (Global Assembly Cache) using gacutil.exe, ngen.exe (also pre-JITs the IL), drag and drop them to %WINDIR%\assembly, or using an installer like Windows Installer (for which VS.NET has basic installer projects).

        Microsoft MVP, Visual C# My Articles

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        Thanks for the advice, I just about managed to follow it all! (maybe one day i'll increase from newbie status!) The version of office I am using is 2000, so I can't go down the PIA route. I think i'll create an installer for the app as I don't have direct access to the machine, it's an end user performing the install.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups