1. Build Steps Overview
*
*
*
2. New Project (.csproj)
Whenever you create a new project, make sure you edit the csproj file to include the following import:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?xml version="1.0" encoding="utf-8"?> <Project ... > ... <Import Project="..\..\..\..\build\DeltaShell.targets" /> <!-- ADD THIS --> </Project> |
This imported targets file takes care of several build steps (such as running PostSharp and copying dependencies).
...
3. Normal Projects: Dependencies (Auto-copy)
Warning |
---|
Test Projects: For test projects the external dependencies are not automatically copied from the corresponding lib directory! See section 3 4 below on how to explicitly force a dependency copy. |
...
- Any dependencies your project has (whether managed DLLs, native DLLs, license files or other assets), that are not shared with other projects, should be placed in the corresponding lib directory of your project file.
The corresponding lib directory
...
- can be found at the same path as your project, but with
lib
instead ofsrc
. Thus, for a given project TestPlugin:Example (TestPlugin):
Project directory
.\DeltaShell\ src \Plugins\TestPlugin\DeltaShell.Plugins.TestPlugin\
Corresponding lib directory
.\DeltaShell\ lib \Plugins\TestPlugin\DeltaShell.Plugins.TestPlugin\
...
- Any files in the corresponding lib directory will automatically be copied to your output directory (eg: .\bin\Debug) on build.
3.1 Plugins
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?xml version="1.0" encoding="utf-8"?> <Project ... > ... <PropertyGroup> ... <IsPluginComponent>true</IsPluginComponent> <PluginName>$(ProjectName)</PluginName> <UsePostSharp>true</UsePostSharp> </PropertyGroup> </Project> |
4. Test Projects: Dependencies (Custom)
Warning |
---|
You typically do not need to use this in a normal project (see section above on auto-copy) |
..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.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?xml version="1.0" encoding="utf-8"?> <Project ... > ... <PropertyGroup> <ExternalDependencies>lib\Plugins\TestPlugin\DeltaShell.Plugins.TestPlugin</ExternalDependencies> ... </PropertyGroup> </Project> |