Skip to content

Go To Definition on a managed function should not attempt to open a DLL as a text file #8539

@HOMODELUNA

Description

@HOMODELUNA

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions