accord-net / framework

Machine learning, computer vision, statistics and general scientific computing for .NET
http://accord-framework.net
GNU Lesser General Public License v2.1
4.46k stars 2k forks source link

Adding Machine Learning to c# project breaks Intellisense. #2141

Open flycast opened 4 years ago

flycast commented 4 years ago

What would you like to submit? (put an 'x' inside the bracket that applies)

Issue description Using Microsoft Visual Studio Community 2019 Version 16.6.2

When I add the NuGet package for Machine Learning Intellisense gets broken. When I type an instance of any variable Intellisense does not display any properties, methods, etc on any of my variables - Accord or otherwise. If I add the method (like List::Add()) then the signature of the method will be displayed.

If I remove the NuGet package for Machine Learning Intellisense comes back.

ymerkryds commented 4 years ago

I have the same issue.

Adding Accord.Statistics to my C# project in visual studio 2019 breaks intellisense. I have tried both empty .NET and .NET Core console projects. Microsoft Visual Studio Community 2019 Version 16.6.2 I can confirm that intellisense comes back when removing the nuget package

Info: There is no issue when adding to a project using Visual studio 2017

cesarsouza commented 4 years ago

Hi everyone,

Thanks for opening the issue. However, this is more an issue with VS itself than Accord. Can you please report this problem to MS using the VS report tool? https://docs.microsoft.com/en-us/visualstudio/ide/how-to-report-a-problem-with-visual-studio?view=vs-2019

Please share a link to the issue here if you do, so we can track why this is happening. It is certainly a regression from the last VS update.

flycast commented 4 years ago

OK. I upgraded Visual Studio to Version 16.6.3. That looks like it resolved the issue. @ymerkryds - I wonder if it will fix the issue for you?

ymerkryds commented 4 years ago

@flycast my visual studio installer tells me I am up to date, running Microsoft Visual Studio Community 2019 Version 16.6.3 The problem still exists on my end. I forgot to mention that, if you type the dot after a typing a object name, and you normally see the intellisense menu, I just have to wait about a minute, and then it appears. (But, I see now that it works in an empty project, but not in my current project :( ) EDIT: It does NOT work in empty project anyway. this topic has been created: https://developercommunity.visualstudio.com/content/problem/1093077/intellisense-stops-working-after-adding-reference.html

flycast commented 4 years ago

(But, I see now that it works in an empty project, but not in my current project :( ) I tried it in an empty project as well.

cesarsouza commented 4 years ago

If I were to point a likely cause, I would say it that the newest version of VS is now choking when processing one of the auto-generated classes in the Accord.Math namespace, e.g., Jagged.Product.Generated.cs.

genlu commented 3 years ago

I follow the link from one of the VS feedback ticket to get here. I can confirm that this is a regression we introduced in VS 16.6 (see https://github.com/dotnet/roslyn/issues/45042), the fix will be shipped in VS 16.7. Meanwhile, you should be able to workaround this issue by disabling “Show items from unimported namespaces” feature. Thanks