What does those yellow exclamation marks mean in my solution explorer? - visual-studio-2017

I clone a git repo and create dotnet core web API on that repo. I'm using visual studio 2017 and when I did a code modification and saved the yellow exclamation mark will be displayed. How can I remove those?

Yellow triangle generally indicates a warning in VS. Since warnings are displayed on class (.cs) files, the meaning is that those files are a part of the solution, but are not present on your disk.
My best guess is that reclonning / syncing your local repo with master should resolve your issue.

Fixed by updating the VS 2017 to the latest by Visual Studio Installer.

Related

How do I fix Visual Studio 2022 Error E1696 for WinRT

When I generate a new WinRT project in Visual Studio 2022 I get Error E1696 cannot open source file "winrt/Windows.Foundation.h" yet when I look at the Include directories the files do exist at the correct location.
This is an artifact of the way C++/WinRT works. While the header files do exist in the Windows SDK, that's not where the project goes looking for them. Instead, they are generated on the fly into the source tree under the Generated Files directory.
So to fix the issue you will have to compile a newly created project at least once. This by itself isn't sufficient for IntelliSense to pick up the changes in environment. To help IntelliSense out you're going to have to right-click into the source editor, and select Rescan -> Rescan File.
Once that is done, all the IntelliSense errors go away, including E1696.
Historic background
It's easy to get confused why the C++/WinRT header files are part of the Windows SDK, yet the C++/WinRT VSIX templates aren't using them. A look back at C++/WinRT's history helps explain how we landed in this situation:
Initially, the code generator responsible for producing the language projection header files (modern.exe, later renamed to cppwinrt.exe) wasn't published. Instead, the header files were generated by Kenny Kerr, and published through his modern repo.
Publishing the language projection header files through a GitHub repository carried over into the cppwinrt repo owned by Microsoft, and continued to be the deployment channel for several versions of Windows.
This wasn't exactly convenient for developers, so with the release of the Windows SDK for Windows 10, version 1803 (10.0.17134.0) the headers got added to the SDK (including the code generator). This worked, but wasn't an ideal situation either, as the release cycle of C++/WinRT was now tied to that of the Windows SDK, roughly 6 months.
Decoupling the release cycles was crucial in allowing C++/WinRT to progress at its own pace, shipping frequent updates with improvements and bug fixes. This was enabled by deploying the code generator as part of a NuGet package that the C++/WinRT project templates reference. The MSBuild project drives generation of the language projection headers, and clients can freely decide, which version of the C++/WinRT library they wish to use, controlled through the NuGet package reference.
This is how things work today, but the language projection headers can no longer be yanked from the Windows SDK. They were published, with clients relying on finding them there, and expecting an SDK update to not break their builds. And this is why the Windows SDK contains header files you aren't meant to be using.
Often a Build --> Clean Solution followed by a Build --> Build Solution is enough to resolve the issue. Give Visual Studio a few seconds to complete any background work.
If that fails try reinstalling the Microsoft.Windows.CppWinRT NuGet package.
Go to Tools --> NuGet Package Manager --> Manage NuGet Packages For Solution...
In the NuGet Solution pane choose the Installed option.
Tick the CheckBox next to your Project name in the Window to the right.
Click the Uninstall button
And click Ok in the Change Preview dialog box.
The CPPWinRT package will now be removed.
Change to the Browse option in the NuGet Solution pane.
Type "cppwinrt" into the Search text box of the pane.
Select the Microsoft.Windows.CppWinRt package and install it.
Finally choose the Build --> Build Solution option.
After the Build has been completed give Visual Studio a few more seconds to complete any background work and the errors should be gone.

VS 2019 Ctrl + , is not behaving as VS 2017

I remember if I typed Ctrl + , in VS 2017 I could navigate to almost everything that had the typed characters, But in VS 2019 it searches only files.
Here is what 2019 looks like
But in 2017 it suggest the UserController file because it contains that method!
How can I have that feature back?
The new Visual Studio 2019 header search box, seen at the top of the screen, is designed to find anything in Visual Studio — including menu items, settings,tool windows and more. The tool uses fuzzy search that return the correct information even if you make a typo.
As stated in this blog post:
It turned out the issue was related to NuGet; what I needed to do was
delete the contents of the packages folder. For completeness's sake,
here's the steps to do what I did.
Close all instances of Visual Studio 2019. Delete the contents of the
packages folder at the root of your solution on your local machine.
Open Visual Studio 2019 again. This final solution worked for me. I
am including the potential solutions in this post in the hopes that
one of them (actual or potential) works for you, dear reader. Let me
know if you have any other solutions in the comments!
Deleting local nuget packages worked for me.

The setup for this installation of visual studio is not complete, really?

I have been using Vs 2017 for several months on dev machine. This fine morning says setup incomplete. Am I missing something?
In this case you need to go to Control Panel => Programs and Features and choose Visual Studio and update it.
VS 2017 (15.6.6) was fine for me on Friday 6/1/18 on Windows 10, but same issue as OP today after a restart.
As suggested by the dialog and Retired Ninja, I ran the Visual Studio Installer (to 15.7.3 after updating VS Installer) and that fixed it.
Note that the 15.7.3 update was a 7.73 GB download. Your download size may vary.
This has happened to me for the last 3 upgrades in Visual Studio Enterprise 2017 (now again on upgrade to 15.9.21).
The fastest fix (and I'm not sure why) is simple and doesn't bomb your settings or take for ever.
In the Visual Studio Installer, click on Modify.
Click "Modify" on the bottom right corner.
Yes it says "Total space required 0 KB".
Yes you didn't really change anything.
It will then act like it is downloading something. (not sure what)
It will then act like it is installing something. (again, not sure what)
Open Visual Studio 2017 and it works.
Hope this helps.
If you have an offline installation like me and can't simply re-run the Visual Studio Installer you can edit devenv.isolation.ini and change the last line to read SetupFinished=true. It will detect your trickery and complain, but at least it will launch again.
Edit: I ended up getting the Visual Studio Installer to fix the issue after choosing the "Download then Install" option. Maybe I was too impatient when I initially stopped the update? My above answer is useful when you need to get work done that isn't affected by the broken features, but you will likely encounter problems later on.
just had the same problem (without any reason with) vs 2019 prof, after googling and reading on that topic, just went to vsix, looked for some individual component to install/uninstall, randomly picked cloud explorer, uninstalled it and some dependent components and VS 2019 prof started normally
decided to leave this here. may be it helps somebody
Solved: I did following steps, run the visual studio and it works for me.
In my case visual studio was working fine , I just restarted the PC, this popup was keep coming when I try to open visual studio.(in my case I was using VS 2019)
Go to this path "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE"
Open devenv.isolation.ini, set SetupFinished=true and save.
Now open visual studio.
Cheers!
In my case did following steps:
Clear temp files (you can %temp% in run command and Shift+Delete files)
Restart your computer
Open visual studio it will work properly.
Update: Faced problem again after couple of days, This time I go to C:\Program Files (x86)\Microsoft Visual Studio\Installer.
Click on retry.
Select one more feature which I had already installed on my Visual Studio
Click on modified and after installation it worked again.
This happened to me after I canceled a plugin update.
I solved by going to this site that has the latest update of Visual Studio.
https://learn.microsoft.com/en-us/visualstudio/releasenotes/vs2017-relnotes
I downloaded and upgraded it.
After that, Visual Studio worked.
If your VS is already upgraded, there´s an option to "repair" on the installer.
For this problem, goto uninstall screen in control panel right-click visual studio and select option change, Installer page will open now, In that window without changing anything click modify. it will solve the problem. I'm using VS Professional 2017
I got the same error today morning. This is what I did:
I ran the visual studio installer then I clicked on Modify.
The installer was showing 0KB Required. I continued and then it downloaded and installed. (Not sure what).
After that installation, it was able to launch.
I hope it works for you as well.
I was using Vs 2019 professional 16.6 and happened to me this issue one morning. I modified the installation by adding Azure Development tools even though I was not using it. This fixed the issue.
I just updated to 15.9.24 and I got this yet again, as I have my resolution above, and Visual Studio 2019 seems to be a lot better with avoid this issue. The installer for 2019 you do have to change something and do the modification, 2017 you don't have to change anything.
I reported this issue through Developer Community:
Setup not complete since 15.9.21
I don't know why but sometimes its buggy
it's up to date but after launch visual studio this error prompted !
you have to click modify in vs installer and just modify it.
its not going to download anything.
after a moment launch vs and enjoy :)
For VS2022, WIN11:
Control Panel > Programs > Programs and Features > Microsoft Visual Studio Installer
Then, click on Change and resume the previous process.

'C/C++' category completely missing from project property dialog in VS 2017

As you can see from the picture above, there is no c/c++ option. I'm completed stumped as to where it has gone. I've seen screenshots from earlier versions of VS (specifically 2015 and 2010). This is from a fresh install a VS with some addon packages. If the specific version is needed I will provide it.
I had the same issue, and the reason was that I had removed all C++ files from the project. Adding them again resulted in the C++ section reappearing.
Thanks.

What can I do to fix that Visual Studio won't display per file properties?

I went to go turn on precompiled headers in a brand new project, so I went to go create the "/Create" setting for precompiled headers. But the property page is blank.
What happened, and how can I fix this?
This looks like a COM registration issue. It's hard to tell what caused it but the best bet for fixing is to repair the Visual Studio install. That should fix the issue.
Go to Control Panel and run "Add / Remove Programs"
Double click on "Visual Studio 2010 ..."
Click Next on the installer
Choose Repair / Reinstall
Complete the Wizard
I recently came across a similar issue (though I was using CMake to generate the project file), turns out it was this bug in VS2010. If you specify an absolute path for the source file in the project file, and it is on the same drive as the project file, then the property pages for that source file will not be visible. The suggested workaround is to create a new drive mapping for the drive where your source resides, and then to open the project from the mapped drive.
This happened to me this morning in my Visual Studio 2008, I read all the solutions in internet, I tried everything - reset setting, userdata, repair, uninstall and reinstall VS, but none solve my problem. I was almost going to reinstall the OS (Windows 10).
At last I found out after using a dir command in other project, AM/PM was replaced with strange words, it's because of my datetime format was changed (in my case, it was changed to Afar format). After reset to default, everything came back to normal.