Stop Visual Studio 2010 from auto removing files from solution - visual-studio-2010

I have a big solution (50+ projects, mixed C++, C++/CLI, C#) plus a number of support files (many are python files) in solution folders. From time to time, for no apparent reasons, Visual Studio removes references to one or more python file from the solution. It's easy to revert via the version control system, but gets annoying over time if you have to do this several times a week.
Anyone knows how to prevent Visual Studio from doing this?

Related

Are there any functional differences between a VS2012 and VS2013 Solution?

The title of this question probably seems a bit convoluted so let me explain it in more detail.
I work for a company that has recently requested that all their pre-VS2013 Projects and Solutions be upgraded to VS2013. During my initial upgrade tests I noted that some of the solutions prompted for an Upgrade to be functionally sound under VS2013.
These Solutions/Projects typically launched the Migration Wizard and presented the message that non-functional changes to the Project were required to run under VS2013 and as long as there were no errors present afterward, the Projects compiled and ran without any issue.
While there were other VS2012 Solutions/Projects that displayed no dialogs whatsoever and simply ran under VS2013 without issue.
My initial presumption was since the latter mentioned Projects weren't identified by VS2013 as having any components that required alteration for the upgrade; that they were simply upgraded behind the scenes, compiled without error and simply ran.
But after a short conversation with the Company Supervisor and a peek at the Solution files, it appears that those Solutions are still configured for VS2012 and not VS2013.
Below are a few lines of code from each Solution File:
VS2013 Solution File
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30110.0
VS2012 Solution File
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
As you can see the VS2012 Solution File indicates # Visual Studio 2012 while the VS2013 Solution File shows # Visual Studio 2013 with an additional line appended to the file stating VisualStudioVersion = 12.0.30110.0
So the real question/concerns here regarding this migration effort are:
Is there any way to FORCE a VS2012 project to VS2013 as opposed to simply opening the project/solution under VS2013
Are there any potential caveats that should be taken into consideration when at some point VS2012 becomes outdated/deprecated by Microsoft? E.g. If tomorrow VS2012 were to become obsolete would there be potential areas of concern for these types of Projects running in a Production Environment?
The targeted goal is to have all our Projects and Solutions migrated to and running under VS2013 for continuity of the environment and simply do away with any Pre-VS2013 items.
Thanks
The ability to open projects created in earlier VS versions without converting them was first added to VS2012. By popular demand, moving to a new VS version could be pretty painful if not all members of a team migrated at the same time.
There is no point about fretting about this, VS2013 just doesn't have any trouble opening and saving projects like this. Nor does it have a way to force the conversion. In the olden days it could be done by running devenv.exe with the /upgrade option. Not sure if that still works, you'd have to try. I've seen SO users recommending editing the project file, I do not think that's a good idea.
It will automatically prompt you for an upgrade when you add any feature that wasn't supported in a previous release. Hard to come up with examples of that for VS2013, beyond Windows Phone 8.0 projects, VS2013 is a relatively minor increment from VS2012.

Accessing the VS2010 version of the Microsoft.VisualStudio.VCProjectEngine assembly in VS2012

My company recently created a Visual Studio 2010 add-in that allows us to create LINT files from any given visual studio project from 2010, 2008 and 2005. We now want to get this same add-in to work in Visual Studio 2012, because we know that many of our customers will be using this in the near future, if not already.
We thought that it should be a simple "switch-in", and that the same code should work for both, but lo and behold, the VS10 add-in didn't work in VS12. So I copied the code (absolutely no changes) into a VS12 add-in, and surprise surpise, it did work. Naturally, we do not want to have two versions of the same code; bad for readability, bad for maintainability, so we still want to find a way to get the VS10 add-in to work in VS12.
I think the problem lies in the Microsoft.VisualStudio.VCProjectEngine assembly. This is interpreted differently in VS12 to how it was in VS10, meaning that when VS12 reads the add-in, it doesn't do what we want it to do.
I have done some research into this problem, and many people suggest creating a work around by using reflection, but I am reasonably new to this concept and don't feel confident enough to try it and risk seriously ruining the add-in.
So my question is this: Is there a nice and easy way of being able to read the VS10 version of the Microsoft.VisualStudio.VCProjectEngine into VS12?
Much appreciated :)
I later found an answer to this question and realised it hadn't been confirmed on the thread.
The answer indeed lies in the VCProjectEngine assembly. For some reason, this is a different module in Visual Studio 2010 to the module (with the same name) in Visual Studio 2012, which means any code requiring the module when written in VS2012 will not work in VS2010 and visa-versa.
It's a pain, because it means we have two lots of exactly the same code, but that is the way it has to be.

Perform a search in Visual Studio only on files that have been recently modified

I was wondering if there is a way for Visual Studio's built-in search to only look in files that have been modified in a certain time frame.
I think it would be very convenient, especially when working with a large codebase where you don't really need to search for certain things in ancient code (or even code older than, say a month, even a week).
No. Not in Visual Studio 2010. Also not in Visual Studio 2012 (which includes the Quick Find feature from the Productivity Power Tools extension.)
You'll probably need to make do with Windows Search or a third party tool like Agent Ransack.

Prevent comment conflicts in strings.resx (Visual Studio 2010)

Suppose an international team of developers, using various flavors of Visual Studio 2010 (understand: in different languages), and working on a versioned project.
Every time one of them makes a modification on the Strings.resx, Visual Studio happily generates the file with localized comments. Every time two or more of them do so at the same time, some pretty annoying conflicts appear, which not only are time consuming, but also are completely pointless. Developers get angry and all.
How can this be prevented? Is there a way to tell Visual Studio not to regenerate those comments, or to drop them altogether?
I don't know how to prevent Visual Studio generating localized comments in the .Designer.cs file which backs every .resx file. And I'd certainly like to know.
Until someone finds out, you'll have to setup Visual Studio in English (or whatever language is shared by most of your team) everytime you want to change the resources.
You can do that in Tools > Options > Environment > International Settings (you need to restart VS).
When programming, I don't mind setting up everything in english, rather than in my native tongue, because exceptions and error messages are almost always easier to google when they are in english.
HTH

Have anyone succeeded in ThinApp'ing Visual Studio?

The purpose is to have a USB flash to have a developer seat everywhere. The idea is to use application virtualization to package Visual Studio.
However, AFAIK, there are big problems.
Have anyone succeeded in packaging Visual Studio (2010, 2008) using ThinApp, App-V, ...
P.S. I'm aware of google.
This is not possible. There's nothing "thin" about Visual Studio, it has an enormous mass of files in many different directories and a very large number of critical registry entries. Including many COM components. That it works as well as it does is one of the modern day's Seven World Wonders of software engineering.
Your license allows you to install VS on more than one machine as long as only one user uses it. I recommend you take advantage of it.
It is possible to install Visual Studio 2013 in App-V, it takes a lot of time to load and takes about 3Gb in .dat file. Compiling and debugging in C++ tested and works but really slow. No errors or popups for missing components so far. After experimenting I made a final virtualization script that works. p.m me.
It is possible to make Visual Studio portable version using VMWare Thinapp. No installation will be needed for Visual Studio, .net Framework or any other dependency. It works with Visual Studio Express edition 2008 as I have experimented but for version 2010, it say "Invalid Licence Data. Reinstall...". If you find a way, please tell me!

Resources