Создать проект библиотека классов
В файле .csproj
приводим к виду:
**<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net4.8</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Reference Include="ZennoLab.CommandCenter">
<HintPath>$(ZennoPosterDllPath)\\ZennoLab.CommandCenter.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="ZennoLab.Emulation">
<HintPath>$(ZennoPosterDllPath)\\ZennoLab.Emulation.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="ZennoLab.InterfacesLibrary">
<HintPath>$(ZennoPosterDllPath)\\ZennoLab.InterfacesLibrary.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<StartAction>Program</StartAction>
<StartProgram>$(ZennoPosterDllPath)\\ZennoLab.CodeRunner.exe</StartProgram>
<StartArguments>50606 "$(MSBuildThisFileDirectory)bin\\Debug\\net4.8\\$(MSBuildProjectName).dll" -sp "$(USER_HOME)\\AppData\\Roaming\\ZennoLab\\ZennoPoster\\7" --run-external-dll</StartArguments>
</PropertyGroup>
</Project>**
Создаем файл Program.cs
и наследуем его от интерфейса IZennoExternalCode
:
**public class Program : IZennoExternalCode
{
public int Execute(Instance instance, IZennoPosterProjectModel project)
{
// код проекта
return 0;
}
}**