Skip to content
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

[Bug]: F5 for XPlat CLI fails due to missing assembly (may need retarget to net6.0) #11158

Closed
drewgillies opened this issue Aug 17, 2021 · 2 comments · Fixed by NuGet/NuGet.Client#4247
Assignees
Labels
Category:Quality Week Issues that should be considered for quality week Priority:2 Issues for the current backlog. Product:dotnet.exe Type:Bug Type:Engineering product/infrastructure work/not a customer bug/feature/DCR

Comments

@drewgillies
Copy link
Contributor

NuGet Product Used

NuGet.exe

Product Version

dev - note that XPlat.exe is not in above list

Worked before?

No response

Impact

No response

Repro Steps & Context

Open NuGet.sln in VS, set NuGet.CommandLine.XPlat as startup project, set Debug command line parameters as package list SomeProject.csproj --deprecated (any report type should fail) and debug. You will see:

error: Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Selecting a different framework will change the version of the unfound assembly but still fail.

Retargeting the project to net6.0 is a workaround and may be the fix, but that's just a suggestion FYI.

Verbose Logs

See above. Diagnostic verbosity adds no additional detail. Sample output:


The following sources were used:
   https://api.nuget.org/v3/index.json
   https://pkgs.dev.azure.com/dnceng/public/_packaging/nuget-build/nuget/v3/index.json
   C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\

error: Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.


Usage: NuGet.CommandLine.XPlat.dll package list [arguments] [options]

Arguments:
  <PROJECT | SOLUTION>  A path to a project, solution file or directory.

Options:
  -h|--help               Show help information
  --force-english-output  Forces the application to run using an invariant, English-based culture.
  --framework             Specifies the target framework for which the packages will be listed.
  --deprecated            Displays only the packages marked deprecated by the authors.
  --outdated              Displays only the packages that need updates with the latest version from the sources.
  --vulnerable            Displays only the packages flagged as vulnerable.
  --include-transitive    Includes transitive packages too in the result.
  --include-prerelease    Considers prerelease versions when looking for latest. Works only with `--outdated`.
  --highest-patch         Considers only the versions with matching minor and major. Works only with `--outdated`.
  --highest-minor         Considers only the versions with matching major. Works only with `--outdated`.
  --source                Sources to lookup for latest versions. Works only with `--outdated`.
  --config                A path to a config file to specify sources. Works only with `--outdated`.
  --interactive           Allow the command to block and require manual action for operations like authentication.
  -v|--verbosity          Set the verbosity level of the command. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic].

D:\Repos\NuGet.Client\artifacts\NuGet.CommandLine.XPlat\bin\Debug\net472\win7-x86\NuGet.CommandLine.XPlat.exe (process 6164) exited with code 1.
To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
Press any key to close this window . . .
@nkolev92 nkolev92 added Type:Engineering product/infrastructure work/not a customer bug/feature/DCR Priority:2 Issues for the current backlog. Product:dotnet.exe and removed Triage:Untriaged labels Aug 21, 2021
@nkolev92
Copy link
Member

Not sure why retargeting is fixing your issue given that the framework that's being run is net472.

@erdembayar erdembayar self-assigned this Sep 3, 2021
@erdembayar erdembayar added the Category:Quality Week Issues that should be considered for quality week label Sep 3, 2021
@erdembayar erdembayar added this to the Sprint 2021-08 milestone Sep 3, 2021
@erdembayar
Copy link
Contributor

dotnet/msbuild#6799

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Quality Week Issues that should be considered for quality week Priority:2 Issues for the current backlog. Product:dotnet.exe Type:Bug Type:Engineering product/infrastructure work/not a customer bug/feature/DCR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants