Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Whenever you create a new project, make sure you edit the csproj file to include the following import:

Code Block
xml
xml
titleTestProject.csprojxml
<?xml version="1.0" encoding="utf-8"?>
<Project ...  >
...
 <Import Project="..\..\..\..\build\DeltaShell.targets" /> <!-- ADD THIS -->
</Project>

...

Add the following entries to the project's csproj file to mark the project as part of a plugin (IsPluginComponent=true). The PluginName property is used to indicate which plugin this project is part of. For deployment, all output binaries and resources from the different projects belonging to the same plugin are copied to a single directory, based on this PluginName property.

Code Block
xml
xml
titleTestProject.csprojxml
<?xml version="1.0" encoding="utf-8"?>
<Project ...  >
...
  <PropertyGroup>
    ...
    <IsPluginComponent>true</IsPluginComponent>
    <PluginName>TestPlugin</PluginName>
  </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
xml
titleTestProject.Tests.csprojxml
<?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\**</ExternalDependencies2>
    ...
  </PropertyGroup>
</Project>

...