Using the PackageValidation OOB package results in FileNotFoundExceptions
See original GitHub issueC:\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.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (10 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
Already handled that in my PR: https://github.com/dotnet/runtime/pull/56712/commits/a98f2f7280cd3aa1fc90fcbf8002f7112b637913#diff-bde310e498052e67ae73f9f1014b3ee8e067170b61c410b6b3e180fb79ed7278R24-R26