.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can not compile successfully

5 REPLIES 5
Reply
Message 1 of 6
rtejada
709 Views, 5 Replies

Can not compile successfully

I am trying to compile in VS 2005 using the "Register for COM Interop" option on the compile tab and the "Make Assembly Com Visible" on the Application Assembly information.

A compile error happens when using the following initialization directive (I have ommited the closing characters of the directive, since they do not display in the forum)

Assembly: ExtensionApplication(GetType(mynamespace.Initialization))


I get the following error

Cannot register assembly "C:..myapps.dll". The specified module could not be found. (Exception from HRESULT: 0x8007007E)


Any help I wil really appreciate
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: rtejada

Your post and your code does not make it clear what
language you're using. I don't know about VB, but in
C#, "GetType()" is a method, which cannot be used in
an attribute constructor.

In C#, you use typeof(ClassName) to specify a
type in an attribute.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5344909@discussion.autodesk.com...
I am trying to compile in VS 2005 using the "Register for COM Interop" option on the compile tab and the "Make Assembly Com Visible" on the Application Assembly information.

A compile error happens when using the following initialization directive (I have ommited the closing characters of the directive, since they do not display in the forum)

Assembly: ExtensionApplication(GetType(mynamespace.Initialization))


I get the following error

Cannot register assembly "C:..myapps.dll". The specified module could not be found. (Exception from HRESULT: 0x8007007E)


Any help I wil really appreciate
Message 3 of 6
rtejada
in reply to: rtejada

Hi Tony
I am using VB, but I assume it will be the same for C#. In C# it will be something like.

[assembly: ExtensionApplication(typeof(InitClass))]

The rest is according to the vbnet labs, Have you try to compile with the "Register for COM Interop" and "Make Assembly Com Visible" options in VS 2005?. If I uncheck them it works fine, but I need the assembly to register as com.

Thanks for your help
Message 4 of 6
Anonymous
in reply to: rtejada

I think you need to sign the assembly.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5345204@discussion.autodesk.com...
Hi Tony
I am using VB, but I assume it will be the same for C#. In C# it will be something like.

[assembly: ExtensionApplication(typeof(InitClass))]

The rest is according to the vbnet labs, Have you try to compile with the "Register for COM Interop" and "Make Assembly Com Visible" options in VS 2005?. If I uncheck them it works fine, but I need the assembly to register as com.

Thanks for your help
Message 5 of 6
rtejada
in reply to: rtejada

To be able to sign, I guess you meant uncheck the com options and then compile the project by selecting the sign with strong name option?. The thing is once I do that, how can I expose the assembly as com?. I checked some tools like Regasm.exe to do that, I try that over the weekend.
Thanks
Message 6 of 6
andy62
in reply to: rtejada

I have the same problem! 😞
when I debug a solution return the follow error:
Error 1 Cannot register assembly "C:\Applica\ACadMap\AcadMapAddIn\AcadMapAddIn\AcadMapAddIn\bin\Debug\AcadMapAddIn.dll". The specified module could not be found. (Exception from HRESULT: 0x8007007E) AcadMapAddIn

when I add the sign retun also the follow:
Error 2 Unable to emit assembly: Referenced assembly 'acdbmgd' does not have a strong name AcadMapAddIn

terrible!
andrea

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost