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

GenerateDepsFile fails when project has dependency on other project with an AssemblyName property #33

Open
remoba opened this issue Jan 24, 2024 · 0 comments

Comments

@remoba
Copy link

remoba commented Jan 24, 2024

When trying to analyze a simple solution using the latest tool version (0.7.0) I am getting the following error:

fail: Buildalyzer.Logging.EventProcessor[0]
      The "GenerateDepsFile" task failed unexpectedly.
      System.IO.FileNotFoundException: C:\Users\mobaral\Downloads\ErrorRepro\Project1\bin\Debug\net6.0\OtherName.dll
         at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)
         at Microsoft.NET.Build.Tasks.FileUtilities.GetFileVersion(String sourcePath)
         at Microsoft.NET.Build.Tasks.DependencyContextBuilder.CreateRuntimeFile(String path, String fullPath)
         at Microsoft.NET.Build.Tasks.DependencyContextBuilder.Build()
         at Microsoft.NET.Build.Tasks.GenerateDepsFile.WriteDepsFile(String depsFilePath)
         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)

Note that afterwards, the dependency window opens as normal, so this appears to just be noise, but I am looking for a way to suppress it.

This error is only thrown when my solution contains a project (Project2) that depends on another project (Project1), with that project (Project1) having an AssemblyName property.

I've attached a sample solution for reproduction, simply unzip and run dotnet depends on the root

ErrorRepro.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant