Sharing types/classes across pluginsSolved

Hello I am trying to share my defined classes and types across plugin files and seem to be unable to do so. I define the plugin reference like so:

[PluginReference]
Plugin MyReferencedPlugin;​

In my IDE the intellisense works properly when I start typing `MyReferencedPlugin` I can see the classes I would like to access and use. If I have another class I have defined and do something like:

class MyClass {
 private MyReferencedPlugin.MyCustomClass { get; set; }
}

When loading the plugin using those classes I get:

`Error while compiling: The type or namespace name `MyReferencedPlugin' could not be found. Are you missing an assembly reference?`

I know how use .Call and use the functions, but what is the best way to share the classes (without pasting them into each file)?

You'd need to add this to the top of your plugin:

// Reference: MyReferencedPlugin

Also, thisd would only work with public classes. The other alternative is an include file, which may not be working 100%.

3E4AJ0Oo344mLQe.jpg Wulf

You'd need to add this to the top of your plugin:

// Reference: MyReferencedPlugin

Also, thisd would only work with public classes. The other alternative is an include file, which may not be working 100%.

Thanks for prompt response... I tried adding that to top of plugin and in console got:

Assembly referenced by Test plugin does not exist: MyReferencedPlugin.dll
Added '// Reference: MyReferencedPlugin' in plugin 'Test'

Do I need to build and include in server directory?

Sorry, use Requires, not Reference.

yz6V2sW9hNC4KQv.jpg Wulf

Sorry, use Requires, not Reference.

It works :) Thankyou @Wulf

Locked automatically