...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?xml version="1.0" encoding="utf-8"?>
<Project ... >
...
<PropertyGroup>
...
<IsPluginComponent>true</IsPluginComponent>
<PluginName>TestPlugin</PluginName>
<UsePostSharp>true</UsePostSharp> <!-- OPTIONAL -->
</PropertyGroup>
</Project>
|
...
In a test project (unmanaged) dependencies are not automatically copied to the output directory of your test project. Instead it is possible to manually define an external dependency folder in the test project's csproj
file. In case you have a tree with external dependencies instead of a single file, you can use the double-asterisk wildcard (**) to account for those recursively, as shown for TestPluginB
below. (In the DeltaShell.targets
file, the attribute %(RecursiveDir)
is then used to maintain the folder structure.)
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?xml version="1.0" encoding="utf-8"?> <Project ... > ... <PropertyGroup> <ExternalDependencies>lib\Plugins\TestPlugin\DeltaShell.Plugins.TestPlugin</ExternalDependencies> <ExternalDependencies1>lib\Plugins\TestPlugin\DeltaShell.Plugins.TestPluginA</ExternalDependencies1> <ExternalDependencies2>lib\Plugins\TestPlugin\DeltaShell.Plugins.TestPluginB<TestPluginB\**</ExternalDependencies2> ... </PropertyGroup> </Project> |
Note: In general, the Platform Target in the project properties Build tab should be 'Any CPU'. However, if your test loads plugins that on their turn load native DLL's, you may get a System.BadImageFormatException when running the test. In that case, the Platform Target in your test project should be set to x86 (take care to do this for 'All Configurations').