Skip to content

Unable to build using bootstrap: Method not found: 'NuGet.ProjectModel.LockFile.GetTarget' #6289

@KirillOsenkov

Description

@KirillOsenkov

I have installed VS 16.9.2 on my local machine and now my bootstrapped MSBuild no longer works:

C:\Program Files\dotnet\sdk\5.0.201\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(241,5): error MSB4018: The "ResolvePackageAssets" task failed unexpectedly.
System.MissingMethodException: Method not found: 'NuGet.ProjectModel.LockFileTarget NuGet.ProjectModel.LockFile.GetTarget(NuGet.Frameworks.NuGetFramework, System.String)'.
   at Microsoft.NET.Build.Tasks.LockFileExtensions.GetTargetAndReturnNullIfNotFound(LockFile lockFile, String frameworkAlias, String runtimeIdentifier)
   at Microsoft.NET.Build.Tasks.LockFileExtensions.GetTargetAndThrowIfNotFound(LockFile lockFile, String frameworkAlias, String runtimeIdentifier)
   at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheWriter..ctor(ResolvePackageAssets task)
   at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader.CreateReaderFromDisk(ResolvePackageAssets task, Byte[] settingsHash)
   at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader..ctor(ResolvePackageAssets task)
   at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups()
   at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore()
   at Microsoft.NET.Build.Tasks.TaskBase.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() in C:\msbuild\src\Build\BackEnd\TaskExecutionHost\TaskExecutionHost.cs:line 585
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() in C:\msbuild\src\Build\BackEnd\Components\RequestBuilder\TaskBuilder.cs:line 809 [C:\temp\net472\net472.csproj]

Looks like it's some binary incompatibility?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: Our Own BuildProblems affecting the build or build infrastructure of the MSBuild repo itself.triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions