.NET

Reply
Valued Contributor
rtejada
Posts: 61
Registered: ‎06-19-2002
Message 1 of 6 (433 Views)

Can not compile successfully

433 Views, 5 Replies
09-28-2006 08:31 PM
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
*Tony Tanzillo
Message 2 of 6 (433 Views)

Re: Can not compile successfully

09-29-2006 05:17 AM 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
Valued Contributor
rtejada
Posts: 61
Registered: ‎06-19-2002
Message 3 of 6 (433 Views)

Re: Can not compile successfully

09-29-2006 05:41 AM 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
*Tony Tanzillo
Message 4 of 6 (433 Views)

Re: Can not compile successfully

09-29-2006 12:10 PM 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
Valued Contributor
rtejada
Posts: 61
Registered: ‎06-19-2002
Message 5 of 6 (433 Views)

Re: Can not compile successfully

09-29-2006 12:32 PM 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
Contributor
andy62
Posts: 20
Registered: ‎10-29-2007
Message 6 of 6 (433 Views)

Re: Can not compile successfully

02-06-2009 03:43 AM 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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.