Book a Demo

Author Topic: Error (Cannot register assembly ... access denied )  (Read 9974 times)

sarathipriyan

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Error (Cannot register assembly ... access denied )
« on: September 21, 2020, 08:53:25 pm »
Hi Geert,



I used VS2019 community and Enterprise Architect v15.2.1554(Trial Edition
Free 30 day unlimited)



I'm trying to build the toolpack using the 30 day trial version. This is for a POC work to evaluate EA for our application.
We want to integrate our Requirement system with EA. Thought your toolpack(https://github.com/GeertBellekens/Enterprise-Architect-Toolpack) is the quickest path for our integration. I've run into the following issue.




Quote
Severity   Code   Description   Project   File   Line   Suppression State
Error      Cannot register assembly "C:\Users\Admin\source\repos\TEST000000000001\working EA build\Enterprise-Architect-Toolpack\EADoorsNGConnector\bin\Debug\EADoorsNGConnector.dll" - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\EADoorsNGConnector.AboutWindow' is denied.   EADoorsNGConnector         


Severity   Code   Description   Project   File   Line   Suppression State
Error      Cannot register assembly "C:\Users\Admin\source\repos\TEST000000000001\working EA build\UML-Tooling-Framework\UMLToolingFramework\bin\Debug\UMLToolingFramework.dll" - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\Record' is denied.   UMLToolingFramework         


Severity   Code   Description   Project   File   Line   Suppression State
Error      Cannot register assembly "C:\Users\Admin\source\repos\TEST000000000001\working EA build\Enterprise-Architect-Add-in-Framework\EAAddinFramework\bin\Debug\EAAddinFramework.dll" - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\Record' is denied.   EAAddinFramework         


Severity   Code   Description   Project   File   Line   Suppression State
Error      Cannot register assembly "C:\Users\Admin\source\repos\TEST000000000001\working EA build\Enterprise-Architect-Toolpack\EAJSON\bin\Debug\EAJSON.dll" - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\EAJSON.AboutWindow' is denied.   EAJSON         


Severity   Code   Description   Project   File   Line   Suppression State
Error      Cannot register assembly "C:\Users\Admin\source\repos\TEST000000000001\working EA build\Enterprise-Architect-Toolpack\ECDMMessageComposer\bin\Debug\ECDMMessageComposer.dll" - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\ECDMMessageComposer.AboutWindow' is denied.   ECDMMessageComposer
         



I tried various suggestions like removing the com registration etc but no luck. Any suggestion is greatly appreciated.



« Last Edit: September 21, 2020, 08:56:44 pm by sarathipriyan »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13505
  • Karma: +572/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Error (Cannot register assembly ... access denied )
« Reply #1 on: September 21, 2020, 09:13:04 pm »
Run VS as administrator, and make sure you close EA before building

Geert

sarathipriyan

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Re: Error (Cannot register assembly ... access denied )
« Reply #2 on: September 21, 2020, 09:37:06 pm »
Thanks for the update.i will try that

sarathipriyan

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Re: Error (Cannot register assembly ... access denied )
« Reply #3 on: September 22, 2020, 03:40:12 am »
Run VS as administrator, and make sure you close EA before building

Geert



Thanks for your suggestion Geert, that worked. Now I'm able to build.


I'm trying to get object/model from EA. while run the Sln file (EAMappingApp).
I am facing below mentioned issues.


An unhandled exception has occured .

Quote
error Message :

An unhandled exception has occured.
Error Message: The remote procedure call failed. (Exception from
HRESULT: 0x800706BE)
Stacktrace:  at EA.RespositoryClass.InvokeConstructPicker(Object
ConsturctType)
  at
TSF.UmlToolingFramework.Wrappers.EA.Model.getUserSelectedElement
(List`1 allowedTypes, List`1 allowedStereotypes, String
defaultSelectionGUID) in
C:\Users\Admin\source\repos\Test1\working EA
build\Enterprise-Architect-Add-in-Framework\EAAddinFramework\EA
Wrappers\Model.cs:line 1676
  at
TSF.UmlToolingFramework.Wrappers.EA.Model.getUserSelectedElement
(List`1 allowedTypes) in
C:\Users\Admin\source\repos\Test1\working EA
build\Enterprise-Architect-Add-in-Framework\EAAddinFramework\EA
Wrappers\Model.cs:line 1635
  at EAMapping.EAMappingAddin.selectAndLoadNewMappingSource()
in C:\Users\Admin\source\repos\Test1\working EA
build\Enterprise-Architect-Toolpack\EAMapping\EAMappingAddin.cs:li
ne 369
  at EAMappingApp.Progra.Main() in
C:\Users\Admin\source\repos\Test1\working EA
build\Enterprise-Architect-Toolpack\EAMappingApp\Program.cs:line
28
I tried below solution file to set as start up

EAAddinTester
EAMappingApp
EAValidatorApp
ERXImporter
LicensekeyGenerator
MagicdrawMigrator


which one is better to get object/model from EA?

Any suggestion is greatly appreciated.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13505
  • Karma: +572/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Error (Cannot register assembly ... access denied )
« Reply #4 on: September 22, 2020, 06:16:21 am »
Most of the projects are add-ins, that you shouldn't start from VS, they are started by EA (if you set the registry key)

Some others might need EA to be running to be able to connect to the running instance of EA.

Geert

sarathipriyan

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Re: Error (Cannot register assembly ... access denied )
« Reply #5 on: September 23, 2020, 12:01:46 am »
Thanks for the update .

sarathipriyan

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Re: Error (Cannot register assembly ... access denied )
« Reply #6 on: September 24, 2020, 01:12:10 am »
Thanks again Geert,


We need to initiate the call to EA from our application. Is there sample code that we can use ? Cheers

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13505
  • Karma: +572/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Error (Cannot register assembly ... access denied )
« Reply #7 on: September 24, 2020, 01:58:50 am »
Thanks again Geert,


We need to initiate the call to EA from our application. Is there sample code that we can use ? Cheers
I don't know what you mean by that. Can you explain a bit more detailed?

Geert

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Error (Cannot register assembly ... access denied )
« Reply #8 on: September 24, 2020, 04:51:32 pm »
Hello,


We need to initiate the call to EA from our application. Is there sample code that we can use ? Cheers

EA's API documentation is mostly written with the assumption that you're building either an in-EA script ("Object Model") or an Add-In ("Add-In Model"), both of which execute within the context of an EA process.

If you need to access an EA project from outside of an EA process, you need to start with an EA.App object. This in turn contains an EA.Repository.
Depending on the situation you can either create a new App object, or retrieve one from Windows' list of running processes if you want to connect to an already running instance.

There is a VBScript code sample on the App Object documentation page.
Note, however, that if you create a new App object, the first thing you have to do is either create or open a project using Repository.CreateModel(), .OpenFile() or .OpenFile2(). Until you do, you won't be connected to a project and most of the API won't do anything.

HTH,


/Uffe
My theories are always correct, just apply them to the right reality.

sarathipriyan

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Re: Error (Cannot register assembly ... access denied )
« Reply #9 on: September 30, 2020, 02:32:25 am »
Hello,


We need to initiate the call to EA from our application. Is there sample code that we can use ? Cheers

EA's API documentation is mostly written with the assumption that you're building either an in-EA script ("Object Model") or an Add-In ("Add-In Model"), both of which execute within the context of an EA process.

If you need to access an EA project from outside of an EA process, you need to start with an EA.App object. This in turn contains an EA.Repository.
Depending on the situation you can either create a new App object, or retrieve one from Windows' list of running processes if you want to connect to an already running instance.

There is a VBScript code sample on the App Object documentation page.
Note, however, that if you create a new App object, the first thing you have to do is either create or open a project using Repository.CreateModel(), .OpenFile() or .OpenFile2(). Until you do, you won't be connected to a project and most of the API won't do anything.

HTH,


/Uffe



Thanks for the update Uffe.i will take a look and update you