Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net VS代码-更改为.csproj,can';我不再调试了_.net_Visual Studio Code_Vscode Settings - Fatal编程技术网

.net VS代码-更改为.csproj,can';我不再调试了

.net VS代码-更改为.csproj,can';我不再调试了,.net,visual-studio-code,vscode-settings,.net,Visual Studio Code,Vscode Settings,我最近将project.json文件更改为.csproj文件 我尝试启动调试实例,但它返回错误: Microsoft (R) Build Engine version 15.1.548.43366 Copyright (C) Microsoft Corporation. All rights reserved. MSBUILD : error MSB1009: Project file does not exist. Switch: /Users/my_user/sf-build-ms-port

我最近将project.json文件更改为.csproj文件

我尝试启动调试实例,但它返回错误:

Microsoft (R) Build Engine version 15.1.548.43366
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist.
Switch: /Users/my_user/sf-build-ms-port/sfbuild-DotNetCore/project.json
和一条错误消息:

The preLaunchTask 'build' terminated with exit code 1.
出现在顶部

这是我的.csproj文件:

<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <TargetFramework>netcoreapp1.1</TargetFramework>
        <DebugType>portable</DebugType>
        <AssemblyName>sfbuild</AssemblyName>
        <OutputType>Exe</OutputType>
        <PackageId>sfbuild-DotNetCore</PackageId>
<PackageTargetFallback>$(PackageTargetFallback);dnxcore50</PackageTargetFallback>
<RuntimeFrameworkVersion>1.1.1</RuntimeFrameworkVersion>
</PropertyGroup>

  <ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
    <PackageReference Include="System.Xml.XmlDocument" Version="4.3.0" />
    <PackageReference Include="System.Xml.XDocument" Version="4.3.0" />
    <PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
     <PackageReference Include="System.Diagnostics.Process" Version="4.3.0" />
   </ItemGroup>

</Project>

我知道这个程序绝对是正确的。

我也有同样的问题。在新macbook上安装dotnet core后,如果不迁移到“新”csproj文件,我就无法构建。现在VSCode只是一个文本编辑器-从命令行启动后,我无法启动调试器或附加调试器。我已经确保运行了最新的vscode和c#扩展更新,但仍然无法工作。
{
"version": "0.2.0",
"configurations": [
    {
        "name": ".NET Core Launch (console)",
        "type": "coreclr",
        "request": "launch",
        "preLaunchTask": "build",
        "program": "${workspaceRoot}/bin/Debug/netcoreapp1.1/sfbuild.dll",
        "args": [],
        "cwd": "${workspaceRoot}",
        "externalConsole": false,
        "stopAtEntry": false,
        "internalConsoleOptions": "openOnSessionStart"
    },
    {
        "name": ".NET Core Attach",
        "type": "coreclr",
        "request": "attach",
        "processId": "${command.pickProcess}"
    }
]
}