Comments (10)
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.
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.
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.
For Visual Studio people searching on this issue:
<PropertyGroup>
<DebugType>portable</DebugType>
</PropertyGroup>
from vscode-csharp.
Can you please provide the output of dotnet --version
?
from vscode-csharp.
.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.
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.
There are two issues:
- 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.
- 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:
-
Download the appropriate OmniSharp package from https://github.com/OmniSharp/omnisharp-roslyn/releases/tag/v1.9-alpha1.
-
Unzip/tar it into a folder.
-
In VS Code, select Code->Preferences->User Settings from the main menu to open settings.json.
-
In settings.json, add "charp.omnisharp": "path/to/the/omnisharp/executable/I/just/downloaded"
-
Restart VS Code.
from vscode-csharp.
Now it is working. thanks for your help.
from vscode-csharp.
I'm glad it's working now. Thanks for the additional feedback!
from vscode-csharp.
Related Issues (20)
- [BUG] Error with Go To Definition
- Go to definition problem. HOT 1
- [BUG] Unable to see information items in Problems View HOT 1
- [BUG] C# + C# Dev Kit does not activate and throws exception HOT 3
- [BUG] C# Base Language Support - Expand selection (alt + shift + right arrow) of methods and other members with body does not work correctly
- method intelliSense is wrong in Parallel.For action HOT 1
- Generate assets for construction and debugging, disappeared in the most current version HOT 1
- Iteration Plan for May 2024
- [BUG] Custom formatting imposible HOT 5
- Add Collapse Folders button in the Solution explorer pane HOT 1
- LaunchBrowser related features does-not work when working on a Codespace HOT 2
- "Go to definition", visual studio code says "No definition found" HOT 2
- C# extension fails to find dotnet after downloading it HOT 2
- hh HOT 1
- error c# HOT 2
- C# Extension not working inside Codespace. HOT 4
- System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. HOT 5
- CONTRIBUTING.md - Building - Step 3 - gulp installDependencies fails with error TS7006: Parameter 'pr' implicitly has an 'any' type. HOT 3
- An error when trying to clean the solution HOT 1
- color theme HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-csharp.