Could not load file or assembly 'System.Threading.Tasks.Dataflow' when running from build server.
See original GitHub issueI’ve wrote a small script that download SourceBrowser from NuGet and runs it daily on our build server - a Windows 7 server with .Net 4.6 installed (Windows 2008 R2 didn’t work either). I get this exception while it runs:
09:49:48 Failed to open solution: D:\Jenkins\Slave\job\solution.sln
System.IO.FileNotFoundException: Could not load file or assembly 'System.Threading.Tasks.Dataflow, Version=4.5.24.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Threading.Tasks.Dataflow, Version=4.5.24.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Microsoft.Build.BackEnd.Logging.LoggingService.ProcessLoggingEvent(Object buildEvent, Boolean allowThrottling)
at Microsoft.Build.BackEnd.Logging.LoggingService.LogInvalidProjectFileError(BuildEventContext buildEventContext, InvalidProjectFileException invalidProjectFileException)
at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation)
at Microsoft.Build.Evaluation.Project.Initialize(IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings)
at Microsoft.CodeAnalysis.MSBuild.ProjectFileLoader.<LoadProjectAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.MSBuild.ProjectFileLoader.<LoadProjectFileAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.<LoadProjectAsync>d__40.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.<GetOrLoadProjectAsync>d__39.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.<OpenSolutionAsync>d__34.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.SourceBrowser.HtmlGenerator.SolutionGenerator.CreateSolution(String solutionFilePath, ImmutableDictionary`2 properties)
I solved this issue in another server by installing Visual Studio 2015 - is this required?
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Could not load file or assembly System.Threading.Tasks. ...
IO.FileLoadException : Could not load file or assembly 'System.Threading.Tasks.Dataflow, Version=6.0.0.0, Culture=neutral, PublicKeyToken= ...
Read more >Could not load file or assembly 'System.Threading.Tasks. ...
I'm using Unity + vs code + window 10. ... [warn]: OmniSharp.MSBuild.ProjectManager Failed to load project file 'c:\CYF\Unity\BehaviourTreeAI\ ...
Read more >Could not load file or assembly or one of its dependencies. ...
I get Package 'System.Threading.Tasks.Dataflow:4.9.0' has no deliverable for platform 'net 4.7'. with the attached project.
Read more >System.Threading.Tasks.Dataflow 7.0.0
TPL Dataflow promotes actor/agent-oriented designs through primitives for in-process message passing, dataflow, and pipelining. TDF builds upon the APIs and ...
Read more >VS2017 failed to generate engine .sln:error MSB1025
FileNotFoundException : Could not load file or assembly 'System.Threading.Tasks.Dataflow, Version=4.5.24.0, Culture=neutral, ...
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 Free
Top 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
You may need MSBuildTools 2015
gacutil
gives this output:My solution does not require System.Threading.Tasks.Dataflow.dll. I also tried with another solution (VS 2015 solution, with just one project and a few files), and I’m getting the same error.
After installing Microsoft Build Tools 2015,
gacutil
looks better:Now SourceBrowser can index the small solution, so the problem is solved. My solution has a new error, missing
.targes
file, but that is something I can solve (probably a wrongCondition
in my .csproj). Thanks!