Output .dll from Rhino plugin V7 template

Hi @stevebaer,

Do you know how I can also output the .dll from the Rhino plugin V7 template? When the solution builds it only outputs the .rhp file but I also need to output the .dll

Thanks,

Nicholas

you could add a post build event to the project to copy the rhp to a dll. Why do you need this by the way?

Hi Steve,

Thanks for the quick reply. How would I change the extension while copying the rhp file? Also,

AfterBuild events like this one dont seem to work:

<Target Name="AfterBuild">
    <ItemGroup>
      <SourceDlls Include="$(TargetDir)*.dll" />
      <SourcePdbs Include="$(TargetDir)*.pdb" />
      <SourceRHP Include="$(TargetDir)*.rhp" />
    </ItemGroup>
    <Copy SourceFiles="@(SourceDlls)" DestinationFolder="C:\Program Files\Rhino 7\Plug-ins\SyncIO\" />
    <Copy SourceFiles="@(SourcePdbs)" DestinationFolder="C:\Program Files\Rhino 7\Plug-ins\SyncIO\" />
    <Copy SourceFiles="@(SourceRHP)" DestinationFolder="C:\Program Files\Rhino 7\Plug-ins\SyncIO\" />
  </Target>

I had to instead use an XCopy to copy the .rhp file


<Target Name="PostBuild" 

AfterTargets="PostBuildEvent">
    <Exec Command="xcopy /y /d  &quot;$(ProjectDir)$(OutDir)&quot; &quot;C:\Program Files\Rhino 7\Plug-ins\SyncIO&quot;" />

  </Target>

How can I change the extension of .rhp to .dll in a second xcopy?

I need the .dll as well because I have some code which I need to reference in order to do some integration tests.

Thanks,

Nicholas.

It looks like this should work

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
  <Exec Command="copy $(TargetPath) $(OutDir)$(TargetName).dll" />
</Target>
1 Like

Awesome, thanks!