Can I disable all compilation in Visual Studio? - visual-studio

This is a new one for me. I have been asked, for legal reasons, to setup a laptop with Visual Studio, but to disable the ability to compile projects/solutions. The purpose is to enable browsing of the source code, but not allow building or executing it.
Yes, I know this is really a stupid question and unfortunately I can't get into too many details. I've asked about using alternative text editors, but I have been told no. So until I can prove it isn't possible (or that I have at least made a reasonable effort), I have to try and make this work. Notepad++ would be an excellent alternative, but that has been rejected.
This would be in Visual Studio 2010 or later. Is there any way that I can do this?
UPDATE
After trying Marius Bancila's suggestion of removing the compilers and MSBuild, I was surprised to find out that VS continued to work fine (except for building, of course). I did not expect that functionality like F12 (Go To Definition) would continue to work.
This may mean that there still remains the ability to build something somewhere somehow. But as it stands with MSBuild permanently deleted and the Visual Studio Build command not working, it'll take some effort to get around it (if a way in fact does exist).

You didn't say what projects should not be possible to build (VC++, VC#, VB.NET, F#, etc.). Starting with VS2010 they are all built using MSBuild. So if you delete MSBuild they will not be able to build from inside Visual Studio. However, one can still be able to build from the command line, so the only possibility I see is that you delete all the compilers that come with Visual Studio.

It's a little bit crazy, but if you really have to ...
Try deleting some important binaries after installing Visual Studio e.g. linker (link.exe) and compiler (cl.exe).

Use a text editor instead. Notepad++ even comes with color syntax highlighting.
You cannot prevent people from compiling the code. Visual Studio Express is available to anyone, and the compiler can be executed from the command line, without Visual Studio's help.

Related

Is it possible to remove the Visual Studio IDE, but keep the build tools?

I am currently using VS2015, but I mean that rather loosely. I'm more into Atom or even Notepad++ as an IDE, and would rather do without the massive amount of disk space that the VS IDE appears to take up. I understand that some people appreciate it, but I personally find it unhelpful and often impeding.
However, keeping the build tools (compilation and linking chains), accessible at minimum via terminal, is very important for what I do. My problem is only with the overly bulky and unused IDE, which is in theory a separate product.
Is it possible for me to remove the VS2015 IDE, but keep the build tools intact? How would I go about doing this? Would doing so interfere with the operation of any VS-related tools (Android Studio, Unreal, Unity, etc.?)
Thanks for any help.
You remove VS2015 and download build tools from https://www.microsoft.com/en-us/download/details.aspx?id=48159

Do I need ReSharper for Visual Studio 2015/2017

I saw a lot of good comments about ReSharper. So I gave it a try and I really like it. I even suggested to my team to use it and to put some money in this tool. But they sad "We better put the money in updating Visual Studio because newer versions come with almost all ReSharper features" as we are using Visual Studio 2010.
Is ReSharper useless in Visual Studio 2015 or 2017?
This might not be an answer, just my own opinion.
VS2017 is doing very well without R#. however, some important functions are still not there in VS2017, e.g. renaming namespaces, and here R# role arises.
Some where else, I find R# make the things bad, for example, I don't like how the R# renames the properties, it gives and new popup window, where VS2017 renames it immediately.
So what I mean, sometimes R# might be useful, but if you are not using it, you are absolutely safe and productive.
I am still waiting for any video or article where it is described, what are the flagship killers functions in R# which VS2017 doesn't have (except renaming namespaces ;)).
UPDATE:
What I actually suggest is, install use the refactoring suggestions of R# because they are awesome, but keep the default key mapping of VS2017.**
UPEATE 2:
I have been working for 1 year without resharper, and I am very ok and do not miss any function, except renaming namespaces.
UPDATE 3:
I miss the function of extracting a method to an existing interface in Visual Studio 2017, which already exists in ReSharper.
ReSharper is not useless in newer versions of Visual Studio, but there are a lot of features and shortcuts that come baked right into VS. My opinion would be that if you are new to developing in VS, look into the features it already has and make the best use of them. After all, what good is a Porsche if you cant drive? Here are a couple of links you should check out.
https://msdn.microsoft.com/en-us/library/da5kh0wa.aspx
https://msdn.microsoft.com/en-us/library/ms366750(v=vs.90).aspx

Visual Studio text editor does not recognize F# source?

I have got the following problem with F# code recently: almost the complete code is underlines with curly red lines (indicating problems) and whenever I hover with the mouse cursor over any word the pop-up appears with the message "Unexpected token". IntelliSence doesn't work either.
Nonetheless if I start the project it is executed without any problem.
This happens both to already existing F# files and to newly created F# projects. I remember it was working just 2-3 months ago!
I tried to deactivate all possible extensions but it doesn't help.
Any ideas?
I get this too. Sometimes, simply exiting and going back into VS helps. When I tweeted the problem, Don answered with this:
"do you have "python tools for visual studio alpha" installed? if so, uninstall it or apply the hot fix"
This wasn't relevant to me (as I haven't been anywhere near python) but I'm posting here in case it helps you.
-- Edit: here's a link to the patch, thanks to Alexander Galkin: http://pytools.codeplex.com/workitem/599
I haven't seen this situation before but here's a guess at why it's happening and how you might cure it.
Visual studio works on a system for plugins. Even the stuff that is "native", like the C#/F#/VB.NET project systems, are just plugins that uses the visual studio shell. It looks like the F# plugin has been damaged in someway.
If this is Visual Studio 2010:
You might try opening the visual studio installer and trying a repair installation or deactivation and reactivating the F# project system
If this is Visual Studio 2008:
You might try uninstalling and reinstalling the F# plugin

Disabling Team Foundation Server extensions in VS2010

We're using Visual Studio 2010 (Premium edition if it matters), and pretty happy with it. However, We're never going to use the TFS features that's included in the IDE. (We're using Jira and Subversion, as it's not just Visual Studio that we work with, but also IntelliJ and a couple other IDE's.)
Is there any way to disable the TFS portions of the IDE? It's not a big deal or anything, just for the sake of "keeping things neat."
In Visual Studio 2010, go to Tools->Options In the list, select Source Control. Set your Current source control plug-in: to None
The main "TFS" parts of the IDE are in Team Explorer - Just don't install it.
Anything else you don't want/use, I'd advise you to simply ignore - VS has support for hundreds or even thousands of different things that you will probably never use, and you can't easily "clean" them all away.
In my experience the more you alter your installation of Visual Studio the more problems you will have with it. Every custom Option you set is another thing you have to repeatedly set every time you get a new PC or install a new VS. (Although it has improved a lot since import/export options became available and reliable). I used to spend about half a day setting up a visual studio to "work well", and now I just install it and use it. Ultimately I found that it was easier to just adjust my working practices (e.g. by relearning a few keyboard shortcuts etc) than to try to bend VS to my will.

Visual Studio 2005 - 'Updating IntelliSense' hang-up

I am having trouble with my Visual Studio 2005 IntelliSense for some time now.
It used to work fine, but for some reason the 'Updating IntelliSense...' does no longer seem to be able to complete for the solution I'm working on currenly- it simply gets stuck somewhere at about 3-bars of progress and blocks one of my precious CPUs for eternity.
Deleting the .ncb file of my solution and performing a full 'Clean' afterwards was no help.
The 'Update' simply gets stuck again.
The project I'm working on is a fairly large C++ solution with 50+ projects, quite a few template classes (even more lately) and in general quite complex. I have no idea which impact this might have on the IntelliSense.
Visual Studio 2005 Service Pack 1 and all hotfixes which rely on it are not
installed (we hade huge problems with this one, so we haven't migrated yet).
Any answer is very much appreciated on this one. Gives me the creeps..
Cheers,
\Bjoern
Rename "C:\Program Files\Microsoft Visual Studio 8\VC\vcpackages\feacp.dll" to something else (like "feacp.bak") to disable Intellisense.
I recommend getting Visual Assist X to make up for it (it also has a number of other useful features as well).
I have found that the best fix for Intellisense in VS2005 is to install SP1, and then this hotfix: 947315. It has the added benefit of fixing most of the multi-core build issues.
This hotfix also includes the ability to control Intellisense via Macros. More information here.
As for making SP1 more friendly for existing code, you might also check out this hotfix for template compilation: http://support.microsoft.com/kb/930198
Intellsense is problematic. Very problematic. When it works, it's great, but more often than not it will cause more problems than it's worth. It will hang up, it will parse through files while you are trying to compile code and will generally make VC 2005 sometimes run like a dog. As a previous poster suggested, disable intellisense (and chose a potential alternative -- I also support VAX).
Supposedly the hotfix and SP1 provided by MS will fix some intellisense problems, but not all. We have seen minimal help from these where I work. You are better off to disable it and rely on something else.
My feeling is that the slowness comes from the size of the projects. Yours seems like it might fall into that case.
Here is the only solution that works for me.

Resources