VisualStudio2003 and .netmodule
-
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
-
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
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."
-
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."
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