Skip to content

The "ProcessFrameworkReferences" task can't find NuGet.Frameworks, Version=5.9.1.8, Culture=neutral, PublicKeyToken=31bf3856ad364e35 #1

@r-pankevicius

Description

@r-pankevicius

Watched Mark Rendle - Automate Yourself Out Of a Job With Roslyn video and tried to play with it.

Steps:

  1. git clone repo
  2. Open with Visual Studio 16.9.4
  3. In Project properties, Debug, Application arguments write: ..\..\..\..\..\RoslynDemo.sln (i.e. try to run on self)
  4. Compile and run.

Output:

Msbuild failed when processing the file 'C:\~src\VisualRecode\BuildStuff2020\src\RoslynDemo\RoslynDemo.csproj' with message: C:\Program Files\dotnet\sdk\5.0.202\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets: (63, 5): The "ProcessFrameworkReferences" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load file or assembly 'NuGet.Frameworks, Version=5.9.1.8, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
File name: 'NuGet.Frameworks, Version=5.9.1.8, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at Microsoft.NET.Build.Tasks.ProcessFrameworkReferences.ExecuteCore()
   at Microsoft.NET.Build.Tasks.TaskBase.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
RoslynDemo.AutoGeneratedExtensions
  IsAutoGenerated
  BeginsWithAutoGeneratedComment
RoslynDemo.DependenciesDemo
  ListAllUsedTypes
  GetTypes
RoslynDemo.ListTypesVisitor
  VisitNamespace
  VisitNamedType
  VisitMethod

etc...

Upgrading
<PackageReference Include="NuGet.ProjectModel" Version="5.8.0" />
to the latest:
<PackageReference Include="NuGet.ProjectModel" Version="5.9.1" />
solves the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions