From a71c072434edc3a6a37174e5c9f02c40ecf4e83a Mon Sep 17 00:00:00 2001 From: tom-englert Date: Sun, 20 Oct 2024 16:38:58 +0200 Subject: [PATCH 1/3] Allow to define PackageMitigation entries to suppress warnings about vulnerabilities that we can't fix --- Directory.Packages.props | 25 +++++++++++++------ NuGetMonitor.Model/Models/PackageInfo.cs | 4 ++- .../Models/ProjectInTargetFramework.cs | 24 +++++++++++++++++- NuGetMonitor.Model/NuGetMonitor.Model.csproj | 4 +-- NuGetMonitor.Model/Services/NuGetService.cs | 2 ++ NuGetMonitor.Model/Services/ProjectService.cs | 2 +- src/Services/InfoBarService.cs | 6 ++--- .../DependencyTree/DependencyTreeControl.xaml | 10 ++++++-- .../DependencyTree/DependencyTreeViewModel.cs | 23 +++++++++++------ src/View/Monitor/NugetMonitorViewModel.cs | 2 +- 10 files changed, 76 insertions(+), 26 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 34f74c8..360b467 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -4,20 +4,29 @@ true - + - - - - - + + + + + - - + + + + + + + + + + + diff --git a/NuGetMonitor.Model/Models/PackageInfo.cs b/NuGetMonitor.Model/Models/PackageInfo.cs index e23cbd5..ae3fafd 100644 --- a/NuGetMonitor.Model/Models/PackageInfo.cs +++ b/NuGetMonitor.Model/Models/PackageInfo.cs @@ -33,9 +33,11 @@ public PackageInfo(PackageIdentity packageIdentity, Package package, NuGetSessio public bool IsOutdated { get; init; } + public string? VulnerabilityMitigation { get; set; } + public string Issues => string.Join(", ", GetIssues().ExceptNullItems()); - public bool HasIssues => IsDeprecated || IsVulnerable; + public bool HasIssues => IsDeprecated || (IsVulnerable && VulnerabilityMitigation.IsNullOrEmpty()); public Uri ProjectUrl { get; } diff --git a/NuGetMonitor.Model/Models/ProjectInTargetFramework.cs b/NuGetMonitor.Model/Models/ProjectInTargetFramework.cs index 27ef195..f61e509 100644 --- a/NuGetMonitor.Model/Models/ProjectInTargetFramework.cs +++ b/NuGetMonitor.Model/Models/ProjectInTargetFramework.cs @@ -2,6 +2,8 @@ using System.Diagnostics; using Microsoft.Build.Evaluation; using NuGet.Frameworks; +using NuGet.Packaging.Core; +using NuGet.Versioning; using NuGetMonitor.Model.Services; using TomsToolbox.Essentials; @@ -19,13 +21,16 @@ public ProjectInTargetFramework(Project project, NuGetFramework targetFramework) TargetFramework = targetFramework; CentralVersionMap = GetCentralVersionMap(project); IsTransitivePinningEnabled = IsCentralVersionManagementEnabled && project.GetProperty("CentralPackageTransitivePinningEnabled").IsTrue(); + PackageMitigations = GetPackageMitigations(project); } public Project Project { get; init; } public NuGetFramework TargetFramework { get; init; } - public ReadOnlyDictionary CentralVersionMap { get; } + public IReadOnlyDictionary CentralVersionMap { get; } + + public IReadOnlyDictionary PackageMitigations { get; } public bool IsCentralVersionManagementEnabled => CentralVersionMap.Count > 0; @@ -57,6 +62,23 @@ private static ReadOnlyDictionary GetCentralVersionMap(Proj return new(versionMap); } + private static ReadOnlyDictionary GetPackageMitigations(Project project) + { + var projectItems = project + .GetItems("PackageMitigation"); + + var mitigations = projectItems + .Select(item => new + { + Identity = new PackageIdentity(item.EvaluatedInclude, NuGetVersion.Parse(item.GetMetadataValue("Version"))), + Justification = item.GetMetadataValue("Justification") + } + ) + .ToDictionary(item => item.Identity, item => item.Justification); + + return new(mitigations); + } + private ProjectInTargetFramework? GetBestMatch(IEnumerable projects, string projectPath) { var candidates = projects diff --git a/NuGetMonitor.Model/NuGetMonitor.Model.csproj b/NuGetMonitor.Model/NuGetMonitor.Model.csproj index c969468..53f08d2 100644 --- a/NuGetMonitor.Model/NuGetMonitor.Model.csproj +++ b/NuGetMonitor.Model/NuGetMonitor.Model.csproj @@ -1,7 +1,7 @@ - + - net48;net8.0 + net48 enable enable diff --git a/NuGetMonitor.Model/Services/NuGetService.cs b/NuGetMonitor.Model/Services/NuGetService.cs index 2fe7830..7feb3e8 100644 --- a/NuGetMonitor.Model/Services/NuGetService.cs +++ b/NuGetMonitor.Model/Services/NuGetService.cs @@ -128,6 +128,8 @@ public static async Task GetTransitiveDependencies(Proje } } + package.VulnerabilityMitigation = project.PackageMitigations.GetValueOrDefault(identity); + parentsByChild .ForceValue(package, _ => new()) .Add(packageReferenceInfo); diff --git a/NuGetMonitor.Model/Services/ProjectService.cs b/NuGetMonitor.Model/Services/ProjectService.cs index 124364f..011870c 100644 --- a/NuGetMonitor.Model/Services/ProjectService.cs +++ b/NuGetMonitor.Model/Services/ProjectService.cs @@ -208,7 +208,7 @@ private static IEnumerable GetPackageReferenceItem return version is null ? null - : new PackageReferenceEntry(id, version, versionSource, projectItemInTargetFramework, projectItem.GetMetadataValue("Justification"), projectItem.GetIsPrivateAsset()); + : new PackageReferenceEntry(id, version, versionSource, projectItemInTargetFramework, versionSource.GetMetadataValue("Justification"), projectItem.GetIsPrivateAsset()); } internal static bool IsTrue(this ProjectProperty? property) diff --git a/src/Services/InfoBarService.cs b/src/Services/InfoBarService.cs index 037a6c8..51fd9d5 100644 --- a/src/Services/InfoBarService.cs +++ b/src/Services/InfoBarService.cs @@ -56,7 +56,7 @@ public static void ShowTransitivePackageIssues(ICollection item.IsVulnerable).ToArray(); + var vulnerablePackages = transitivePackages.Where(item => item.IsVulnerable && item.VulnerabilityMitigation.IsNullOrEmpty()).ToArray(); if (vulnerablePackages.Length <= 0) { @@ -142,7 +142,7 @@ private static void PrintDependencyTree(IEnumerable depe var vulnerablePackages = packages .Select(item => item.Key) - .Where(item => item.IsVulnerable) + .Where(item => item.IsVulnerable && item.VulnerabilityMitigation.IsNullOrEmpty()) .ToArray(); if (vulnerablePackages.Length == 0) @@ -211,6 +211,6 @@ private static void PrintDependencyTree(StringBuilder text, PackageInfo package, yield return topLevelPackages.CountedDescription("update", item => item.IsOutdated); yield return topLevelPackages.CountedDescription("deprecation", item => item.IsDeprecated); - yield return topLevelPackages.CountedDescription("vulnerability", item => item.IsVulnerable); + yield return topLevelPackages.CountedDescription("vulnerability", item => item.IsVulnerable && item.VulnerabilityMitigation.IsNullOrEmpty()); } } \ No newline at end of file diff --git a/src/View/DependencyTree/DependencyTreeControl.xaml b/src/View/DependencyTree/DependencyTreeControl.xaml index c6ba02a..01e99d0 100644 --- a/src/View/DependencyTree/DependencyTreeControl.xaml +++ b/src/View/DependencyTree/DependencyTreeControl.xaml @@ -27,18 +27,24 @@ - - + + + + + new DelegateCommand(() => CopyNode(PackageNode.PackageVersion)); + public ICommand CopyPackageMitigationCommand => new DelegateCommand(() => CopyNode(PackageNode.PackageMitigation)); + private void CopyNode(PackageNode node) { var currentVersion = PackageIdentity.Version; - var latestVersion = _packageInfo.Package.Versions - .Where(v => v.IsPrerelease == currentVersion.IsPrerelease) - .DefaultIfEmpty(currentVersion) - .Max(); + var version = node == PackageNode.PackageMitigation + // mitigation is always for the current version + ? currentVersion + // for the other nodes we want the latest version of the same kind (pre-release or not) + : _packageInfo.Package.Versions + .Where(v => v.IsPrerelease == currentVersion.IsPrerelease) + .DefaultIfEmpty(currentVersion) + .Max(); + + var justification = node == PackageNode.PackageMitigation ? "Justification=\"TODO\" " : string.Empty; - Clipboard.SetText($"""<{node} Include="{PackageIdentity.Id}" Version="{latestVersion}" />"""); + Clipboard.SetText($"""<{node} Include="{PackageIdentity.Id}" Version="{version}" {justification}/>"""); if (node == PackageNode.PackageReference) { @@ -92,7 +101,7 @@ private IEnumerable GetIssueItems() yield return "Outdated"; if (_packageInfo.IsVulnerable) - yield return "Vulnerable"; + yield return _packageInfo.VulnerabilityMitigation.IsNullOrEmpty() ? "Vulnerable" : $"Vulnerable ({_packageInfo.VulnerabilityMitigation})"; } } diff --git a/src/View/Monitor/NugetMonitorViewModel.cs b/src/View/Monitor/NugetMonitorViewModel.cs index 3761072..62fe230 100644 --- a/src/View/Monitor/NugetMonitorViewModel.cs +++ b/src/View/Monitor/NugetMonitorViewModel.cs @@ -90,7 +90,7 @@ private async void Load() .SelectMany(item => item.Items) .Select(item => item.ProjectItemInTargetFramework) .Where(item => item.Project.IsTransitivePinningEnabled) - .SelectMany(project => project.Project.CentralVersionMap.Values.Select(item => new PackageReferenceEntry(item.EvaluatedInclude, item.GetVersion() ?? VersionRange.None, item, project, string.Empty, false))) + .SelectMany(project => project.Project.CentralVersionMap.Values.Select(item => new PackageReferenceEntry(item.EvaluatedInclude, item.GetVersion() ?? VersionRange.None, item, project, item.GetMetadataValue("Justification"), false))) .Where(item => !packageIds.Contains(item.Identity.Id)) .GroupBy(item => item.Identity) .Select(item => new PackageViewModel(item, PackageItemType.PackageVersion, _solutionService)) From 549e8729d6b80f51c79c0e2defa0f6d0bc8615c2 Mon Sep 17 00:00:00 2001 From: tom-englert Date: Sun, 20 Oct 2024 17:06:04 +0200 Subject: [PATCH 2/3] Update README.md --- README.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 380b9b9..9fbe7e6 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ for the installed NuGet packages in the current solution. Dependent on the size of the solution it may take some time until the info bars appear. +--- ### Package Manager The package manager can be opened via the entry in the `Tools` menu. @@ -44,16 +45,30 @@ The package manager shows all installed packages of the current solution. Updati Compared to the original NuGet Package Manager updating packages is very fast, because the package version is instantly updated without validation against other packages - however version conflicts may show up only at the next build and have to be resolved manually. +![ToolWindow](art/ToolWindow.png) + Shared package references, e.g. in the `Directory.Build.props` file, are handled gracefully, and will not be replaced by `Update` entries in every project. -![ToolWindow](art/ToolWindow.png) +CentralPackageManagement (`PackageVersion` entries) are supported as well. +A justification property can be added to `PackageReference` or `PackageVersion` entries, to e.g. document why a reference is pinned and can't be updated +```xml + +``` + +A mitigation element can be added to suppress warnings for transitive dependencies that can't be updated due to project limitations but have been evaluated to not affect the product security. +```xml + +``` +--- ### Dependency Tree -This view allows to investigate how transitive depdencies are introduced into the projects. +This view allows to investigate how transitive dependencies are introduced into the projects. It lists all transitive dependencies per project, and shows their ancestor tree, where the terminal bold entry is the package reference used in the project. +The context menu for every entry offers to copy ready made XML snippets for `PackageReference`, `PackageVersion` or `PackageMitigation` that can be directly inserted into the project file to fix transitive dependencies. + ![DependencyTree](art/DependencyTree.png) ## Thanks From f694cdd8a9ff3b6a8cfb036f7082f610077021db Mon Sep 17 00:00:00 2001 From: tom-englert Date: Mon, 21 Oct 2024 08:00:12 +0200 Subject: [PATCH 3/3] Cleanup directory structure --- Directory.Packages.props | 1 - NuGetMonitor.sln | 6 +++--- .../NuGetMonitor.Model}/Abstractions/ILoggerSink.cs | 0 .../NuGetMonitor.Model}/ExtensionMethods.cs | 0 .../NuGetMonitor.Model}/FodyWeavers.xml | 0 .../NuGetMonitor.Model}/GlobalConstants.cs | 0 .../NuGetMonitor.Model}/GlobalUsings.cs | 0 .../NuGetMonitor.Model}/Models/NugetSession.cs | 0 .../NuGetMonitor.Model}/Models/Package.cs | 0 .../NuGetMonitor.Model}/Models/PackageInfo.cs | 0 .../NuGetMonitor.Model}/Models/PackageReference.cs | 0 .../Models/PackageReferenceEntry.cs | 0 .../Models/PackageReferenceInfo.cs | 0 .../Models/ProjectInTargetFramework.cs | 0 .../Models/ProjectItemInTargetFramework.cs | 0 .../NuGetMonitor.Model}/Models/RepositoryContext.cs | 0 .../Models/TransitiveDependencies.cs | 0 .../NuGetMonitor.Model}/NuGetMonitor.Model.csproj | 0 .../Properties/IsExternalInit.cs | 0 .../NuGetMonitor.Model}/Services/LoggerService.cs | 0 .../NuGetMonitor.Model}/Services/NuGetService.cs | 0 .../NuGetMonitor.Model}/Services/ProjectService.cs | 0 .../Abstractions/ISolutionService.cs | 0 src/{ => NuGetMonitor}/FodyWeavers.xml | 0 src/{ => NuGetMonitor}/GlobalUsings.cs | 0 src/{ => NuGetMonitor}/NuGetMonitor.csproj | 6 +++--- src/{ => NuGetMonitor}/NuGetMonitorCommands.cs | 0 src/{ => NuGetMonitor}/NuGetMonitorPackage.cs | 0 src/{ => NuGetMonitor}/NuGetMonitorPackage.vsct | 0 src/{ => NuGetMonitor}/Options/GeneralOptions.cs | 0 src/{ => NuGetMonitor}/Properties/AssemblyInfo.cs | 0 src/{ => NuGetMonitor}/Properties/IsExternalInit.cs | 0 .../Resources/NuGetMonitorCommand.png | Bin src/{ => NuGetMonitor}/Resources/VSColorScheme.xaml | 0 src/{ => NuGetMonitor}/Services/InfoBarService.cs | 0 src/{ => NuGetMonitor}/Services/LoggingService.cs | 0 src/{ => NuGetMonitor}/Services/MonitorService.cs | 0 src/{ => NuGetMonitor}/Services/SolutionService.cs | 0 .../View/DependencyTree/DependencyTreeControl.xaml | 0 .../DependencyTree/DependencyTreeControl.xaml.cs | 0 .../View/DependencyTree/DependencyTreeToolWindow.cs | 0 .../View/DependencyTree/DependencyTreeViewModel.cs | 0 .../View/Monitor/NuGetMonitorControl.xaml | 0 .../View/Monitor/NuGetMonitorToolWindow.cs | 0 .../View/Monitor/NugetMonitorControl.xaml.cs | 0 .../View/Monitor/NugetMonitorViewModel.cs | 0 .../ViewModels/PackageItemType.cs | 0 .../ViewModels/PackageViewModel.cs | 0 .../ViewModels/ProjectViewModel.cs | 0 src/{ => NuGetMonitor}/publish-manifest.json | 0 .../source.extension.vsixmanifest | 0 51 files changed, 6 insertions(+), 7 deletions(-) rename {NuGetMonitor.Model => src/NuGetMonitor.Model}/Abstractions/ILoggerSink.cs (100%) rename {NuGetMonitor.Model => src/NuGetMonitor.Model}/ExtensionMethods.cs (100%) rename {NuGetMonitor.Model => src/NuGetMonitor.Model}/FodyWeavers.xml (100%) rename {NuGetMonitor.Model => src/NuGetMonitor.Model}/GlobalConstants.cs (100%) rename {NuGetMonitor.Model => src/NuGetMonitor.Model}/GlobalUsings.cs (100%) rename {NuGetMonitor.Model => src/NuGetMonitor.Model}/Models/NugetSession.cs (100%) rename {NuGetMonitor.Model => src/NuGetMonitor.Model}/Models/Package.cs (100%) rename {NuGetMonitor.Model => src/NuGetMonitor.Model}/Models/PackageInfo.cs (100%) rename {NuGetMonitor.Model => src/NuGetMonitor.Model}/Models/PackageReference.cs (100%) rename {NuGetMonitor.Model => src/NuGetMonitor.Model}/Models/PackageReferenceEntry.cs (100%) rename {NuGetMonitor.Model => src/NuGetMonitor.Model}/Models/PackageReferenceInfo.cs (100%) rename {NuGetMonitor.Model => src/NuGetMonitor.Model}/Models/ProjectInTargetFramework.cs (100%) rename {NuGetMonitor.Model => src/NuGetMonitor.Model}/Models/ProjectItemInTargetFramework.cs (100%) rename {NuGetMonitor.Model => src/NuGetMonitor.Model}/Models/RepositoryContext.cs (100%) rename {NuGetMonitor.Model => src/NuGetMonitor.Model}/Models/TransitiveDependencies.cs (100%) rename {NuGetMonitor.Model => src/NuGetMonitor.Model}/NuGetMonitor.Model.csproj (100%) rename {NuGetMonitor.Model => src/NuGetMonitor.Model}/Properties/IsExternalInit.cs (100%) rename {NuGetMonitor.Model => src/NuGetMonitor.Model}/Services/LoggerService.cs (100%) rename {NuGetMonitor.Model => src/NuGetMonitor.Model}/Services/NuGetService.cs (100%) rename {NuGetMonitor.Model => src/NuGetMonitor.Model}/Services/ProjectService.cs (100%) rename src/{ => NuGetMonitor}/Abstractions/ISolutionService.cs (100%) rename src/{ => NuGetMonitor}/FodyWeavers.xml (100%) rename src/{ => NuGetMonitor}/GlobalUsings.cs (100%) rename src/{ => NuGetMonitor}/NuGetMonitor.csproj (92%) rename src/{ => NuGetMonitor}/NuGetMonitorCommands.cs (100%) rename src/{ => NuGetMonitor}/NuGetMonitorPackage.cs (100%) rename src/{ => NuGetMonitor}/NuGetMonitorPackage.vsct (100%) rename src/{ => NuGetMonitor}/Options/GeneralOptions.cs (100%) rename src/{ => NuGetMonitor}/Properties/AssemblyInfo.cs (100%) rename src/{ => NuGetMonitor}/Properties/IsExternalInit.cs (100%) rename src/{ => NuGetMonitor}/Resources/NuGetMonitorCommand.png (100%) rename src/{ => NuGetMonitor}/Resources/VSColorScheme.xaml (100%) rename src/{ => NuGetMonitor}/Services/InfoBarService.cs (100%) rename src/{ => NuGetMonitor}/Services/LoggingService.cs (100%) rename src/{ => NuGetMonitor}/Services/MonitorService.cs (100%) rename src/{ => NuGetMonitor}/Services/SolutionService.cs (100%) rename src/{ => NuGetMonitor}/View/DependencyTree/DependencyTreeControl.xaml (100%) rename src/{ => NuGetMonitor}/View/DependencyTree/DependencyTreeControl.xaml.cs (100%) rename src/{ => NuGetMonitor}/View/DependencyTree/DependencyTreeToolWindow.cs (100%) rename src/{ => NuGetMonitor}/View/DependencyTree/DependencyTreeViewModel.cs (100%) rename src/{ => NuGetMonitor}/View/Monitor/NuGetMonitorControl.xaml (100%) rename src/{ => NuGetMonitor}/View/Monitor/NuGetMonitorToolWindow.cs (100%) rename src/{ => NuGetMonitor}/View/Monitor/NugetMonitorControl.xaml.cs (100%) rename src/{ => NuGetMonitor}/View/Monitor/NugetMonitorViewModel.cs (100%) rename src/{ => NuGetMonitor}/ViewModels/PackageItemType.cs (100%) rename src/{ => NuGetMonitor}/ViewModels/PackageViewModel.cs (100%) rename src/{ => NuGetMonitor}/ViewModels/ProjectViewModel.cs (100%) rename src/{ => NuGetMonitor}/publish-manifest.json (100%) rename src/{ => NuGetMonitor}/source.extension.vsixmanifest (100%) diff --git a/Directory.Packages.props b/Directory.Packages.props index 360b467..bb62801 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -13,7 +13,6 @@ - diff --git a/NuGetMonitor.sln b/NuGetMonitor.sln index 48097af..39abcbe 100644 --- a/NuGetMonitor.sln +++ b/NuGetMonitor.sln @@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.7.33808.371 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NuGetMonitor", "src\NuGetMonitor.csproj", "{C1A48EF4-3E62-4C4C-8A3E-E1BA33FCAF14}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6574B5FA-865B-4150-A0F9-72420A7D5AA4}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig @@ -15,7 +13,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution .github\workflows\workflow.yml = .github\workflows\workflow.yml EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NuGetMonitor.Model", "NuGetMonitor.Model\NuGetMonitor.Model.csproj", "{D1E7ECAB-56A7-4283-A2BC-847AB3B7F72A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NuGetMonitor", "src\NuGetMonitor\NuGetMonitor.csproj", "{C1A48EF4-3E62-4C4C-8A3E-E1BA33FCAF14}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NuGetMonitor.Model", "src\NuGetMonitor.Model\NuGetMonitor.Model.csproj", "{D1E7ECAB-56A7-4283-A2BC-847AB3B7F72A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/NuGetMonitor.Model/Abstractions/ILoggerSink.cs b/src/NuGetMonitor.Model/Abstractions/ILoggerSink.cs similarity index 100% rename from NuGetMonitor.Model/Abstractions/ILoggerSink.cs rename to src/NuGetMonitor.Model/Abstractions/ILoggerSink.cs diff --git a/NuGetMonitor.Model/ExtensionMethods.cs b/src/NuGetMonitor.Model/ExtensionMethods.cs similarity index 100% rename from NuGetMonitor.Model/ExtensionMethods.cs rename to src/NuGetMonitor.Model/ExtensionMethods.cs diff --git a/NuGetMonitor.Model/FodyWeavers.xml b/src/NuGetMonitor.Model/FodyWeavers.xml similarity index 100% rename from NuGetMonitor.Model/FodyWeavers.xml rename to src/NuGetMonitor.Model/FodyWeavers.xml diff --git a/NuGetMonitor.Model/GlobalConstants.cs b/src/NuGetMonitor.Model/GlobalConstants.cs similarity index 100% rename from NuGetMonitor.Model/GlobalConstants.cs rename to src/NuGetMonitor.Model/GlobalConstants.cs diff --git a/NuGetMonitor.Model/GlobalUsings.cs b/src/NuGetMonitor.Model/GlobalUsings.cs similarity index 100% rename from NuGetMonitor.Model/GlobalUsings.cs rename to src/NuGetMonitor.Model/GlobalUsings.cs diff --git a/NuGetMonitor.Model/Models/NugetSession.cs b/src/NuGetMonitor.Model/Models/NugetSession.cs similarity index 100% rename from NuGetMonitor.Model/Models/NugetSession.cs rename to src/NuGetMonitor.Model/Models/NugetSession.cs diff --git a/NuGetMonitor.Model/Models/Package.cs b/src/NuGetMonitor.Model/Models/Package.cs similarity index 100% rename from NuGetMonitor.Model/Models/Package.cs rename to src/NuGetMonitor.Model/Models/Package.cs diff --git a/NuGetMonitor.Model/Models/PackageInfo.cs b/src/NuGetMonitor.Model/Models/PackageInfo.cs similarity index 100% rename from NuGetMonitor.Model/Models/PackageInfo.cs rename to src/NuGetMonitor.Model/Models/PackageInfo.cs diff --git a/NuGetMonitor.Model/Models/PackageReference.cs b/src/NuGetMonitor.Model/Models/PackageReference.cs similarity index 100% rename from NuGetMonitor.Model/Models/PackageReference.cs rename to src/NuGetMonitor.Model/Models/PackageReference.cs diff --git a/NuGetMonitor.Model/Models/PackageReferenceEntry.cs b/src/NuGetMonitor.Model/Models/PackageReferenceEntry.cs similarity index 100% rename from NuGetMonitor.Model/Models/PackageReferenceEntry.cs rename to src/NuGetMonitor.Model/Models/PackageReferenceEntry.cs diff --git a/NuGetMonitor.Model/Models/PackageReferenceInfo.cs b/src/NuGetMonitor.Model/Models/PackageReferenceInfo.cs similarity index 100% rename from NuGetMonitor.Model/Models/PackageReferenceInfo.cs rename to src/NuGetMonitor.Model/Models/PackageReferenceInfo.cs diff --git a/NuGetMonitor.Model/Models/ProjectInTargetFramework.cs b/src/NuGetMonitor.Model/Models/ProjectInTargetFramework.cs similarity index 100% rename from NuGetMonitor.Model/Models/ProjectInTargetFramework.cs rename to src/NuGetMonitor.Model/Models/ProjectInTargetFramework.cs diff --git a/NuGetMonitor.Model/Models/ProjectItemInTargetFramework.cs b/src/NuGetMonitor.Model/Models/ProjectItemInTargetFramework.cs similarity index 100% rename from NuGetMonitor.Model/Models/ProjectItemInTargetFramework.cs rename to src/NuGetMonitor.Model/Models/ProjectItemInTargetFramework.cs diff --git a/NuGetMonitor.Model/Models/RepositoryContext.cs b/src/NuGetMonitor.Model/Models/RepositoryContext.cs similarity index 100% rename from NuGetMonitor.Model/Models/RepositoryContext.cs rename to src/NuGetMonitor.Model/Models/RepositoryContext.cs diff --git a/NuGetMonitor.Model/Models/TransitiveDependencies.cs b/src/NuGetMonitor.Model/Models/TransitiveDependencies.cs similarity index 100% rename from NuGetMonitor.Model/Models/TransitiveDependencies.cs rename to src/NuGetMonitor.Model/Models/TransitiveDependencies.cs diff --git a/NuGetMonitor.Model/NuGetMonitor.Model.csproj b/src/NuGetMonitor.Model/NuGetMonitor.Model.csproj similarity index 100% rename from NuGetMonitor.Model/NuGetMonitor.Model.csproj rename to src/NuGetMonitor.Model/NuGetMonitor.Model.csproj diff --git a/NuGetMonitor.Model/Properties/IsExternalInit.cs b/src/NuGetMonitor.Model/Properties/IsExternalInit.cs similarity index 100% rename from NuGetMonitor.Model/Properties/IsExternalInit.cs rename to src/NuGetMonitor.Model/Properties/IsExternalInit.cs diff --git a/NuGetMonitor.Model/Services/LoggerService.cs b/src/NuGetMonitor.Model/Services/LoggerService.cs similarity index 100% rename from NuGetMonitor.Model/Services/LoggerService.cs rename to src/NuGetMonitor.Model/Services/LoggerService.cs diff --git a/NuGetMonitor.Model/Services/NuGetService.cs b/src/NuGetMonitor.Model/Services/NuGetService.cs similarity index 100% rename from NuGetMonitor.Model/Services/NuGetService.cs rename to src/NuGetMonitor.Model/Services/NuGetService.cs diff --git a/NuGetMonitor.Model/Services/ProjectService.cs b/src/NuGetMonitor.Model/Services/ProjectService.cs similarity index 100% rename from NuGetMonitor.Model/Services/ProjectService.cs rename to src/NuGetMonitor.Model/Services/ProjectService.cs diff --git a/src/Abstractions/ISolutionService.cs b/src/NuGetMonitor/Abstractions/ISolutionService.cs similarity index 100% rename from src/Abstractions/ISolutionService.cs rename to src/NuGetMonitor/Abstractions/ISolutionService.cs diff --git a/src/FodyWeavers.xml b/src/NuGetMonitor/FodyWeavers.xml similarity index 100% rename from src/FodyWeavers.xml rename to src/NuGetMonitor/FodyWeavers.xml diff --git a/src/GlobalUsings.cs b/src/NuGetMonitor/GlobalUsings.cs similarity index 100% rename from src/GlobalUsings.cs rename to src/NuGetMonitor/GlobalUsings.cs diff --git a/src/NuGetMonitor.csproj b/src/NuGetMonitor/NuGetMonitor.csproj similarity index 92% rename from src/NuGetMonitor.csproj rename to src/NuGetMonitor/NuGetMonitor.csproj index 3694420..2489c60 100644 --- a/src/NuGetMonitor.csproj +++ b/src/NuGetMonitor/NuGetMonitor.csproj @@ -25,15 +25,15 @@ - + Resources\LICENSE true - + Resources\Screenshot.png true - + Resources\NugetMonitor_90x90.png true diff --git a/src/NuGetMonitorCommands.cs b/src/NuGetMonitor/NuGetMonitorCommands.cs similarity index 100% rename from src/NuGetMonitorCommands.cs rename to src/NuGetMonitor/NuGetMonitorCommands.cs diff --git a/src/NuGetMonitorPackage.cs b/src/NuGetMonitor/NuGetMonitorPackage.cs similarity index 100% rename from src/NuGetMonitorPackage.cs rename to src/NuGetMonitor/NuGetMonitorPackage.cs diff --git a/src/NuGetMonitorPackage.vsct b/src/NuGetMonitor/NuGetMonitorPackage.vsct similarity index 100% rename from src/NuGetMonitorPackage.vsct rename to src/NuGetMonitor/NuGetMonitorPackage.vsct diff --git a/src/Options/GeneralOptions.cs b/src/NuGetMonitor/Options/GeneralOptions.cs similarity index 100% rename from src/Options/GeneralOptions.cs rename to src/NuGetMonitor/Options/GeneralOptions.cs diff --git a/src/Properties/AssemblyInfo.cs b/src/NuGetMonitor/Properties/AssemblyInfo.cs similarity index 100% rename from src/Properties/AssemblyInfo.cs rename to src/NuGetMonitor/Properties/AssemblyInfo.cs diff --git a/src/Properties/IsExternalInit.cs b/src/NuGetMonitor/Properties/IsExternalInit.cs similarity index 100% rename from src/Properties/IsExternalInit.cs rename to src/NuGetMonitor/Properties/IsExternalInit.cs diff --git a/src/Resources/NuGetMonitorCommand.png b/src/NuGetMonitor/Resources/NuGetMonitorCommand.png similarity index 100% rename from src/Resources/NuGetMonitorCommand.png rename to src/NuGetMonitor/Resources/NuGetMonitorCommand.png diff --git a/src/Resources/VSColorScheme.xaml b/src/NuGetMonitor/Resources/VSColorScheme.xaml similarity index 100% rename from src/Resources/VSColorScheme.xaml rename to src/NuGetMonitor/Resources/VSColorScheme.xaml diff --git a/src/Services/InfoBarService.cs b/src/NuGetMonitor/Services/InfoBarService.cs similarity index 100% rename from src/Services/InfoBarService.cs rename to src/NuGetMonitor/Services/InfoBarService.cs diff --git a/src/Services/LoggingService.cs b/src/NuGetMonitor/Services/LoggingService.cs similarity index 100% rename from src/Services/LoggingService.cs rename to src/NuGetMonitor/Services/LoggingService.cs diff --git a/src/Services/MonitorService.cs b/src/NuGetMonitor/Services/MonitorService.cs similarity index 100% rename from src/Services/MonitorService.cs rename to src/NuGetMonitor/Services/MonitorService.cs diff --git a/src/Services/SolutionService.cs b/src/NuGetMonitor/Services/SolutionService.cs similarity index 100% rename from src/Services/SolutionService.cs rename to src/NuGetMonitor/Services/SolutionService.cs diff --git a/src/View/DependencyTree/DependencyTreeControl.xaml b/src/NuGetMonitor/View/DependencyTree/DependencyTreeControl.xaml similarity index 100% rename from src/View/DependencyTree/DependencyTreeControl.xaml rename to src/NuGetMonitor/View/DependencyTree/DependencyTreeControl.xaml diff --git a/src/View/DependencyTree/DependencyTreeControl.xaml.cs b/src/NuGetMonitor/View/DependencyTree/DependencyTreeControl.xaml.cs similarity index 100% rename from src/View/DependencyTree/DependencyTreeControl.xaml.cs rename to src/NuGetMonitor/View/DependencyTree/DependencyTreeControl.xaml.cs diff --git a/src/View/DependencyTree/DependencyTreeToolWindow.cs b/src/NuGetMonitor/View/DependencyTree/DependencyTreeToolWindow.cs similarity index 100% rename from src/View/DependencyTree/DependencyTreeToolWindow.cs rename to src/NuGetMonitor/View/DependencyTree/DependencyTreeToolWindow.cs diff --git a/src/View/DependencyTree/DependencyTreeViewModel.cs b/src/NuGetMonitor/View/DependencyTree/DependencyTreeViewModel.cs similarity index 100% rename from src/View/DependencyTree/DependencyTreeViewModel.cs rename to src/NuGetMonitor/View/DependencyTree/DependencyTreeViewModel.cs diff --git a/src/View/Monitor/NuGetMonitorControl.xaml b/src/NuGetMonitor/View/Monitor/NuGetMonitorControl.xaml similarity index 100% rename from src/View/Monitor/NuGetMonitorControl.xaml rename to src/NuGetMonitor/View/Monitor/NuGetMonitorControl.xaml diff --git a/src/View/Monitor/NuGetMonitorToolWindow.cs b/src/NuGetMonitor/View/Monitor/NuGetMonitorToolWindow.cs similarity index 100% rename from src/View/Monitor/NuGetMonitorToolWindow.cs rename to src/NuGetMonitor/View/Monitor/NuGetMonitorToolWindow.cs diff --git a/src/View/Monitor/NugetMonitorControl.xaml.cs b/src/NuGetMonitor/View/Monitor/NugetMonitorControl.xaml.cs similarity index 100% rename from src/View/Monitor/NugetMonitorControl.xaml.cs rename to src/NuGetMonitor/View/Monitor/NugetMonitorControl.xaml.cs diff --git a/src/View/Monitor/NugetMonitorViewModel.cs b/src/NuGetMonitor/View/Monitor/NugetMonitorViewModel.cs similarity index 100% rename from src/View/Monitor/NugetMonitorViewModel.cs rename to src/NuGetMonitor/View/Monitor/NugetMonitorViewModel.cs diff --git a/src/ViewModels/PackageItemType.cs b/src/NuGetMonitor/ViewModels/PackageItemType.cs similarity index 100% rename from src/ViewModels/PackageItemType.cs rename to src/NuGetMonitor/ViewModels/PackageItemType.cs diff --git a/src/ViewModels/PackageViewModel.cs b/src/NuGetMonitor/ViewModels/PackageViewModel.cs similarity index 100% rename from src/ViewModels/PackageViewModel.cs rename to src/NuGetMonitor/ViewModels/PackageViewModel.cs diff --git a/src/ViewModels/ProjectViewModel.cs b/src/NuGetMonitor/ViewModels/ProjectViewModel.cs similarity index 100% rename from src/ViewModels/ProjectViewModel.cs rename to src/NuGetMonitor/ViewModels/ProjectViewModel.cs diff --git a/src/publish-manifest.json b/src/NuGetMonitor/publish-manifest.json similarity index 100% rename from src/publish-manifest.json rename to src/NuGetMonitor/publish-manifest.json diff --git a/src/source.extension.vsixmanifest b/src/NuGetMonitor/source.extension.vsixmanifest similarity index 100% rename from src/source.extension.vsixmanifest rename to src/NuGetMonitor/source.extension.vsixmanifest