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. Managed C++/CLI
  4. VisualStudio2003 and .netmodule

VisualStudio2003 and .netmodule

Scheduled Pinned Locked Moved Managed C++/CLI
helpcsharpcollaborationquestion
3 Posts 2 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.
  • S Offline
    S Offline
    sGrabert
    wrote on last edited by
    #1

    I'm currently using VisualStudio2003 (and cannot change due to the fact that other team members are using it too). My current project uses managed code to dynamically link a .NET-DLL into my program, works so far. The only problem is, that to compile and link this DLL I need a [dllname].netmodule file, which can only be generated with VisualStudio2005. The file is generated by linking the dll into my project (references) and automatically used when the dll is loaded. VC2003 does not generate this file automatically, but if it is not present, the DLL cannot be used (access violation). Using google I found this to be a bug in VC2003 but no appropriate solution. Is there any way to generate this file with VC2003 (compiler switch, etc.) automatically?? Thx in advance

    S 1 Reply Last reply
    0
    • S sGrabert

      I'm currently using VisualStudio2003 (and cannot change due to the fact that other team members are using it too). My current project uses managed code to dynamically link a .NET-DLL into my program, works so far. The only problem is, that to compile and link this DLL I need a [dllname].netmodule file, which can only be generated with VisualStudio2005. The file is generated by linking the dll into my project (references) and automatically used when the dll is loaded. VC2003 does not generate this file automatically, but if it is not present, the DLL cannot be used (access violation). Using google I found this to be a bug in VC2003 but no appropriate solution. Is there any way to generate this file with VC2003 (compiler switch, etc.) automatically?? Thx in advance

      S Offline
      S Offline
      sps itsec46
      wrote on last edited by
      #2

      Hi, AFAIK it's currently only supported to compile a netmodule in VS2005 via command line. Currently there is no IDE support for it. Because this really bugged me I looked for another way and ended up changing a single tag in the csproj-file. Before change:

      <OutputType>Library</OutputType>

      After change:

      <OutputType>module</OutputType>

      Works perfectly for me (VS2005) but you've to check if this works in VS2003, too. After you've done this change take care not to change the output type of this project via the IDE anymore. It will of course overwrite your hand-changed tag. Perhaps the following links can help you, too: http://support.microsoft.com/?scid=kb%3Ben-us%3B309805&x=9&y=11[^] http://support.microsoft.com/kb/311416/EN-US/[^]

      cheers, mykel OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

      S 1 Reply Last reply
      0
      • S sps itsec46

        Hi, AFAIK it's currently only supported to compile a netmodule in VS2005 via command line. Currently there is no IDE support for it. Because this really bugged me I looked for another way and ended up changing a single tag in the csproj-file. Before change:

        <OutputType>Library</OutputType>

        After change:

        <OutputType>module</OutputType>

        Works perfectly for me (VS2005) but you've to check if this works in VS2003, too. After you've done this change take care not to change the output type of this project via the IDE anymore. It will of course overwrite your hand-changed tag. Perhaps the following links can help you, too: http://support.microsoft.com/?scid=kb%3Ben-us%3B309805&x=9&y=11[^] http://support.microsoft.com/kb/311416/EN-US/[^]

        cheers, mykel OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

        S Offline
        S Offline
        sGrabert
        wrote on last edited by
        #3

        Well, thank you for your answer but that didn't help.. :( I'm using VC2003 and a .vcproj file to create the dll. The .NET library is linked inside(!) this dll as I want to use some of the implemented functions. The .NET library is linked via assembly reference only: AssemblyReference RelativePath="$(SolutionDir)\include\[.NET].dll" I can access the namespace and library classes at design time. The weired thing is that VC2005 created the [.NET].netmodule automatically (with the same project), but VC2003 does not. Looks like there is no (easy) solution for this bug and I have to use VC2005 to create the module file.. ;) thx -- modified at 6:16 Tuesday 28th August, 2007

        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