简体   繁体   English

OmniSharp错误在Visual Studio Code中使用COMReferences加载项目

[英]OmniSharp error loading projects with COMReferences in Visual Studio Code

Having issues loading projects in the new Visual Studio Code that work fine in Visual Studio 2013. I was able to load other projects that don't have COMReferences in Visual Studio Code. 在新的Visual Studio Code中加载在Visual Studio 2013中正常运行的项目时遇到了问题。我能够在Visual Studio Code中加载其他没有COMReferences的项目。 Using Windows 7 Enterprise. 使用Windows 7企业版。

Relevant snippet from .csproj file: .csproj文件中的相关代码段:

<ItemGroup>
    <COMReference Include="DTOLib2">
      <Guid>{DBE2B0CE-6BE9-48FE-8300-6ABE0DB9692B}</Guid>
      <VersionMajor>1</VersionMajor>
      <VersionMinor>0</VersionMinor>
      <Lcid>0</Lcid>
      <WrapperTool>tlbimp</WrapperTool>
      <Isolated>False</Isolated>
      <EmbedInteropTypes>True</EmbedInteropTypes>
    </COMReference>
  </ItemGroup>

Relevant snippet from OmniSharp Log: OmniSharp日志中的相关代码段:

[ERROR:OmniSharp.MSBuild.MSBuildProjectSystem] The "ResolveComReference" task could not be instantiated from "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". [ERROR:OmniSharp.MSBuild.MSBuildProjectSystem]无法从“ Microsoft.Build.Tasks.v4.0,版本= 4.0.0.0,文化=中性,PublicKeyToken = b03f5f7f11d50a3a”实例化“ ResolveComReference”任务。 The domain manager specified by the host could not be instantiated. 主机指定的域管理器无法实例化。

[ERROR:OmniSharp.MSBuild.MSBuildProjectSystem] The "ResolveComReference" task has been declared or used incorrectly, or failed during construction. [ERROR:OmniSharp.MSBuild.MSBuildProjectSystem]“ ResolveComReference”任务已被错误地声明或使用,或在构建过程中失败。 Check the spelling of the task name and the assembly name. 检查任务名称和程序集名称的拼写。

The support for MSBuild in OmniSharp isn't as good as we want it to be. OmniSharp中对MSBuild的支持不如我们期望的那样好。 There is a summarizing bug for it here: https://github.com/OmniSharp/omnisharp-roslyn/issues/202 . 这里有一个汇总错误: https : //github.com/OmniSharp/omnisharp-roslyn/issues/202

更新到Visual Studio Code 0.7.0解决了此问题:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Omnisharp 未正确加载 - Visual Studio Code 和 Unity - Omnisharp not loading properly - Visual Studio Code and Unity 使用.Net6 Windows 10 的 OmniSharp 的 Visual Studio 代码出现错误 - Getting Error on Visual Studio Code for OmniSharp with .Net6 Windows 10 在自己的C#项目中使用Visual Studio Code JavaScript IntelliSense(OmniSharp) - Use Visual Studio Code JavaScript IntelliSense (OmniSharp) in own C# projects OmniSharp无法在Visual Studio Code中启动 - OmniSharp failed to start in Visual Studio Code OmniSharp 无法在 Visual Studio Code 中正确加载 - OmniSharp fails to load properly in Visual Studio Code Unity OmniSharp 与 VS 代码 - Omnisharp 错误:“项目加载失败” - Unity OmniSharp with VS Code - Omnisharp error: "Project Loading Failed" “预定义类型'系统。*'未定义或导入”错误,visual studio代码,omnisharp - “Predefined type 'System.*' is not defined or imported” Error, visual studio code, omnisharp 使用.Net Core SDK 3.0预览错误Visual Studio代码和Omnisharp扩展 - Error Visual Studio Code and Omnisharp Extension with .Net Core SDK 3.0 preview 如何让 Omnisharp 扩展在 Visual Studio Code 中工作 - how do I get the Omnisharp extension to work in Visual Studio Code HttpContext在带有OmniSharp扩展的Visual Studio Code中的工作方式有所不同 - HttpContext works differently in visual studio Code with OmniSharp extension
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM