Re: Integrating VB 2005 module.



Assuming you know where the netmodule is at compile time, you should be
able to tweak the csc task to add the /addmodule command line switch and
then point to your VB module.

This is assuming you are talking about a netmodule, not a VB module
file. If you are talking about a module file, then you will have to compile
it to a netmodule (you can use the command line VB compiler to do this) and
then proceed with the instructions above to integrate it into your C#
project.

However, you will not be able to reference the functions while you code
your project, which I am pretty sure is what you don't want.

If you want to integrate those functions into your C# project, then you
either have to compile it into an assembly (which I am curious why you can't
do that) or convert the code to C# and include that in your project.


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx

"RP" <rpk.general@xxxxxxxxx> wrote in message
news:1187119862.319411.241220@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a module written using VB 2005 which contains many ready to use
functions. For some specific reasons, I cannot make it a DLL. Can I
integrate this module in my C# project? If yes, how.



.



Relevant Pages

  • Re: Including C# file in a VC++.NET project
    ... Here is how you can build a dll from two different code netmodules ... // compile as cs file that calls into a cpp code module; ... > netmodule, at least I have not been able to figure this out. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Integrating VB 2005 module.
    ... I have some Database Connection objects in that module. ... This is assuming you are talking about a netmodule, ... If you are talking about a module file, then you will have to compile ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Curiosity: C# and C++ in one assembly
    ... you can compile one of your projects into a netmodule. ... Also note that while they are then part of the same assembly for security purposes, I believe they are still separate files. ... There is an ILMerge utility around somewhere that would generate a single file, not sure if it is updated to support the latest .NET assembly format. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Mixing and matching languages.
    ... You could always compile the code as a netmodule ... that using a DLL is generally the better way to go, ... I need to make changes to the VB app ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Mixing and matching languages.
    ... This isn't necessarily true. ... You could always compile the code as a netmodule ... using a DLL is generally the better way to go, ...
    (microsoft.public.dotnet.languages.csharp)