question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using the PackageValidation OOB package results in FileNotFoundExceptions

See original GitHub issue
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.packagevalidation\1.0.0-rc.1.21402.3\build\Microsoft.NET.Compatibility.Common.targets(23,5): error MSB4018: The "Microsoft.DotNet.PackageValidation.ValidatePackage" task failed unexpectedly. [C:\git\runtime3\src\libraries\System.Net.Http.Json\src\System.Net.Http.Json.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.packagevalidation\1.0.0-rc.1.21402.3\build\Microsoft.NET.Compatibility.Common.targets(23,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'NuGet.Packaging, Version=6.0.0.165, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. [C:\git\runtime3\src\libraries\System.Net.Http.Json\src\System.Net.Http.Json.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.packagevalidation\1.0.0-rc.1.21402.3\build\Microsoft.NET.Compatibility.Common.targets(23,5): error MSB4018: File name: 'NuGet.Packaging, Version=6.0.0.165, Culture=neutral, PublicKeyToken=31bf3856ad364e35' [C:\git\runtime3\src\libraries\System.Net.Http.Json\src\System.Net.Http.Json.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.packagevalidation\1.0.0-rc.1.21402.3\build\Microsoft.NET.Compatibility.Common.targets(23,5): error MSB4018:    at Microsoft.DotNet.PackageValidation.ValidatePackage.ExecuteCore() [C:\git\runtime3\src\libraries\System.Net.Http.Json\src\System.Net.Http.Json.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.packagevalidation\1.0.0-rc.1.21402.3\build\Microsoft.NET.Compatibility.Common.targets(23,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() in /_/src/Tasks/Common/TaskBase.cs:line 38 [C:\git\runtime3\src\libraries\System.Net.Http.Json\src\System.Net.Http.Json.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.packagevalidation\1.0.0-rc.1.21402.3\build\Microsoft.NET.Compatibility.Common.targets(23,5): error MSB4018:    at Microsoft.DotNet.PackageValidation.ValidatePackage.Execute() in /_/src/Compatibility/Microsoft.DotNet.PackageValidation/ValidatePackage.cs:line 44 [C:\git\runtime3\src\libraries\System.Net.Http.Json\src\System.Net.Http.Json.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.packagevalidation\1.0.0-rc.1.21402.3\build\Microsoft.NET.Compatibility.Common.targets(23,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() in Microsoft.Build.dll:token 0x60015fc+0x3e [C:\git\runtime3\src\libraries\System.Net.Http.Json\src\System.Net.Http.Json.csproj]
C:\Users\vihofer\.nuget\packages\microsoft.dotnet.packagevalidation\1.0.0-rc.1.21402.3\build\Microsoft.NET.Compatibility.Common.targets(23,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) in Microsoft.Build.dll:token 0x600147b+0x804 [C:\git\runtime3\src\libraries\System.Net.Http.Json\src\System.Net.Http.Json.csproj]

I assume this is because the package doesn’t carry along the NuGet and MSBuild dependencies.

cc @Anipik @safern @ericstj

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
ericstjcommented, Aug 4, 2021

Hmm, I just checked and it looks like .NETFramework MSBuild doesn’t carry NuGet binaries (nor bindingRedirects) inside it like .NETCore does. I don’t think we can rely on it being provided for us. Perhaps we should put the NuGet binaries in the package so that we can ensure they are present and not have to go looking for them via a resolve handler. We have other arcade packages that carry a private copy of NuGet and haven’t hit too many issues so perhaps we can tolerate this for the package.

0reactions
ViktorHofercommented, Aug 3, 2021

i missed the packageDownload. we will need to this to runtime repo to use the package without using the rc1 version and

Already handled that in my PR: https://github.com/dotnet/runtime/pull/56712/commits/a98f2f7280cd3aa1fc90fcbf8002f7112b637913#diff-bde310e498052e67ae73f9f1014b3ee8e067170b61c410b6b3e180fb79ed7278R24-R26

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.io.FileNotFoundException: the system cannot find the ...
the working directory is C:\EclipseWorkspace\ProjectRoot\bin . With your IDE (at least all the ones I've worked with), the working directory ...
Read more >
How to Fix the FileNotFoundException in Java.io
The FileNotFoundException is a checked exception in Java that occurs when an attempt to open a file denoted by a specified pathname fails....
Read more >
Consolidated JDK 8 Release Notes
The JDK 1.8 RPM package registers java and javac groups with the alternatives framework. The java group is for commands used to run...
Read more >
Consolidated JDK 11 Release Notes
Consolidated Release Notes. This page contains all of the release notes for General Availability (GA) releases and Bundled Patch Release (BPR) builds of...
Read more >
java-11-openjdk-11.0.19.0-3.97.1 RPM for armv7hl
Name: java-11-openjdk, Distribution: openSUSE Step 15. Version: 11.0.19.0, Vendor: openSUSE. Release: 3.97.1, Build date: Tue May 16 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found