Giter VIP home page Giter VIP logo

Comments (10)

tarekgh avatar tarekgh commented on June 4, 2024 5

just in case if anyone else run into the same issue, the version of the CLI which worked for me is:

Version: 1.0.0-beta-001661

and project.json will be like the following (note that the framework will be netstandardapp1.5):
{
"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": true,
"debugType": "portable"
},

"dependencies": {
    "NETStandard.Library": "1.0.0-rc3-23829"
},

"frameworks": {
    "netstandardapp1.5": {
        "imports": "dnxcore50"
    }
}

}

from vscode-csharp.

pemo11 avatar pemo11 commented on June 4, 2024 3

I had the same problem and adding "debugType": "portable" to Project.json obviously solved it although otherwise I have completely different entries

from vscode-csharp.

Merlin2001 avatar Merlin2001 commented on June 4, 2024 3

Additional note for Visual Studio people:

Make sure to set @bboyle1234's suggestion here:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
    <PlatformTarget>x64</PlatformTarget>
    <DebugSymbols>true</DebugSymbols>

    <DebugType>portable</DebugType>
    
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>

from vscode-csharp.

bboyle1234 avatar bboyle1234 commented on June 4, 2024 2

For Visual Studio people searching on this issue:

  <PropertyGroup>
    <DebugType>portable</DebugType>
  </PropertyGroup>

from vscode-csharp.

chuckries avatar chuckries commented on June 4, 2024

Can you please provide the output of dotnet --version?

from vscode-csharp.

tarekgh avatar tarekgh commented on June 4, 2024

.NET Command Line Tools (1.0.0-beta-001598)

Product Information:
Version: 1.0.0-beta-001598
Commit Sha: 7582649f88

Runtime Environment:
OS Name: Windows
OS Version: 10.0.10586
OS Platform: Windows
Runtime Id: win10-x64

from vscode-csharp.

tarekgh avatar tarekgh commented on June 4, 2024

Also I am seeing in the Debug Console output window the following message

WARNING: Could not load symbols for 'NewCliProject.dll'. 'c:\Temp\NewCliProject\bin\Debug\dnxcore50\win7-x64\NewCliProject.pdb' is a Windows PDB. These are not supported by the cross-platform .NET Core debugger.

I am seeing similar messages for the framework assemblies too. note that I am already using "debugType": "portable" in the project.json which I expect it should support portable pdb.

one more thing, I am seeing the following message when restarting VS Code

[INFORMATION:OmniSharp.Startup] Omnisharp server running using stdio at location 'c:\Temp\NewCliProject' on host 96532.
[ERROR:OmniSharp.Dnx.DnxPaths] The specified runtime path 'default' does not exist. Searched locations

from vscode-csharp.

chuckries avatar chuckries commented on June 4, 2024

There are two issues:

  1. The latest version of dotnet cli from here does NOT support portable pdb's on windows. Please see the note under 2. On Windows here. It will point you to a newer dotnet cli that can produce portable pdb's on Windows. Make sure you completely uninstall your current dotnet cli before installing the new one. Then rebuild your project.
  2. The OmniSharp version we’re using still only supports old-style DNX and MSBuild projects. It doesn’t understand newer .NET CLI project.json files. If you want to try out the newer OmniSharp server to get IntelliSense on .NET Core (but breaking compatibility with MSBuild and DNX), do the following:
  3.   Download the appropriate OmniSharp package from https://github.com/OmniSharp/omnisharp-roslyn/releases/tag/v1.9-alpha1.
    
  4.   Unzip/tar it into a folder.
    
  5.   In VS Code, select Code->Preferences->User Settings from the main menu to open settings.json.
    
  6.   In settings.json, add "charp.omnisharp": "path/to/the/omnisharp/executable/I/just/downloaded"
    
  7.   Restart VS Code.
    

from vscode-csharp.

tarekgh avatar tarekgh commented on June 4, 2024

Now it is working. thanks for your help.

from vscode-csharp.

chuckries avatar chuckries commented on June 4, 2024

I'm glad it's working now. Thanks for the additional feedback!

from vscode-csharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.