Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ignatandrei/RSCG_ExportDiagram

export diagram for external relations for a csproj
https://github.com/ignatandrei/RSCG_ExportDiagram

Last synced: 3 months ago
JSON representation

export diagram for external relations for a csproj

Awesome Lists containing this project

README

        

# RSCG_ExportDiagram

export diagram for external relations for a csproj with other csproj

## Install

Add to the csproj

```xml



..

```

And the diagram will be generated in the folder parent for the .csproj file

Alternatively, you can use the command line tool to generate the diagram for a solution

```powershell

function ProcessCsproj {
param (
[string]$project,
[string]$folderOutput
)

$version = "2024.810.832"
#$folderOutput= ".."
$newNode = [xml]@"


$folderOutput

"@

# Write-Host $newNode.MainData.InnerXml
$backFile =$project + ".bak"
Copy-Item $project $backFile
dotnet add $project package RSCG_ExportDiagram -v $version

$proj = [xml](Get-Content $project)

$foundNode = $proj.Project
#Write-Host $proj.Project.InnerXml

$ItemGroup = $proj.ImportNode($newNode.DocumentElement.ItemGroup,$true)
$proj.Project.PrependChild($ItemGroup)
$proj.DocumentElement.AppendChild($ItemGroup )

$PropertyGroup = $proj.ImportNode($newNode.DocumentElement.PropertyGroup,$true)
$proj.Project.PrependChild($PropertyGroup)
$proj.DocumentElement.AppendChild($PropertyGroup)
$proj.Save($project)
dotnet build
# pause
Copy-Item $backFile $project -Force
Remove-Item $backFile -Force

}

$solution = gci *.sln | %{ $_.FullName}
$folderSolution = Split-Path $solution
# Write-Host $folderSolution
Get-Content $solution |
Select-String 'Project\(' |
ForEach-Object {
$projectParts = $_ -Split '[,=]' | ForEach-Object { $_.Trim('[ "{}]') };
# New-Object PSObject -Property @{
# Name = $projectParts[1];
# File = $projectParts[2];
# Guid = $projectParts[3]
# }
if ($projectParts[2] -match '.csproj$'){
$fileProject =Join-Path $folderSolution $projectParts[2]
Write-Host $fileProject
ProcessCsproj -project $fileProject -folderOutput $folderSolution
}
}

```