Microsoft が開発した、.NET で使用できるオブジェクト指向のプログラミング言語。
Hi @huahi11115 ,
Thank you for reporting this behavior. I can confirm that I was able to reproduce the scenario you described
I believe this behavior occurs because of the fundamental differences in how Visual Studio manages metadata and symbol information between managed languages (VB.NET/C#) and C++/CLI. In this case, since the VB.NET project references the DLL file directly, Visual Studio only has access to the compiled binary and its metadata, not the original .cpp/.h files. If the VB.NET project referenced the C++/CLI project directly, Visual Studio might be able to navigate to the real source because it knows exactly where the files are.
Currently, this is expected behavior and is considered by design rather than a bug. There is no guaranteed configuration or setting to force Visual Studio to always open the real C++/CLI source from VB.NET.
If this feature is important for your workflow, we recommend submitting a feature request through the Visual Studio Developer Community. Providing detailed feedback there helps the product team understand demand and consider improvements in cross-language navigation.
We understand that this behavior can be frustrating. Your feedback and feature requests are valuable in helping improve the developer experience in Visual Studio. If you find my answer useful, please kindly mark it as accepted answer.
Thank you!
こんにちは @huahi11115 さん
この動作をご報告いただきありがとうございます。ご指摘のシナリオをこちらでも再現できることを確認しました。
この動作は、Visual Studio がメタデータやシンボル情報を管理する仕組みが、VB.NET/C# などのマネージ言語と C++/CLI で根本的に異なることに起因しています。今回のケースでは、VB.NET プロジェクトが DLL ファイルを直接参照しているため、Visual Studio はコンパイル済みのバイナリとそのメタデータのみを認識し、元の .cpp/.h ファイルにはアクセスできません。もし VB.NET プロジェクトが C++/CLI プロジェクトを直接参照していれば、Visual Studio はファイルの場所を把握しているため、実際のソースコードへナビゲートできる可能性があります。
現時点では、この挙動は仕様通りであり、バグではなく「設計上の動作」とされています。VB.NET から常に C++/CLI の実ソースを開くように強制する設定や構成は保証されていません。
この機能がワークフロー上重要な場合は、Visual Studio Developer Community で機能要望を送信することをお勧めします。詳細なフィードバックを提供することで、製品チームがニーズを把握し、言語間ナビゲーションの改善を検討する助けになります。
この挙動がご不便に感じられることは理解しています。皆さまからのフィードバックや機能要望は、Visual Studio の開発者体験を向上させるために非常に重要です。もしこの回答がお役に立ちましたら、「回答として承認」していただけると幸いです。
ありがとうございます!