Open jeffcollaboro opened 3 years ago
I fixed the build problems on my branch (The direction is stored in Position as workaround). You can test it
But the I didn't update the generated code that it works with the latest PlantUML version (I will creata a PR as soon this is finished)
BR Helmut
@jeffcollaboro: with PR #5 you should have a working version which creates correct plantuml-stdlib/C4-PlantUML v2.2.0 diagrams (not all new features are used atm)
@simonbrowndotje: Atm RelationshipView specific "DirectionValues" are stored in Position (I found no other usefull place). Can we (re)add Properties to RelationshipView that extensions are possible.
The issue is still present the following reproduces the issue
var plantUmlWriter = new C4PlantUmlWriter();
plantUmlWriter.Write(workspace, stringWriter);
Did you test it with my branch?
I think with the branch actually works, but not with the latest released packages
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net60</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Structurizr.Client" Version="1.0.0" />
<PackageReference Include="Structurizr.PlantUML" Version="0.9.3" />
</ItemGroup>
</Project>
With the Structurizr CLI having much better support for exporting views to PlantUML (and I appreciate it's written in Java), I'm not actively supporting the .NET exporters at this time ... I would recommend forking the repo (and creating your own Nuget package if required).
Just a heads up to anyone hitting an exception :
Whilst trying to write a workspace e.g. plantUMLWriter.Write(workspace, streamWriter);
Internally this fails as the code attempts to use the RelationshipViewExtensions class to get the direction of the relationship using the GetDirection extension (SetDirection also fails). It attempts to cast the relationship view into a Structurizr.ModelItemView that has been deprecated and removed from Structurizr between v0.9.7 and v1.0.0.
Nuget is not your friend here, it defaults to the latest and greatest, and there are no version dependencies defined between the two packages.
The easy fix is to roll back to v0.9.7 (or 0.9.3) of Structurizr.Core