Hiding platform toolset in solution explorer for C++ projects - visual-studio-2013

I am using Visual Studio 2013 on a solution where all c++ projects have platform toolset of Visual Studio 2012 - Windows XP. I cannot upgrade them for compatibility reasons with the rest of the developers. However, the string "(Visual Studio 2012 - Windows XP)" is added to all project names in solution explorer and generates a lot of clutter in my eyes.
Is there any way to hide it? I know that all projects are of this platform. I don't need VS to tell me :)

Yes, there is a way to do this. It involves editing some files that maybe shouldn't be edited, and it's likely unsupported and may mess up your installation, but as long as you back up the modified files you should be able to revert if anything bad happens. That's the warning.
That said, I've tried this and it worked for me without any issues (that I'm aware of) and I do believe the procedure is safe as it mainly relates to cosmetics (although it might break future upgrades).
If you installed VS2013 in the default location you should have a file called Microsoft.Cpp.Default.props in the directory C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120
This file contains, among other things, information on how (some of the) the installed platform toolsets are displayed in the project property pages and what string (if any) is added to the project name in the solution explorer.
The rows with properties called something like _PlatformToolsetShortNameFor_v120_xp control the string that is shown in the solution explorer (in this case the 2013 - xp toolset), and the rows with properties called something like _PlatformToolsetFriendlyNameFor_v120_xp control what's shown in the project property page.
As the Visual Studio 2013 - Windows XP (v120_xp) toolset by default didn't show anything extra in the solution explorer I added a row for:
<_PlatformToolsetShortNameFor_v120_xp Condition="'$(_PlatformToolsetShortNameFor_v120_xp)' == ''">LOLZ I Changed This - Visual Studio 2013 - Windows XP (v120_xp)</_PlatformToolsetShortNameFor_v120_xp>
and also modified the _PlatformToolsetFriendlyNameFor_v120_xp like this:
<_PlatformToolsetFriendlyNameFor_v120_xp Condition="'$(_PlatformToolsetFriendlyNameFor_v120_xp)' == ''">OH MY - Visual Studio 2013 - Windows XP (v120_xp)</_PlatformToolsetFriendlyNameFor_v120_xp>
And the results were this:
and this:
To hide the string that gets appended to the project name in the solution explorer simply remove or comment out the corresponding PlatformToolsetShortNameFor. Since it's an xml-file you comment using <!-- and -->

Related

Visual Studio Installer Projects product name diacritics

I am using Microsoft Visual Studio Installer projects extension to create an installer for my app.
Works OK, but the problem is that the product name contains "ลก" character in it and the font used in the msi installer obviously doesn't support that character:
Anything I can do about that?
Some background info:
I initially developed the app in VS 2015 which had a free Install Shield Limited edition. Or maybe it was even VS2013, don't really remember... However, now I need to make some changes in the app. There was no problem with such a name in Install Shield back then. So I tried to open the project in VS 2022, but obviously Install shield's no longer an option. This is where VS Installer project comes in, but there's the problem with the diacritics...
This looks like an encoding issue. Try searching in the VS project properties for an option to set the encoding to Unicode. I don't use the VS projects that much, so I don't know if you have the option to change it not, but it might be there.
Also, if you are looking for a better free MSI packaging tool, try the Advanced Installer extension for Visual Studio. There is one for each version of VS.
Disclaimer. I work on the team building Advanced Installer.

Visual Studio 2015 Find in Files not remembering file types or locations

I rely on the Find in Files dialog in Visual Studio a great deal. (Sometimes Intellisense/Resharper just don't cut it.) Since upgrading to 2015, I've noticed that the dialog doesn't remember my custom "Look in" paths or "Look at these file types" lists between sessions.
If I close my solution and VS instance, then reopen, I have to enter my custom path and file types again. Huge waste of time. Has anyone run else run into this? Any workaround? 2013 used to remember this stuff.
Microsoft Visual Studio Professional 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00081
Installed Version: Professional
I've never had any problems with it not remembering my settings, but I imagine that you could run a custom registry modifier to add the appropriate keys, you could make sure your settings are always pristine. The custom search information is stored in HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0\Find.
The file types are stored in a string key called Filter with whatever you would normally input into the custom file type category in the VS search window. For example searching for only .cs and .txt files you would put *.cs;*.txt.
The folders are located in a string key called Query with values such as C:\Folder1;C:\Folder2. However, it's behavior seems a little weird. You have change the value of Query and a Query+integer value (i.e. Query0) to the same value to have it appear in Visual Studio.
If you just run a script to modify the above values to the files types/folder locations you want, that should work.
I ran into this today. After much searching I found a post on the visual studio forums somehow. This pointed me towards ReSharper. This directed me towards a workaround.
Start visual studio in safe mode with the command line argument /SafeMode
Create the folder sets you want for searching
Restart visual studio not in safemode
Once I had restarted all my created custom searches remained, and the registry values were created. This might not work in the specific case, but this worked for me.
You can set these values programmatically inside Visual Studio for the Find and Replace dialog (for example with Visual Commander):
DTE.Find.FilesOfType = "*.txt";
DTE.Find.SearchPath = #"c:\temp";
If you have an earlier version of VS, export the environment settings, copy the NumberOfScopes and NamedScopes* settings from the Environment_UnifiedFind section to the same section in your VS2015 settings file and then re-import settings.
Once I did this, it allowed VS2015 to start saving folder specifications for future settings exports.
Or you could try replacing this in your VS2015 export:
<PropertyValue name="NumberOfScopes">0</PropertyValue>
With this:
<PropertyValue name="NumberOfScopes">1</PropertyValue>
<PropertyValue name="NamedScopes>0">FOLDER_SPEC_NAME>SEMICOLON_SEPARATED_LIST_OF_FOLDERS>{4A812F3C-7B1A-4987-9769-461F20EB25CB}</PropertyValue>
(Don't forget to re-import after you make the change)

Visual Studio 2010 with phone tools - Any advanced/configurable settings?

In Visual Studio 2008, there was the device manager for setting up additional templates and options for the emulator. None of these options are available with Visual Studio 2010 which I understand as the features were removed.
When the Phone Tools are installed, the device target box comes back but there are no options at all.
Basically, I was just wondering where this list gets its options from and if there is any way at all to configure it?
The closest I got to was find the %LocalAppData%\microsoft\phone tools folder, but not sure this is correct as it appears to be more related to the emulator itself (e.g. if deleted, it gets recreated when you run.).
(Link to something a post that helped me years ago)
It took me a while, but it looks like I have found it.
I was on to the correct path with %LocalAppData%\microsoft\phone tools. All the targets are in the conman_ds_platform.xslt file.
I have no idea why they no longer provide an interface for customising - but it looks to me that despite MS taking the feature out of Visual Studio, it is still possible to customise this and add your own devices just fine.
... Next, depending on time, I will try to convert the Windows Mobile/CE project templates to VS 2010 and see if it is possible to do full development on Visual Studio 2010.

WindowsSdkDir is not set correctly in Visual Studio 2010

So i've been searching this for quite a while now, to no avail! Has anyone figured out how to change the $(WindowsSdkDir) macro in visual studio 2010, to make it point to whatever version of the windows sdk they would like?
Hopefully this can be a reference to all those who will search for this after me. :)
To tailor an individual Visual Studio 2010 project to use a specific version of the Windows SDK go to Project | Properties, select the General tab (under Configuration properties) and then set the "Platform Toolset" drop down to point at the SDK you want to use. The WindowsSdkDir macro will change appropriately.
Remember to make this change for all Configurations and all Platforms.
I ran into a similar problem when trying to setup a fresh system using VS2010 and the Windows 7 / .NET 4 SDK (v7.1). The solution turns out to be similar to the one for Visual Studio 2008, but in a different registry location. You want to apply the same edits, but the location is
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows
for 32b Windows and
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows
for 64b Windows.
Also, depending on your installation (for both 32b and 64b versions of Windows), you may also need to change the corresponding key in the HKEY_CURRENT_USER tree.
You want to edit the following keys to point to the SDK version you want to use:
CurrentInstallFolder
CurrentVersion
ProductVersion
After making the changes, I restarted Visual Studio and it used the appropriate SDK version. I don't know if this is a bug in the SDK installer (one was logged for the WindowsSDK v6.1, but none for v7.1) or if it is by design, but everything seems to compile correctly after my changes.
Tested for 32b and 64b Windows 7.
[HKEY_CURRENT_USER\Software\Microsoft\Microsoft SDKs\Windows]
"CurrentInstallFolder"="C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\"
Note that, in contrast to the other registry locations, here actually no sub-key for 7.1 might exist. Don't be confused Visual Studio 2008 is searching here anyways.

Source Control icons have disappeared in Visual Studio 2010

Today I installed Visual Studio 2010 Ultimate - RTM.
One item that I noticed that is different is that files listed in the Solution Explorer window not longer display the source control icons beside each file (the lock, unlocked, plus sign for new files, etc.).
Is there a setting that I am overlooking to display these icons?
I have setup Visual Studio 2010 to use my source control client correctly (SourceGear Vault), and it does appear to be working OK -- I'm just used to seeing the little icons by each file.
Anyone out there experiencing this problem? Is there something I can do to get the icons back?
Update: SourceGear technical support confirms that this is a known bug, workitem 15021. It doesn't have anything to do with the conversion; it's just that in VS 2010 web projects, only the solution file has the lock icon or "glyph." This will be fixed a maintenance release, but I'm not sure how soon it will be.
I'm guessing that you need to reinstall Vault so it can apply settings to the new IDE. I have to do the same for Ankh (subversion) to show icons in VS2010.

Resources