MvcStructureInspector 2.6.0
See the version list below for details.
dotnet tool install --global MvcStructureInspector --version 2.6.0
dotnet new tool-manifest
dotnet tool install --local MvcStructureInspector --version 2.6.0
#tool dotnet:?package=MvcStructureInspector&version=2.6.0
nuke :add-package MvcStructureInspector --version 2.6.0
mvc-inspect
A .NET global CLI tool that generates a full text structure tree for ASP.NET Core MVC projects — powered by Roslyn.
ما هي الأداة؟ / What is it?
بالعربية:
mvc-inspect أداة سطر أوامر (.NET Global Tool) تحلّل مشاريع ASP.NET Core MVC وتنتج تقريراً نصياً شجرياً كاملاً يشمل كل عنصر في الكود — مفيدة لـ:
- ✅ مراجعة تصميم المشروع (Design Review)
- ✅ مقارنة مشروعين (Gap Analysis)
- ✅ Checklist مطابقة للمطورين
- ✅ توثيق هيكل الكود
In English:
mvc-inspect is a .NET global CLI tool that analyzes ASP.NET Core MVC projects and produces a complete text structure tree covering every code element — useful for design review, gap analysis, developer checklists, and code documentation.
التثبيت / Installation
dotnet tool install --global mvc-inspect
متطلبات: .NET 8 SDK أو أحدث
الاستخدام / Usage
1. فحص مشروع واحد / Inspect a single project
mvc-inspect <path>
مثال:
mvc-inspect "C:\source\MyMvcApp"
يحفظ التقرير تلقائياً داخل المجلد بطابع زمني:
[OK] Report saved to:
C:\source\MyMvcApp\mvc-structure_20260306_064429.txt
2. تحليل الفجوات بين مشروعين / Gap analysis between two projects
mvc-inspect --compare <pathA> <pathB>
مثال:
mvc-inspect --compare "C:\source\ReferenceApp" "C:\source\DevApp"
يحفظ تقرير المقارنة داخل pathB:
[OK] Report saved to:
C:\source\DevApp\mvc-gap-report_20260306_064430.txt
4. فتح تقرير موجود / Open an existing report
mvc-inspect open <report-file>
مثال:
mvc-inspect open "C:\source\MyApp\mvc-structure_20260306_064429.txt"
يفتح الملف بالمشغّل الافتراضي للنظام (Notepad / VS Code / أي محرر مرتبط بـ .txt).
5. الفتح التلقائي بعد الحفظ / Auto-open after save
mvc-inspect <path> --open
mvc-inspect --compare <pathA> <pathB> --open
يحفظ التقرير ثم يفتحه فوراً دون الحاجة لنسخ المسار يدوياً.
| الخيار | الوصف |
|---|---|
--out <file> |
تحديد مسار ملف الإخراج يدوياً |
--open |
فتح التقرير تلقائياً بعد الحفظ |
--with-proj |
تحليل .csproj و .sln (للمقارنة فقط) |
--no-views |
استثناء ملفات .cshtml |
--cs-only |
ملفات C# فقط |
--no-migrations |
استثناء مجلد Migrations |
أمثلة:
# حفظ في مسار مخصص
mvc-inspect "C:\source\MyApp" --out "C:\reports\structure.txt"
# C# فقط بدون Razor وبدون Migrations
mvc-inspect "C:\source\MyApp" --cs-only --no-migrations
# مقارنة مع حفظ في مسار مخصص
mvc-inspect --compare "C:\Ref" "C:\Dev" --out "C:\reports\gap.txt"
محتويات التقرير / Report Contents
شجرة المشروع الواحد (mvc-structure_*.txt)
MyMvcApp/
├── Controllers/
│ └── HomeController.cs
│ └── namespace MyMvcApp.Controllers
│ └── [class] HomeController : Controller
│ ├── [field] - _context : ApplicationDbContext
│ ├── [ctor] + HomeController(ApplicationDbContext context)
│ ├── [method] + Index() : IActionResult
│ │ [GET /]
│ ├── [method] + About() : IActionResult
│ └── [method] + Error() : IActionResult
├── Models/
│ └── User.cs
│ └── namespace MyMvcApp.Models
│ └── [class] User
│ ├── [prop] + Id : int { get; set; }
│ ├── [prop] + Name : string { get; set; }
│ └── [prop] + Email : string { get; set; }
└── Views/
└── Home/
└── Index.cshtml
├── @model MyMvcApp.Models.HomeViewModel
├── Layout _Layout
└── asp-for Name, Email
العناصر المستخرجة:
| الرمز | النوع |
|---|---|
[class] |
كلاس |
[interface] |
واجهة |
[enum] |
تعداد |
[struct] |
هيكل |
[record] |
سجل |
[delegate] |
مفوّض |
[snippet] |
مقتطف (local function / lambda) |
[field] |
حقل |
[prop] |
خاصية |
[ctor] |
منشئ |
[method] |
دالة |
+ |
public |
- |
private |
# |
protected |
~ |
internal |
تقرير الفجوات (mvc-gap-report_*.txt)
يشمل أربعة أقسام:
- ملخص تنفيذي — جدول بعدد الملفات، الكلاسات، الدوال في كل مشروع
- فجوات C# — ملفات مفقودة أو مختلفة على مستوى الكلاسات والأعضاء
- فجوات Razor — ملفات
.cshtmlالمفقودة أو المختلفة - قسم [5] — فجوات ملفات المشروع (مع
--with-proj):
[5] PROJECT FILE GAPS (.csproj / .sln)
--------------------------------------------------------------------------------
[MODIFIED] .csproj files with differences:
File: MyApp.csproj
--------------------
-- Target Framework(s):
[CHANGED] TargetFramework
A: net8.0
B: net6.0
-- Package References:
[MISSING] Microsoft.EntityFrameworkCore 8.0.0
[EXTRA] Dapper 2.1.0
[CHANGED] Serilog
A: 3.1.1
B: 2.12.0
-- Project References:
[MISSING] ../SharedLib/SharedLib.csproj
.sln file:
[A] MySolution.sln
[B] MySolution.sln
[MISSING] Projects registered in [A].sln but absent in [B].sln:
- SharedLib (../SharedLib/SharedLib.csproj)
السلوك عند الحفظ / Save Behavior
| الحالة | الملف المولَّد |
|---|---|
mvc-inspect <path> (تلقائي) |
mvc-structure_yyyyMMdd_HHmmss.txt |
mvc-inspect --compare <A> <B> (تلقائي) |
mvc-gap-report_yyyyMMdd_HHmmss.txt |
مع --out <file> |
المسار المحدد يدوياً |
ملاحظة: التقارير التلقائية تحمل طابعاً زمنياً دائماً لمنع الكتابة فوق السجلات السابقة وتمكين المقارنة عبر الزمن.
الامتدادات المحمية / Protected Extensions
لا تقبل الأداة كتابة الناتج (--out) على الملفات الحساسة:
.sln .csproj .cs .cshtml .json .config .xml .dll .exe
المتطلبات / Requirements
- .NET 8.0 SDK or later
- Windows / Linux / macOS
البناء من المصدر / Build from Source
git clone https://github.com/sbay-dev/mvc-inspect
cd mvc-inspect/src
dotnet build -c Release
dotnet pack -c Release
dotnet tool install --global --add-source . mvc-inspect
سجل التغييرات / Changelog
v2.4.0 (2026-03-06)
- 🆕 إضافة
--with-proj: مقارنة.csprojو.slnبين مشروعين مع تفصيل كامل للاختلافات- SDK، Target Frameworks، OutputType، Nullable، ImplicitUsings، LangVersion
- PackageReferences (الاسم + الإصدار)، ProjectReferences، خصائص أخرى
- مشاريع
.sln(مسجّلة/مفقودة/مختلفة المسار أو TypeGuid) - القسم [5] في تقرير الفجوات مع checklist تلقائي
v2.3.0 (2026-03-06)
- 📂 إضافة
--open: يفتح التقرير تلقائياً بعد الحفظ عبر المشغّل الافتراضي للنظام - 📂 إضافة أمر
open <file>: فتح أي تقرير موجود مسبقاً بدون إعادة التحليل
v2.2.1 (2026-03-06)
- 🔒 التقارير التلقائية تحمل طابعاً زمنياً (
yyyyMMdd_HHmmss) لمنع الكتابة فوق السجلات السابقة
v2.2.0
- 💾 حفظ تلقائي دائماً داخل مجلد المشروع (لا يطبع على الشاشة)
- 🚫 حماية الملفات الحساسة من الكتابة عليها عبر
--out
v2.0.0
- ✅ دعم
.cshtmlو.cshtml.csكعنصر MVC أساسي - ✅ تقرير فجوات Razor مع مقارنة كاملة
- ✅ استخرج:
@model,@inject,Layout,@section,asp-for,<partial>, ViewBag/ViewData
v1.0.0
- 🎉 الإصدار الأول — فحص C# بـ Roslyn، مقارنة المشاريع، تقرير الفجوات
الترخيص / License
MIT © 2025-2026 SBAY-SDK
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.