简体   繁体   中英

Not able to import namespaces automatically in Visual Studio

I am new to C#, I have been working on Java. So when I write any class name in Visual Studio, VS do not import or show suggestions to import namespaces,unlike we do in my Eclipse by CTRL+SPACE .

I used CTRL + .(dot) and CTRL+SHIFT+F10 but they did not help. I am really frustrated, please suggest any idea.

Your help will be appreciated. Thanks

If you have a namespace in a different DLL in your project, you first need to right-click references and select " add reference " and then checkmark the dll.

After doing this, CTRL+DOT will work :)

If it is a reference to an external package, such as NuGet, you can right-click the solution file and choose "Restore Nuget Packages"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM