Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/ignatandrei/RSCG_ExportDiagram
- Owner: ignatandrei
- License: mit
- Created: 2024-07-28T13:10:53.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-08-10T05:33:53.000Z (3 months ago)
- Last Synced: 2024-08-10T19:00:24.462Z (3 months ago)
- Language: C#
- Size: 149 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- RSCG_Examples - https://github.com/ignatandrei/RSCG_ExportDiagram
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
}
}```