Examples in SDK - type or namespace could not be found errors

Hi
I’m having trouble with the dependencies in the .\OpenTAP\Packages\SDK\Examples\Examples.sln
As you can see in RunTestPlan.Api OPenTAP has all packages required but in the project underneath ExamplePlugin packages are missing and empty in the properties box, I can’t seem to remove/update to fix this issue - anyone have any ideas ?

Thanks Andy

Hi Andy,
Typically these dependency warnings occur when you load up a project for the first time, but are resolved after building or running the project. Can you try this and tell me if you still see the same issue?

Best,
Ivan

1 Like

Hi Ivan
Many thanks for your reply.
I tried to build/run the project but failed on both counts.
However I did see ( one of many)

Blockquote

Severity Code Description Project File Line Suppression State
Error OpenTAP Install Failed to install package ‘Developer’s System CE’. Waiting for other package manager operation to complete. Updates available for: - OpenTAP: 9.14.0+51e7081e → 9.17.4+ea67c63a ExamplePlugin C:\Users\Andy\Downloads\opentap-master\opentap-master\sdk\Examples\ExamplePlugin\ExamplePlugin.csproj 36

Blockquote

I was running as a normal user once I run as a local administrator I could build and run the examples no problem.
So my question is; Must OpenTap development be run with admin rights? or is there a way to run with normal user rights?

The reason I’m asking is that my IT department have a very heavy handed policy with local admin rights and they will only ‘grant’ local admin for very special reasons and my chance of long term admin rights are very slim.

Thanks Andy

Hello @andy1,

I think you only need to run as administrator the first time, while Visual Studio is installing those missing packages. Then you should be fine running as a normal user.

Have you tried running elevated? Running Visual Studio in Elevated Mode helped me when I needed to run some post build scripts and my normal user rights didn’t allow it.

Try running elevated and let us know if that helps,

Thank you,

Carlos Montes

1 Like

Hi @carlos.montes
Many thanks for your reply, it seems if I run the examples as Administrator I have no problem I can build the solution and run, no missing dependencies.
But when I run as a normal user BuildTestPlan.Api RunTestPlan.Api within the TestPlanExecution folder has all the dependencies.
The Projects underneath ExamplePlugin, Plugin Developement and Plugin Developement.Gui all have missing dependencies this includes the basic windows system Assemblies see screen grab.


.

I have tried to add manually dependencies by right clicking and adding with no report of an error but the assembly is not added.

Its like these dependencies are added dynamically.

The only account types available to me are user and admin so admin is elevated and works.
Can I elevated between Admin and User ?

I guess this is a good case to argue with the IT department for Admin rights

Regards Andy

Further information
I copied the ExamplePlugin. csproj from the ‘Admin’ version to normal user version as they where different

Blockquote

AdditionalOpenTapPackage Include=“Developer’s System CE” was missing as a normal user

Blockquote

But now get the following error :

Regards Andy

@andy1,

Run elevated is in between normal and administrator:

I have had similar battles with my internal IT to try to get admin rights, so far elevated is the only thing I could get and luckily has helped me with these type of issues.

For the error that failed to install package Developer’s System CE, looks like it is trying to update the project, again looks like you need some elevated rights to write to this folder.

Thank you,

Carlos Montes

1 Like

@carlos.montes
Thanks Carlos, I will have a chat with our IT department about elevated rights, if they won’t resolve the issue for me, my department will get a rogue PC and just operate on the Guest network , we don’t really need the companies infrastructure as we have GitHub and the Cloud.

Many Thanks Andy

Hi @andy1

There are a few issues here:

From your error messages I can see that you obtained the SDK examples by downloading a zip of the OpenTAP master branch. OpenTAP has moved to GitHub, and master is no longer the main branch. main is the main branch now. GitHub - opentap/opentap: This is the code for the base OpenTAP package. See https://opentap.io. This includes the OpenTap.dll (base classes and sequencer), OpenTap.Package.dll (package manager), tap.exe (CLI) and OpenTap.Plugins.BasicSteps.dll (some basic TestSteps)

Checking out the source code is not the correct way to use the SDK examples since we update some version information when we package it for release. The preferred way to obtain them is from the package repository: Package Repository

This is the cause of at least some of the errors you posted here. Can you try again with the SDK package from the repository and see if you are still having errors?

Best,
Alexander

1 Like

Many Thanks @alexander.larsen