-
Notifications
You must be signed in to change notification settings - Fork 5
Additional logging around packages.config paths during project inspection #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Console.WriteLine($"Unable to find packages config file: {Options.PackagesConfigPath}. Checking if file permissions were denied..."); | ||
CheckFilePermissions(Options.PackagesConfigPath); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This addition is to check the theory that file permissions could be an issue.
@@ -364,6 +389,7 @@ public bool IsExcluded() | |||
|
|||
private string CreateProjectPackageConfigPath(string projectDirectory) | |||
{ | |||
Console.WriteLine($"Creating packages.config path from project directory: {projectDirectory}"); | |||
return PathUtil.Combine(projectDirectory, "packages.config"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This addition is to check/highlight the theory that the file path origin could be the issue.
…ining customer logs + check for file permissions in relevant places.
e30b3a4
to
a91fdf1
Compare
@@ -116,11 +116,16 @@ public Container GetContainer() | |||
.Where(group => group.Count() > 1) | |||
.Select(group => group.Key); | |||
|
|||
Console.WriteLine("Processing project files found in solution file."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect the problem has to do with the project paths given in their solution file, added further logging in this area to check that (included in exe attached to ticket on Feb 20)
In an attempt to debug an issue that is only producible on user's system, this branch adds some logging around parts of the code that are relevant for packages.config inspection. The output logs hope to shine light on what could be causing the issue and is just testing a couple of theories.
Steps to run NuGet Inspector standalone in an IDE where debugging is not limited to the log msgs in this MR: (recommended)
Clone this repo and checkout this branch (or download the ZIP)
Open it in your favourite IDE (for example Rider)
Edit your run configurations to set the following program arguments:
--target_path=/path/to/your/nuget/project (same as detect.source.path)
--output_directory=/path/to/output/dir (this is where you will see a JSON file that summarizes the dependencies found)
--excluded_modules=PackageExplorer,Core,Types
Run it as is to see what additional info the added logs can shine light on OR run it in debug mode for a deeper dive. (potentially with someone from the Detect development team)
Steps to run NuGet Inspector standalone from source:
Clone this repo and checkout this branch (or download the ZIP)
Run
dotnet publish -c Release -r win-x64 --self-contained true
Navigate to the publish folder (will be given in the above commands output)
Run the detect-nuget-inspector.exe with the following arguments:
--target_path=/path/to/your/nuget/project (same as detect.source.path)
--output_directory=/path/to/output/dir (this is where you will see a JSON file that summarizes the dependencies found)
--excluded_modules=PackageExplorer,Core,Types
This option is limited to only output the logs added in this MR.