From: Dr. Leff on
I am having trouble preparing two modules with a multifile assembly as
described
in <A href="http://msdn.microsoft.com/en-us/library/
226t7yxe.aspx">(Howto: Build a multifile assembly in the MSD .net
Framework Developers Guide</A>

I am using Visual Studio 10.

Here is my batch file:

vbc /t:module c.vb
vbc /addmodule:c.netmodule /t:module d.vb

Here are my two simple utilities to test:

C.vb

imports System
public class c
public sub cc
console.writeline ("c.cc called")
end sub
end class

D.vb


imports system
public class d
public shared sub main ()
dim c as c
c = new c()
c.cc()
end sub
end class

When I run d.netmodule and start up the debugger in Visual Stuido I
get
a BadImageFormatException. "The module was expected to contain an
assembly manifest"

I added to my batch file the following line


al d.netmodule /main:d.main /out:d.exe /target:exe

When I run d.exe, it has a problem and when I started the Visual
Studio
debugger, I got error message

BadImageFormatException was unhandled
An attempt was made to load a program with an incorrect format.
Exception from HRESULT: 0x8007000B

I also tried the project addreference capability from the Visual
Studio
IDE on c.netmodule. It said:

A reference to p:\c.netmodule could not be added. Please make sure
that the file is accessible, ...
From: Mike Williams on
"Dr. Leff" <doctorleff(a)gmail.com> wrote in message
news:e9e9ad4e-671f-48eb-8f7c-b78ce1ded379(a)x21g2000yqa.googlegroups.com...

> I am having trouble preparing two modules with a multifile
> assembly as described . . . I am using Visual Studio 10.

You're in the wrong group. This group is for the real Visual Basic, the
latest version of which is VB6. The product you are using is commonly called
a dotnet product and it is an imposter. Questions relating to the imposter
should be addressed to one of the imposter's own newsgroups. However,
Micro$oft is in the process of closing down its own dotnet imposter
newsgroup (or has perhaps already closed it down) so you'll need to look for
one of Micro$oft's new heavily policed forums, where you will be able to
post little pictures of your problem and where you will be allowed to stay
so long as you do not say anything that Micro$oft does not like.

Mike