I do not have VS 2017, and I will build a web interface in VS Code anyway, so I want to use VS Code.
Until .NET Standard 2.0 appears, our libraries are also in 4.6.1, so I am targeting net461 in my .NET Core csproj:
<Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFramework>net461</TargetFramework> </PropertyGroup> <ItemGroup> <Folder Include="wwwroot\" /> </ItemGroup> <ItemGroup> <PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" /> <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" /> <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" /> </ItemGroup> </Project>
The project is the simplest dotnet new webapi for beginners. I can build and run with dotnet build and dotnet run . I also got the latest ms-vscode.csharp 1.8.1 extension.
However, when I try to connect or debug this application using VS Code, I get an error
Failed to connect to the process: only 64-bit processes can be debugged
Even from the console, and then with a very simple configuration:
{ "name": ".NET Core Attach", "type": "coreclr", "request": "attach", "processId": "${command:pickProcess}" }
And the process selection with this error ends. I tried creating exe targeting on x64 with:
<PropertyGroup> <TargetFramework>net461</TargetFramework> <Platform>x64</Platform> </PropertyGroup>
But he makes the same mistake. Does anyone know a fix? It seems because I'm aiming at net461, debugging .Net Core doesn't support targeting to other frameworks?
source share