Go To Definition on a managed function should not attempt to open a DLL as a text file
まだ誰も着手していません。
評価
調査の方向性
まず cl /clr を使って a.cpp の例を再現し、#using と System::Console に対する IntelliSense のエラーを確認します。次に、issue で説明されている tips.h と system.h の回避策を確認し、そのうえで DLL をテキストとして開かずに、Go To Definition がマネージド関数をどのように扱うべきかを判断します。C++/CLI コードが、コンパイル時の再定義を引き起こすヘッダーを必要とせずに有用な IntelliSense を受けられれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Type: Feature Request
Once I want to code a tool for .net I found that I have few supports.Intellisence doesn't recognise the code concerning CLR.
//a.cpp
#using<system.dll>
using namespace System;
int main(void){
Console::WriteLine("Hello World");
return 0;
}
This code surely passes the compilation with cl a.cpp /clr ,but I got these Intellisence errors:
name followed by '::' must be a class or namespace name
"#using" requires C++/CLI mode
I think it it because intellisence can't find a file declaring these namespaces and function.So I build a header.
//tips.h
namespace System{
class Console final{
public:
static void WriteLine(...);
static void Write(...);
private:
};
}//namespace System
However, this will trigger a redefination error at compile time.
system.h(4): error C2011: redefination of “System::Console”:“class”
Is there a way to get tips and Intellisence check without coming into compile time errors? Can this problem be solved by extra features? or by manually making headers?,or other snippet options? I wish there is a method.
- 主要言語
- TypeScript
- スター
- 6.2k
- フォーク
- 1.7k
- 平均マージ
- 14時間 46分
- マージ済み PR(30日)
- 61
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/vscode-cpptools のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
microsoft/vscode-cpptools#14787 ·
-
[Bug] cpptools fails to start on Ubuntu ARM64 due to missing execute permissions on shared libraries オープンbug fixed Language Service regression
microsoft/vscode-cpptools#14779 · 担当者 1 名 ·
-
Language Service more info needed
microsoft/vscode-cpptools#14778 · コメント 1 件 · 担当者 1 名 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 64/100
microsoft/vscode-cpptools#14769 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
microsoft/vscode-cpptools#14768 · コメント 1 件 ·
microsoft/vscode-cpptools の issue をすべて見る
似ている issue
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
-
code-quality refactoring
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
langchain-ai/deepagents#6450 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
vercel/react-tweet#225 ·