How to hide items in the solution explorer in Visual Studio 2017 - visual-studio-2017

I've got an Entity Framework Core 2.1 project in which for some reason VS has decided to spam my solution items with dlls, props and target files as you can see below.
Is there any way to hide these files? Strangely enough they're not even in that file location.

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.

How to create an Empty web project (no C#, no MVC, no .Net References) in Visual Studio 2017

I need a web project that can be deployed to a web server (in this case IIS), however I do not want anything other than static HTML, TEXT and JSON files in the project. I don't want to do a build. I don't want a Properties folder. I don't want a BIN folder. I don't want an OBJ folder. I don't want any NUGET packages. Most of all, I don't want any DLL or .Net references.
I have tried the solution proposed by Microsoft here: https://social.msdn.microsoft.com/Forums/vstudio/en-US/7589fbbf-732d-4c99-b9e9-7fe247f18f5a/how-to-create-static-web-site?forum=visualstudiogeneral
This is not even close to a static site.
And, here: https://marketplace.visualstudio.com/items?itemName=MadsKristensen.ASPNETCoreTemplatePack20173 I found an updated template which says it will create a static site without C#. It does not. Roslyn is included as is .Net CORE. Also at least 1 C# file is still generated and is still needed.
I tried going back to Visual Studio 2015 to see if there was an option there, which I could then just reopen in VS 2017, but I found none there either.
Anyone know how to create a truly empty web project for VS 2017, which can be published, but has only static content?
The solution suggested, that of using a Blank solution, really does not offer a solution at all. The blank solution still has no projects, and adding a project pulls in all the ASP.NET and/or MVC pieces I am trying to ignore.
I did find that I can use 'File->Open Website', browse to a folder with the static content and open the web site in Visual Studio. Once I have altered the content as desired, I have to use 'Website->Copy Web Site' to copy the files to the IIS server. A packaged deployment is not available. The 'Copy Web Site' indicate which files have changed so it is pretty easy to figure out what files need to be updated. To copy one or more files, use the connection buttons at the top of the dialog, then select files as necessary on the left and use the arrows in the middle of the dialog to move/copy files to the IIS server on the right.
Image of Copy Dialog
The result is a project I can open and edit in Visual Studio, which can be easily deployed/updated from inside Visual Studio. I tried the solution in VS 2015 and VS 2017.

Visual C++ 2010 and Qt (moc etc)

I'm using Visual Studio 2010 Ultimate and I know there's the Qt VS Add-In. However I've chosen to not use it as according to an announcement by Nokia they will not release any further versions of it. So now would be a good time to change work practises.
I'm looking for a way to automatically call moc.exe on class files that need to be moc'ed, and for the moc'ed files to be compiled as well. I'll probably do this for the resource/ui compilers as well.
Qt's plugin simply creates Visual Studio build rules files - these are 'normal' xml files and anything can use them.
There were a series of add-in VS macros before the visual studio plugin became available.
Add-in is mainly useful to import .pro files to VS projects, after that you do not really need the add-in (unless for making it easier to change between different Qt versions).
Just make sure to define QTDIR in a project property page (.vsprops) as UserMacro and have it exported to the environment, then you can use it for $(QTDIR)\bin\moc.exe against Qt header files in the custom build step, similarly for UIs.
<UserMacro
Name="QTDIR"
Value="C:\Qt\4.6.3"
PerformEnvironmentSet="true"
/>

VS 2010 intellisense not working for upconverted project

We have a very big C++ solution with several projects for which intellisense works perfectly in Visual Studio 2008, but not at all in Visual Studio 2010 (not even for structs defined in the same file where they are used). I've verified that intellisense does work in VS 2010 for other projects on my machine. I've tried importing one of the problematic projects from a brand-new solution with no success. Re-building the project files from scratch seems promising, but it would require days of work to follow that path, with no guarantee of success at the end. Any alternative suggestions are welcome. The actual error message I get is:
"Intellisense: 'No additional information available'(See 'Troubleshooting IntelliSense in C++ Projects' for further help.)
I've tried that, but there's basically only one suggestion on the MSDN webpage, to make sure "stdafx.h" on the include path, but we're not using precompiled headers and don't include it from anywhere, so I'm pretty sure that's not the problem.
Have you deleted all of the generated database (.ncb and .sdf) files? Corrupted database files is the most likely cause of Visual Studio failing to display IntelliSense.
Intellisense was not included as a component of Visual Studio 2010 for C++/CLI. Unfortunately, it seems they are not going to support it soon either. This is an incredible detriment, as i find myself having to open VS2005 on occasion to simply find an object member.
Here is Microsoft's release on the subject:
http://blogs.msdn.com/b/vcblog/archive/2011/03/03/10136696.aspx

Why does the Visual Studio conversion wizard 2010 create a massive SDF database file?

I've opened a 2009 C++ sln in 2010 and run the Visual Studio 2010 conversion wizard. It seems to have done the conversion fine, but there's a 60 MB .sdf file created with the same name as my .sln file (apart from extension)! There was no sdf file before. I'm pretty sure when I've used the wizard on C# projects this file hasn't been created.
It looks like it's created to help the conversion wizard, but I don't see why it's left when the wizard has finished. The tables in the database are:
assoc_spans
assoc_text
base_class_parents
code_item_kinds
code_items
config_files
configs
file_map
file_signatures
files
parsers
projects
properties
refs
symbols
I assume I can just delete this file?
It is the code browser database, it replaces the NCB file in earlier releases. In VC++ 2010 the intellisense and browsing features have been completely redesigned to provide greater functionality and accuracy.
It's the browsing database. You may delete it; it will be recreated.