how compile sources VB.NET & C# with command line?

A

Alfonso Melchionna

How can I compile in .NET Framework modules written in various languages
(VB.NET, C# and others) having, finally, one result (e.g. an EXE), using
common namespaces?
 
R

Robby

Compile the VB files with the Visual Basic Complier (vbc.exe) using the
/target:module switch. Then do the same with the C# Compiler (sorry, I
don't know the name) and the CS files. Then use the Assembly Linker
(al.exe) passing the two modules from the previous step and use the /out and
/target:exe switches.

--Robby
 
A

Alfonso Melchionna

Ok. I know this. The problem begin put into the modules definition common
namespace.

i.e.
-Vbmodule.vb
Namespace MyNamespace
public Class ClassVB
.....
....
End Namespace

-Csmodule.cs
Namespace MyNamespace
{

public static main ()
.....
// Use class of of Class ClassVB
....
}

How import the MyNamespace the modules. I like one .exe

Alfonso
 
J

John Azzolina

Have you removed the default namespace from the VB Project?
Right click on the project and choose project properties.
Clear out the textbox for "Root Namespace" (just leave it blank) and
explicitly use the same namesapce throughout your apps.

-John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top