【问题标题】:Could not load file or assembly 'System.Threading.Tasks.Dataflow, Version=4.6.3.0无法加载文件或程序集'System.Threading.Tasks.Dataflow,版本 = 4.6.3.0
【发布时间】:2021-03-04 14:45:30
【问题描述】:

我正在使用 Unity + vs 代码 + 窗口 10。

有一天,OmniSharp 无缘无故停止工作。任何帮助表示赞赏! 我尝试重新安装 vscode、.net core sdk 和 c# 扩展。没有运气

[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file 'c:\CYF\Unity\BehaviourTreeAI\bhtree\Assembly-CSharp-Editor.csproj'.
c:\CYF\Unity\BehaviourTreeAI\bhtree\Assembly-CSharp-Editor.csproj(0,0)
System.IO.FileNotFoundException: Could not load file or assembly 'System.Threading.Tasks.Dataflow, Version=4.6.3.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.6.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at Microsoft.Build.BackEnd.Logging.LoggingService.ProcessLoggingEvent(Object buildEvent, Boolean allowThrottling)
   at Microsoft.Build.BackEnd.Logging.LoggingService.LogProjectEvaluationStarted(BuildEventContext projectEvaluationEventContext, String projectFile)
   at Microsoft.Build.Evaluation.Evaluator`4.Evaluate()
   at Microsoft.Build.Evaluation.Evaluator`4.Evaluate(IEvaluatorData`4 data, ProjectRootElement root, ProjectLoadSettings loadSettings, Int32 maxNodeCount, PropertyDictionary`1 environmentProperties, ILoggingService loggingService, IItemFactory`2 itemFactory, IToolsetProvider toolsetProvider, ProjectRootElementCacheBase projectRootElementCache, BuildEventContext buildEventContext, ISdkResolverService sdkResolverService, Int32 submissionId, EvaluationContext evaluationContext, Boolean interactive)
   at Microsoft.Build.Evaluation.Project.ProjectImpl.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
   at Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
   at Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(EvaluationContext evaluationContext)
   at Microsoft.Build.Evaluation.Project.ProjectImpl.Initialize(IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
   at Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
   at Microsoft.Build.Evaluation.ProjectCollection.LoadProject(String fileName, IDictionary`2 globalProperties, String toolsVersion)
   at OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore(String filePath, IReadOnlyDictionary`2 projectConfigurationsInSolution) in D:\a\1\s\src\OmniSharp.MSBuild\ProjectLoader.cs:line 157
   at OmniSharp.MSBuild.ProjectLoader.BuildProject(String filePath, IReadOnlyDictionary`2 configurationsInSolution) in D:\a\1\s\src\OmniSharp.MSBuild\ProjectLoader.cs:line 75
   at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load(String filePath, ProjectIdInfo projectIdInfo, ProjectLoader loader, Guid sessionId, DotNetInfo dotNetInfo) in D:\a\1\s\src\OmniSharp.MSBuild\ProjectFile\ProjectFileInfo.cs:line 116
   at OmniSharp.MSBuild.ProjectManager.<>c__DisplayClass31_0.<LoadProject>b__0() in D:\a\1\s\src\OmniSharp.MSBuild\ProjectManager.cs:line 304
   at OmniSharp.MSBuild.ProjectManager.LoadOrReloadProject(String projectFilePath, Func`1 loader) in D:\a\1\s\src\OmniSharp.MSBuild\ProjectManager.cs:line 315

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

【问题讨论】:

    标签: c# unity3d visual-studio-code omnisharp


    【解决方案1】:

    我也遇到了这个问题,我认为这是一个 Omnisharp 错误。我刚刚更新到 Omnisharp 版本 1.37.8-beta.2,它看起来包含针对此问题的错误修复,它为我解决了问题。

    【讨论】:

      【解决方案2】:

      我今天遇到了完全相同的错误...

      就我而言,虽然我目前只使用 VS Code,但我仍然安装了 Visual Studio 2017 Community Edition 和 Visual Studio Build Tools 2017。

      在将我的 VS Code 升级到 1.54.0(今天发布)并将 Visual Studio Community Edition 和 Visual Studio Build Tools 升级到 2019 版本后,该错误就消失了。不再有 Omnisharp 错误,不再有问题通知警报,Intellisense 再次工作。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-10-15
        • 2020-05-09
        • 2018-10-04
        • 2020-11-11
        • 2013-11-14
        相关资源
        最近更新 更多