How can I share vsvimrc file across different versions of Visual Studio - vsvim

Recently I installed two versions of Visual Studio on the same machine with VSVim extensions. Because they differ in functionality they require different settings in the vsvimrc file and that is the problem.
Is it possible to share the same vsvimrc file between different versions of Visual Studio but select slightly different configuration based on the version?

Depending on what the exact parameters of your problem, you could do several things. For one, you could put the base of common functionality in your _vsvimrc and put the difference in a separate file for each version and then just source that file when you start Visual Studio. That requires a manual step of sourcing the file, but it could work.

Related

Can Visual Studio 2019 pack the DLLs it requires in just a small .exe file?

I made a Windows application with C++ WinAPI by using Visual Studio 2019.
After finishing, I built it, and executed with my computer. It works perfectly.
Then I sent to my friend who didn't have Visual Studio. It said that it needs "msvcp140d.dll" "ucrtbased.dll" "vcruntime140_1d.dll" "vcruntime140d.dll" to open it.
Then I found them in my computer, put them in the same dir with my application, and sent them to my friend. It worked fine, too.
But My question is "Is there any way to pack them with just Visual Studio 2019?" A small application with lots of DLLs is just a little bit weird.
First you're sending the wrong files. Files with d suffix like that are for debugging only and must not be distributed
You cannot redistribute all of the files that are included in Visual Studio; you are only permitted to redistribute the files that are specified in Redist.txt or the online "REDIST list." Debug versions of applications and the various Visual C++ debug DLLs are not redistributable. For more information, see Choosing a Deployment Method.
Determining Which DLLs to Redistribute
Final executable files must be compiled in release mode and use the release version of those DLLs. Don't give out debug binaries. They're seriously slow due to the logics added for debugging purposes
And you don't actually need to send the DLLs but you should tell the user to install the corresponding VC redistributable package. It's the runtime (CRT) for Visual Studio projects containing functions like printf, memcpy... for you. You don't need to find any other DLL if you don't use any DLLs in the project
It's also possible to link the runtime library statically by changing the option /MD to /MT. That way the final exe file will be self-contained (no need for additional runtime DLLs) but it'll also be larger and you lose the ability to use the newer library functions when the package is updated to fix bugs or performance issues. Again, you must compile in release mode regardless of whether you're linking statically or dynamically
See also
Compile to a stand-alone executable (.exe) in Visual Studio
Compile C in Visual Studio 2012 without MSVCRT runtime
How to make a Single Executable VS 2010

Xaml files inside a shared project appearing differently in VS2017

I have a solution, containing a shared project:
This contains a number of Xaml files:
However, when I open the exact same solution in VS2017, I get this:
The problem seems to cause any XAML files to be invisible within the project. The solution compiles and runs fine - is there something that needs to be installed or switched for VS2017 to treat shared projects correctly?
First Solution
(1) Exclude
(2) Show All Files
(3) Include all the files
Found some similar post may be work for you (seems to be some sdk needs to be installed)
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/26291339-e8fd-4596-980a-7befa63a1f7c/missing-folders-files-add-item-options-in-shared-project?forum=visualstudiogeneral
Thanks
Using the Visual Studio 2017 Installer, add support for Universal Windows Platform Development. That will connect each xaml to its respective xaml.cs in a shared project.
One would think that .Net Desktop Development would be enough to do the link, but it is not.

Set app.config parameters from a Visual Studio 2008 Setup project

I have a WinForms application that uses a config file to specify where it's external files will be created.
Is it possible to use the installer to question the user where the files should be located and add this value to the config file?
It would also be good if I could confirm that the user has entered a valid path but that's just a "Nice-to-have" at the moment.
Following the helpful hints from Pete, I was able to find this blog that does exactly what I need.
There are a few Gotchas to watch out for and I've covered them here but these may be Visual Studio 2008 specific issues.

Silverlight 3 and Silverlight 4 Coexistance

I work on several projects with different development environments. I would like to maintain a Visual Studio 2008/Silverlight 3 environment on the same development workstation as a Visual Studio 2010/Silverlight 4 environment. If possible, I would like to be able to work on both at the same time, without using virtual machines.
Has anyone done that successfully? Is there anything special I need to do to help them coexist? I previously installed Silverlight 4, and it prevented me from working in the Visual Studio 2008/Silverlight 3 environment. But it is possible that I did something wrong in the setup.
I don't think the two can coexist next to each other. You will either need to make a VM with the specified configuration, or specify the SL version in Visual Studio.
Can you ellaborate why you can't run you SL3 project in VS 2008?
Could you use VS 2010 for your SL3 work? VS 2010 includes multi-targeting capabilities, and is compatible with Silverlight 3 out of the box. SL4 support is added with the SL4 development tools, so at that point it supports both.
You can pick which Silverlight version you want each project to be either at project creation time (for new projects), or in the project Properties (for existing projects).

VS 2008 WinForms with SourceSafe

We are using Visual Studio 2008 to develop a winforms application stored in Visual Source Safe 2005.
If one of our team members changes a *.Designer.cs file without changing the form's source file the change doesn't appear during a "Get" operation. However, if in Visual Studio you run a compare on the *.Designer.cs file the differences are displayed in the difference viewer.
FYI: We are using the default Microsoft Visual SourceSafe plug in for Visual Studio.
Any ideas why the "Get" operation will not detect changes in the *.Designer.cs files and suggest we pull down the latest version?
Thanks for your help!
Designer files are not intended for manual manipulation. One of the chief incentives for adding partial classes to the popular .Net languages was to segregate the designer-generated code from manual user code, in fact. Manual manipulation of repeatedly-generated code (in pretty much any environment, not just visual studio) is asking for headaches.
What changes are you making to the designer file, and why is it not possible to make those changes to the non-designer source file?
Edit:
Is the project in the IDE properly bound and connected to the source control database (via File->Source Control->Change Source Control)? It should automatically be checking out the designer files when changes are made in the designer view.
I would try doing a Get manually through VSS Explorer (i.e. not through Visual Studio) and see if it works. If not, check to see if the file is pinned to a previous version.
Woe unto you for having to use SourceSafe. At my last job, we used SourceSafe and had a myriad of problems with it. We switched over to Surround SCM and were really happy with it. I'd never heard of it before that job.
To answer your question, any time I ran into a problem like this with SS, I'd do a "forced get": in the options dialog when you get latest, tell SourceSafe to get the latest version from the server regardless of whether it thinks the file is up to date.
Edit: I think the issue is the VS200X plugin for VSS. If you have the VSS standalone application you should be able to do a forced get from there. I now remember having to do this so often that I stopped using the VS200X plugin.

Resources