简体   繁体   中英

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. Using Windows 7 Enterprise.

Relevant snippet from .csproj file:

<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:

[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". 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. 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. There is a summarizing bug for it here: https://github.com/OmniSharp/omnisharp-roslyn/issues/202 .

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM