Where is the "Add package" lightbulb in Visual Studio 2017? - c#

In C# in Visual Studio 2015 if you specify a name present in a package not currently referenced then the Lightbulb feature pops-up and suggests a package reference to add.
[]
I can't seem to get this in Visual Studio 2017. Is there some extension I need to install or some other setting?

I tested this class that you mentioned and other classed that included in the .NET Core App, it looks like there is no such option ‘Add package ……’ like the following screenshot. I have already reported this issue to the VS Product Team and please have a look at this: https://developercommunity.visualstudio.com/content/problem/32739/in-vs-2017-invoke-a-class-that-included-in-a-packa.html, then we need to waiting for the response from the VS Product Team Engineers😊

Related

Visual Studio 2022 dosen't see files in project when I create ASP.Net Project

I have problem with my Visual. When I tried to create ASP.NET project, visual studio doesn't see any files in project. I see only No solution(0) . I create project in the same way like in this topic : Why my latest version Visual Studio 2022 does not contain any project under the solution in the Solution Explorer
I Tried to reinstall visual about 6 times. I don't know where is the problem.
the problem is that you are trying to use a version project framework that you don't installed yet.
it's seems to be that the solution is format and reinstall windows, easy ;)

Visual Studio stopped supporting my projects

I have Visual Studio 2013 Ultimate. Today when I opened it, it didn't load any of my solution's projects. Error message:
Unsupported
This version of Visual Studio is unable to open the following projects. The project types may not be installed or this version of Visual Studio may not support them.
For more information on enabling these project types or otherwise migrating your assets, please see the details in the "Migration Report" displayed after clicking OK.
- ETL_<Project name>, "<Project path></Project>.csproj"
Non-functional changes required
Visual Studio will automatically make non-functional changes to the following projects in order to enable them to open in Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1. Project behavior will not be impacted.
- <Project name></Project>, "<Project path></Project>.sln"
These projects are of types Class Library and Console Application. If I try to create a new project, these types are listed, but when I create it I get message <Project path> cannot be opened because its project type (.csproj is not supported by this version of the application. To open it, please use a version that supports this type of project..
So, Visual Studio is telling me it doesn't support a project it just created?! GJ M$!!
Unfortunately I was unable to solve this. I ended up uninstalling VS Ultimate. Now I use VS Express for Desktop, and it works with my old projects.
My assumption is that something on Windows broke some part of VS. I should have tried to uninstall and reinstall it but didn't have the opportunity.
I have the same thing in a Hyper-V VM. After repair did not work, I deinstalled and reinstalled VS 2017. Same thing.
In the host I can still open the same project with VS, so it is not the project, but the VS install that has a problem.
It puts this in the migration log:
src\DTOWEB\project.json: Failed to migrate XProj project DTOWEB. Could not find project.json at C:\DTOWeb\DTOWEB7\src\DTOWEB\project.json.
I have a second VM that is x86 iso x64, and it can open the project without problems. So again, my conclusion is there is nothing wrong with the project.

Can't find the Class Diagram in Visual Studio 2017

I've installed Visual Studio 2017 Enterprise on my computer with the Installer and there are some optional options like the "Class-Diagram".
I've checked it but it won't show up in my project templates.
Programm language: C#
Version VS 2017: 15.0.26228.9
Version VS Installer: 1.5.30308.1
VS Installer - Class Diagram is checked and already installed (Screenshot)
On the left hand side, we can't find the category "Model Project" like in VS 2015
Regards
It seems the 'modelling project' feature is removed from Visual Studio 2017. Reasons are given here https://blogs.msdn.microsoft.com/devops/2016/10/14/uml-designers-have-been-removed-layer-designer-now-supports-live-architectural-analysis/
Have you added the Visual Studio extension development?
Along with Class Designer, you have to include Visual Studio extension development also from the VS2017 installer.
If you have installed all the required things mentioned above and if you are still not seeing the Class Diagram from Solution Explorer , switch to Class View and then you will see the "View Class Diagram" option

GIT integration to show method history in Visual Studio

We use GitHub for our source code repository and Visual Studio for our development (C#). I downgraded from Visual Studio Professional (Trial) to Community Edition and somehow lost the GIT method history I had above each method signature. I've since reinstalled Pro version and still can't see it. This method history was very useful and looked something like:
Last Update 8/1/2015, 3 authors.
Void DoSomething() {}
Clicking on the status line would bring up things like "compare to previous version", history etc.
I'm not sure if it was a feature of Visual Studio Professional (doubtful) or one of the git extensions I possibly installed (see Tools->Extensions and Updates) or something else. I'm new to using GIT/GitHub, especially with Visual Studio and would appreciate some help. My specific questions
1. How do I get history/last author/etc for each method (not file)? Does it work under Professional and Community
2. What are some good Git Tools to install in Visual Studio to see changes/history, etc.? I'm using the command line to commit/push etc., but am not opposed to doing this from Visual Studio if it makes sense.
Thanks,
Dave
What you initially refer to is a feature of Visual Studio called CodeLens. It's available in the Professional and Enterprise editions of Visual Studio 2015, but not available in the Community edition.
To try and resolve this not working, I would:
Make sure you are actually running Visual Studio 2015 Professional edition, and not the Community edition.
Make sure you have Git for Windows installed.
In addition to the excellent answer by Steve (which I'm marking as answer), I'll note that I had additional problems (after installing Git for Windows).
I got errors at startup and didn't see the method info. The errors were:
The 'GitCollaborationPackage' package did not load correctly.
The 'FileIndicatorPackage' package did not load correctly.
The fix was to rename the componentmodelcache directory under C:\Users\cshar\AppData\Local\Microsoft\VisualStudio\14.0
See:
Packages not loading after installing visual studio 2015 RTM
or
http://kuebiko.blogspot.ru/2013/07/setsite-failed-for-package.html

Bulid SQLite-Net Extensions in visual studio professional 2013 but not successful

I am new to windows app and I am going to build the sqlite-net extension project to .dll file in order to make the models have the relationship attribute of one-to-many, one-to-one, many-to-many.
Link: https://bitbucket.org/twincoders/sqlite-net-extensions
This is the info that it shows when I open the project in visual studio 2013.
Unsupported
This version of Visual Studio is unable to open the
following projects. The project types may not be installed or this
version of Visual Studio may not support them. For more information
on enabling these project types or otherwise migrating your assets,
please see the details in the "Migration Report" displayed after
clicking OK.
- IntegrationTests.Touch-MvvmCross, "C:\Users\**\Downloads\sqlite-net-extensions\sqlite-net-extensions\IntegrationTests.Touch\IntegrationTests.Touch-MvvmCross.csproj"
- IntegrationTests.Touch-PCL, "C:\Users\**\Downloads\sqlite-net-extensions\sqlite-net-extensions\IntegrationTests.Touch\IntegrationTests.Touch-PCL.csproj"
No changes required These projects can be opened in Visual Studio
2013, Visual Studio 2012, and Visual Studio 2010 SP1 without changing
them.
- Tests, "C:\Users\**\Downloads\sqlite-net-extensions\sqlite-net-extensions\Tests\Tests.csproj"
- MvvmCross, "MvvmCross"
- SQLiteNetExtensions-MvvmCross, "C:\Users\**\Downloads\sqlite-net-extensions\sqlite-net-extensions\SQLiteNetExtensions\SQLiteNetExtensions-MvvmCross.csproj"
- SQLiteNetExtensions-PCL, "C:\Users\**\Downloads\sqlite-net-extensions\sqlite-net-extensions\SQLiteNetExtensions\SQLiteNetExtensions-PCL.csproj"
- SQLiteNetExtensions, "C:\Users\**\Downloads\sqlite-net-extensions\sqlite-net-extensions\SQLiteNetExtensions.sln"
I try to build it and it shows some errors. So I right click the project and download the missing packages. When I try to build it again, it shows these errors:
Does anyone successfully bulid it to .dll file or anyone can fix the problems like these?
Many Thanks!
The Integration test projects are MonoTouch projects, that won't open in Visual Studio unless you have Xamarin Business license installed in your PC.
However, the SQLite-Net Extensions project is a standard PCL project and you will be able to compile it from Visual Studio without Xamarin. The problem that you are describing is probably related to not having the SQLite-Net dependency downloaded.
Make sure that you have NuGet Package Manager plugin installed and restore NuGet packages for the project to restore the dependencies and it should work.
You can also download the pre-compiled DLL from the Download page in the project page.
I solved it with changing the build platform. Thx guys!

Categories