Web Project Templates Missing - c#

I've installed the VS Community 2015 Update 1 but I'm not able to see the Web Project templates. I have done everything, reinstall, repair, reinstall the templates using devenv /installvstemplates, remove the ProjectTemplatesCache folder, pretty much everything I've found about similar issues but without results.
Any suggestion?
Thanks in advance

Well, the only thing that actually solved this issue: uninstall every single component manually installed (I assume that restoring the system to a previous point should work as well)...

Related

Visual studio 2019 go to definition and Intellisense not working

I have noticed a weird issue with Visual Studio 2019 v16.0.1 the IntelliSense about "Using directive is unnecessary" normally grey is missing and type reference suggestion for missing using is not working.
I also tried with Visual Studio 2019 Preview but no luck.
I have tried the following:
deleted .vs folder and restarted.
Reinstalled Visual Studio
Reset settings via import and export setting under tools
Any other suggestions will be appreciated.
Close Visual Studio
Delete .vs folder (it is a hidden folder inside the folder which contains the solution *.sln)
Start Visual Studio
Solved my problem
Update From the comments
Deleting Browse.VC.db file within .vs folder worked for me. I did this to avoid deleting .suo which has information I want to preserve
NOTE 1: I am using Visual Studio 2019, but it may work on other versions
NOTE 2: This did not solve the OP problem, but it is a good candidate to solve your
Go to Tools -> Options -> Text Editor -> All Languages -> General. Make sure “Auto List Members” is checked. Also, make sure “Parameter Information” is checked.
If you are facing this issue with Unity projects then,
Check in your Unity settings whether it has Visual Studio configured as the external editor.
Click on Regenarate project files in the Unity settings.
Go to Assets => Open C# project.
This will restart Visual Studio with your project.
In my case, Resharper is the culprit. Disabling it immediately solved the issue.
I think these issues are discussed here and are resolved by an update and some worksrounds are bring discussed:
https://developercommunity.visualstudio.com/content/problem/505489/cannot-navigate-to-the-symbol-under-the-caret-3.html
For anyone who are searching for another suggestion, I just go throught this issue, as OP said, I've deleted .vs folder, I've update vs to last version, I've uninstalled and reinstalled vs to the last version, I've reset settings, delete all obj folders, I've installed Microsoft.Net.Compilers but nothing worked, at the end I just remembered that sometimes the projects required WindowsBase library, until now I don't know why, but after adding that dll Intellisense started to function again.
I use resharper (vs 2017) but had not installed it on 2019. After installing Resharper on 2019 the intellisense started working again. (yes, it was working in 2019, then stopped)
I don't have an explanation on why this would fix it. Just did for me.
First time I use VS 2019, I need to manually install Code Analysis. Make sure it is installed at your project properties.
And today, for the new class, the suggestion or namespaces not showing for VS 2019 Intellisense, and Go to Definition not working too.
I must do close solution, and re-open and VS 2019 doing scanning while opening project, and then worked again.
I think this is bug for VS 2019. Try to close solution and re-open it.
I have tried almost all the solution mentioned above but it doesn't helped me. Trying to restart my PC solved my problem.
I tried lots of things but nothing worked for me until I found this post. He mentions a few things I have already tried that didn't work, but his final solution worked for me...
At the root of our solution there is a packages folder. I deleted the
entire contents of this folder. Upon reopening Visual Studio,
Intellisense and Go To Definition were restored to full working order.
close visual stdio
For mac in your folder: do command + shift+ .
you will see hidden files -> delete .vs folder
open solution again
After working for a few months, Intellisense suddenly stopped. This cost me a lot of lost time! I've been worked with Visual Studio for about 10 years, and this problem happens occasionally in every version.
Here's what I tried for this iteration of the problem:
Closing Visual Studio and re-opening does sometimes make the problem disappear for a short time, but it certainly doesn't solve it
Likewise restarting my laptop
Installing the latest Visual Studio 2019 update didn't help (I'm on 16.8.3 now if anyone's interested)
Deleting the hidden .vs folder doesn't seem to solve anything (doing so also means you lose your current window layout, as well as any bookmarks you've set)
Unticking the Track Changes option in this menu: Tools-> Options-> Text Editor-> General.
I've updated my NuGet reference to the Microsoft.Net.Compilers library to the latest stable version, as suggested here, but sadly this made no difference
I thought I've finally solved the problem by following the advice from Homer. I deleted the packages folder at the base level of my project (somewhat nervously, as I wasn't sure if it was needed), and thought it had solved the problem, but no such luck.
However, one thing to watch out for - after doing this, Visual Studio recognised my classes but no longer recognised built-in ones (all the referenced namespaces at the top of my controllers were underlined in red). I then deleted the .vs folder (again), which seemed to solve the problem.
When I recompiled my solution, it gave a few CS0433 compilation errors with duplicate namespaces for the MinLength and MaxLength directives in some identity user name and password validation code. I got round this by removing the Microsoft.EntityFramework Nuget library (I had to also remove Microsoft.AspNet.Identity.EntityFramework too, since this depended on it), then adding them both back in, making sure to include at least version 6.2 of the former (otherwise I got another runtime error to do with the FirstOrDefaultAsync method called somewhere!).
My current situation: all existing Intellisense is working, but it's not recognising new classes I add unless I exit Visual Studio and go back in again. May have to live with this ... unless anyone can help me?
I've got that problem today with only one project. I got no Intellisense warnings (i.e. naming styles, "Variable not referenced", etc..) for files in that project. Not in VS 2017 Pro nor in VS 2019 Community.
Check, if your Project->Build->"Warning level" is set to 0...
If you have Visual Studio 2017 installed side-by-side with Visual Studio 2019, close VS2019, open the project in VS2017, wait until it is fully loaded, then close VS2017, and reopen VS2019 - fixed!
There must be a bug in the VS2019 intellisense stuff, but VS2017 seems to fix it with no need to keep deleting the .vs directory.

Visual Studio acting like a reference is missing, but it is clearly there,

I am using Visual Studios 2015 Community.
I was given this code to work on and improve, and I cant get any thing from MetroFramework to behave properly. This is my first time using VS, but my research has been extensive, and I am very stuck. Any time I try to open up a design, I am met with many many errors that you can see in the gallery.
So naturally I follow up and check my references. The references in this project clearly show MetroFramework.
And furthermore, Metroframework.Controls clearly shows the components it says are missing. I would post the pictures, but SO only lets me put two links right now.
What am I missing here? This is the first time I've found a problem I cant solve looking at answered questions, and I hope you all can help. Thank you.
Edit: I have metroframework in both my references node and in the header of my code. VS does recommend I remove it from my header, as it says it is not being used, but it is being used, its just throwing the errors.
I also seem to get a setup error, and I am not sure that I had it before. Image in gallery.
All images are in the folowing gallery.
Imgur Link
Visual Studio sometimes acts up. Try any of the following:
Building the solution even with errors. This can get NuGet packages to refresh and that may be your problem.
Cleaning the solution and then building.
Restarting Visual Studio.
You have the wrong project installed. To fix your problem install Metro Modern UI - Metro Framework by Dennis Magno from NuGet (I assume that's the correct one because it has MetroGrid and MetroDateTime). If you use gui search for metromodernui in search box, or execute this
Install-Package MetroModernUI
For the record
Here is original project which you probably had installed (now so that I looked at last screenshot). Installed using:
Install-Package ModernUI
Here is another project you don't want to install (I thought you had this one originally) because it also doesn't have neither of those controls. Installed using:
Install-Package MetroFramework -Version 1.2.0.3
Here is the project you probably want to install to resolve errors.
Install-Package MetroModernUI
"Conveniently", they all use the same namespace MetroFramework, hence the confusion.
Right click on the References folder on your project.
Select Add Reference.
Select the .NET tab (or select the Browse button if it is not a .NET Framework assembly).
Double-click the assembly containing the namespace in the error message.
Press the OK button.
Try this command from your Package Manager Console
Update-Package

Visual Studio 2015 Community - All References Broken

I just installed VS2015 community on my home machines. On my laptop, it works great. However I've run into an odd issue on my desktop. No matter what the reference is, it displays as unable to find (yellow warning symbol). It doesn't matter what or where it is. I have tried adding framework references (As basic as System) and references to external API DLLs in the local directory like Protobuf. NuGet will download packages referenced by projects I am working on and they will also be marked invalid. The properties for these references does not include a path, even when I specify one.
I'm a develop at work so I understand how to handle these issues generally. I've tried deleting the references and re-adding them, creating new solutions from scratch, pretty much everything I can think of and I'm out of ideas.
This is a Win7 machine with .NET 4.6.1 installed. I have tried changing my projects to target framework of 2,4,4.5,4.6, and 4.6.1 (no difference). This is a C# project if it matters.
Can anyone recommend next steps? Thank you.
I found the issue. Last month I tried to upgrade to Win10 and it didn't work out for me so I rolled it back. It deleted all the ACL information on all my directories. Specifically, the access to Microsoft.CSharp.Targets was lost. I restored that and everything worked again. Of course, now I have to try and fix every file and directory on my computer so I have access again. Thanks, Win10!

Install Sheild LE -4340 Internal Build Error Visual Studio 2012

I have an issue with building an MSI with Install Shield LE in Visual Studio. The error says "-4340: Internal Build Error", but the link to Flexera is worthless. I tried the suggestion in another post to add the installer project to a fresh solution and then my .Net projects after, but that did not help. That suggestion can be found here.
I have not found a single repeatable cause of the issue, it does not seem to happen because of any one thing. I'm trying to build an installer for a Windows Service.
I got that error too. In order to fix it i rebuild my solution in Release configuration instead of Debug one.
All I did is restart Visual Studio. For some reason that worked for me.
My solution is slightly different:
Close and launch Visual Studio, open solution then
Rebuild with Release configuration AND
Unload/load InstallShield
Setup:
Visual Studio 2015, Windows 10, Visual C#
When I had this error, it was because I added an executable for extra dialogs to be run after the install. I told install shield to run the executable, but I didn't add it to the list of files to deploy.
When I added it to the files, the error went away.
It could be that when users switch to "debug" that they have a build of the executable in debug mode, but they never built it in release mode.
It would be nice if flexera produced a normal error message for my case at least. i.e. "You said to run XYZ, but XYZ is not found in the file list"
I had the same issue and solved it by deleting a previous build. It looks like Visual Studio wasn't able to delete the previous version.
I am quite late to this post... but I will post the solution in case others run into the problem. I worked with Flexera on this problem and they provided a fix for it. Download and install IS 2016 SP1 or newer and the problem is solved! Read all about it at
https://community.flexerasoftware.com/showthread.php?220123-ISDEV-error-4340-Internal-build-error&p=509912
I just had this again for the x-thousandth time. Normally the rebuild approach works, or failing that restarting VS, but this time I actually had to restart Windows to get it working again. Hope that helps someone, I was starting to really think it wasn't going to work again this time.
I had to unload/reload the InstallShield project in order for it to build.
I'm getting this error when I forget to start Visual Studio with Administrator privileges.

I need a workaround for Resharper when it says 'Failed to modify Documents'. Does anybody know why it does this and how to get around it?

I have noticed a few times over the past months that sometimes I will use the little yellow lightbulb icon and right click it and select an option for it to fix something for me and then it just highlights what it was going to fix and pops up a message that says "Failed to modify Documents".
Has anybody had this problem?
Do you know how to overcome it?
It is almost as if resharper thinks that the document is read-only or something, even though I can manually edit the document.
Disable the Visual Studio source control plug-in.
Tools -> Options -> Source Control
Change "Current source control plug-in" from "Microsoft Git Provider" to "None"
I hade the same issue with Visual Studio 2013.
The solution was to add the project to version control (git in my case).
Now, you don't need make commits if you don't want to but simply add the solution to version control and the issue should go away.
What did the trick for me was unloading and reloading the project in which the file that fails to be edited resides under. (Just right click on the project, and select "Unload Project" from the context menu.
July 2022 Update:
Ran into this with VS 2019 after upgrading Resharper to 2022.1. Before the upgrade, the issue would not occur.
Uninstalled the Resharper, rebooted the computer, reinstalled Resharper (version 2022.1, the same that I was upgrading to) and it resolved.
I started VS 2013 as administrator and opened project and it works now fine.
Allow me to chime in a bit late :
I solved this error by adding a .gitignore file and trying to commit my changes.
I cannot explain how this solved it, however, this happened to me on a completely new git repository. I've been using Git and VS for a few moth on another repository which has had a .gitignore file from the beguining and neither me nor anyone in my team had this problem before.
Changing "Microsoft Git Provider" worked but I wanted a permanent solution.
I was already using GIT and had all the ReSharper stuff in my .gitignore. I was using VS 2015. When I updated to the latest version of ReSharper 2017.1.3 this issue started happening.
I made a backup of my solution folder (called it "repo_backup"), then cloned my repo fresh from git. Everything worked as normal again. I copied my changes into the new re-cloned repo, deleted the repo_backup, then continued on my way.

Categories