【问题标题】:OmniSharp MSBuild ProjectManager is not able to update my .csproj fileOmniSharp MSBuild ProjectManager 无法更新我的 .csproj 文件
【发布时间】:2019-09-26 21:33:21
【问题描述】:

使用 VS Code 1.38.1、Win10 Build 190921、WSL2、.NET Core 3.0.1(今天全部更新)。尝试使用 OmniSharp 调试扩展,这是我看到的。

[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: /home/jdunn7453/dnc/sample1/sample1.csproj

launch.json 文件包含

"version": "0.2.0",
    "configurations": [
        {
            "name": ".NET Core Launch (console)",
            "type": "coreclr",
            "request": "launch",
            "WARNING01": "*********************************************************************************",
            "WARNING02": "The C# extension was unable to automatically decode projects in the current",
            "WARNING03": "workspace to create a runnable launch.json file. A template launch.json file has",
            "WARNING04": "been created as a placeholder.",
            "WARNING05": "",
            "WARNING06": "If OmniSharp is currently unable to load your project, you can attempt to resolve",
            "WARNING07": "this by restoring any missing project dependencies (example: run 'dotnet restore')",
            "WARNING08": "and by fixing any reported errors from building the projects in your workspace.",
            "WARNING09": "If this allows OmniSharp to now load your project then --",
            "WARNING10": "  * Delete this file",
            "WARNING11": "  * Open the Visual Studio Code command palette (View->Command Palette)",
            "WARNING12": "  * run the command: '.NET: Generate Assets for Build and Debug'.",
            "WARNING13": "",
            "WARNING14": "If your project requires a more complex launch configuration, you may wish to delete",
            "WARNING15": "this configuration and pick a different template using the 'Add Configuration...'",
            "WARNING16": "button at the bottom of this file.",
            "WARNING17": "*********************************************************************************",
            "preLaunchTask": "build",
            "program": "${workspaceFolder}/bin/Debug/<insert-target-framework-here>/<insert-project-name-here>.dll",
            "args": [],
            "cwd": "${workspaceFolder}",
            "console": "internalConsole",
            "stopAtEntry": false
        },
        {
            "name": ".NET Core Attach",
            "type": "coreclr",
            "request": "attach",
            "processId": "${command:pickProcess}"
        }
    ]

【问题讨论】:

    标签: c# windows-10 ubuntu-18.04 windows-subsystem-for-linux .net-core-3.0


    【解决方案1】:

    从 3.0 恢复到 2.2。 Omnisharp 似乎需要一个支持 dotnet Core 3.0 的 MSBuild。 VS2019 有一个,但如您所知,还没有适用于 ubuntu 的 Visual Studio 版本。

    【讨论】:

      猜你喜欢
      • 2020-04-03
      • 2017-10-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-07-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多