I'm certainly not an expert regarding exactly what fits into the scope of an on-topic or off-topic question, and I'm sure there's a chance I'm entirely off-base in thinking that it doesn't fit.

Here is the question: Prevent Visual Studio from compiling - at all

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 to enable browsing of the source code, but not building or executing it. This would be in Visual Studio 2010 or later. Any ideas?


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.


I was surprised to find out the VS continued to work fine (except for building of course). I expected when I did this that functionality like F12 (goto definition) continued to work. This may mean that there still remains the ability to build something somewhere somehow. But as it stands w/ MSBuild permanently deleted and the VS Build command not working it'll take some effort to get around it if there exists a way.

I understand that posting a question about Visual Studio falls under the third bullet point under What topics can I ask about here? in the help center:

  • software tools commonly used by programmers

But that being said, I think it has a conflict with the fourth bullet point (emphasis mine):

  • practical, answerable problems that are unique to the programming profession

The TL;DR on the question is that the OP wants to know if Visual Studio can be nerfed to the point where it's unable to build a solution/project, for legal reasons relating to a lawsuit. Here's my comment on why this sort of thing might happen in the first place:

This sort of thing tends to happen when a company is asked to turn over source code in a suit involving such things as copyright and/or patent infringement. The prosecuting party (or a third party, sometimes provided by the court) must be provided means to review the source code, without the ability to modify it, build and run it, or copy it to another storage device or computer.

Aside from the obvious answer of "you shouldn't do that, why are you trying to do that" from a purely-Visual Studio point of view—seeing as Visual Studio is an IDE whose primary purpose is to equally facilitate code editing and building—the scenario the OP puts forth seems to be extremely localized. It seems that his superiors gave him an executive command to require Visual Studio but disable its build capabilities, all without knowing just how unsupported of a scenario that is.

My first thought was that this might belong on Programmers.SE, but I'm not really sure it fits the requirements there either, per its What topics can I ask about here? help center page:

  • algorithm and data structure concepts
  • design patterns
  • developer testing
  • development methodologies
  • freelancing and business concerns
  • quality assurance
  • software architecture
  • software engineering
  • software licensing

I feel like this borders on being a software licensing issue... except it's still a technical question demanding a technical answer, so that doesn't seem right either.

Am I entirely off my rocker for thinking this question is out of place? I don't really want to cast a close vote unless it's warranted.

  • I think his question goes a very roundabout way of simply asking is there a way to set up Visual Studio where you disable compilation of projects and solutions. Personally, I feel this is more of a question suited for Superuser. – aug Aug 15 '13 at 22:25
  • @aug No, Visual Studio configuration questions are on topic for Stack Overflow. – Cody Gray Aug 15 '13 at 22:29
  • @CodyGray my mistake which is why I made it a comment haha. thanks for letting me know. – aug Aug 15 '13 at 23:28

Your spidey sense is working correctly. This question certainly smells bad. The problem it attempts to solve does seem extremely localized, if not downright nonsensical. Any "solution" is going to be pathological, and require breaking things.

Then again, you were also right to pause, coming here to ask for input, rather than picking a random reason and voting to close.

This question is not off-topic here. A short list of reasons:

  • It is about Visual Studio, which is "a software tool commonly used by programmers".
  • It is a "practical" problem, even despite being a pathological and uncommon one.
  • It can be definitively answered, which is the minimum standards test for a Stack Overflow question. It is not relevant whether that answer is "no, you cannot do that", or the currently accepted answer (delete all the compilers that it comes with).

He is not asking about the legal/licensing problems; those are stated as a given. It is not a discussion question, it asks a very specific question about how to solve a practical problem in light of those requirements. Strange and absurd as they may be, that is not sufficient to justify closing the question.

As far as "too localized" goes… Obviously we don't have that available as a close reason anymore. You could choose "off-topic" and enter a custom reason that is basically equivalent, but you shouldn't.

Part of the reason we've removed the "too localized" reason was because it was being misapplied to questions like this one. "Too localized" was meant to apply to things like typo questions (e.g. you forgot a semicolon or you spelled the class name wrong), and questions that are only valid for an extremely limited period of time (e.g. pre-release versions of software/tools that are no longer available).

This question is very localized, but we cannot make the call whether it will or won't be helpful to anyone else in the future. As you yourself point out in that comment, there is even a concievable use case for this, however strange or confused it might be.

This question fits our other guidelines, so closing it as "too localized" doesn't seem to serve a real purpose. It just satisfies our impulse to convey our (A) dissatisfaction with the proposed solution for the problem, and (B) our hope expectation that no one else will ever want to do this in the future. But those feelings are better expressed with a downvote (and/or an answer), rather than closure.

| improve this answer | |

I think it's reasonable to close this question as unclear what you're asking.

Every time someone tries to probe for details or figure out if it is really an XY problem, they come up against three interrelated problems, which are not the fault of the OP, but which suggest it may not be a good fit for Stack Overflow (or any Stack Exchange site):

  • It has to be Visual Studio. Nobody can know precisely why.
  • A court order is presumably involved. Nobody can know what the court order says, exactly.
  • The larger context is a court case. Nobody can know anything about this larger context.

Looked at that way, it's sort of astounding the question as remained open so long.

Alternatively, primarily opinion-based may apply, in that it's anybody's guess what does or does not meet the secret underlying requirements, as well as whether or not any future similar situation is actually as similar as it seems. Every answer is someone's opinion about what might meet unstated needs.

In addition, it may be reasonable to close it as off-topic as not being about programming. We support programming tools here, but when you deliberately break Visual Studio so it cannot compile or debug anything, is it really a programming tool anymore? Its purpose then is not software development, but facilitating expert testimony in a case that involves programming, but we can't know how it involves it or what the expert's needs really are.

This is not as extreme as a situation where someone needs to break Visual Studio so it can only be used to write limericks. But there is a remarkable thematic similarity.

| improve this answer | |
  • I don't agree with this; whether or not the question falls into the on-topic category, it does ask a very clear-cut question: how can one prevent Visual Studio from building. Honestly, at that point, it doesn't matter why it has to be Visual Studio or that it involves a court case. – Adam Maras Aug 16 '13 at 5:18
  • While most of the commenters agree that Visual Studio is the Y of the presumed XY problem, it doesn't matter if the management made an executive decision that Visual Studio must be used. We can tell the OP that Visual Studio isn't the right answer and he should escalate that core issue to management until we're blue in the face, but that extends beyond the scope of the technical question. – Adam Maras Aug 16 '13 at 5:20
  • @AdamMaras The .NET Framework SDK is separate from Visual Studio, is installed when VS is installed, and contains the necessary tools for building software. The .NET Framework itself (even without any SDK or development tools installed) contains tools that perform some build-related functions, which is why the currently accepted answer is problematic. I don't agree that the question is clear. The OP has not and cannot explicitly state his precise needs and reasoning. Please note also that I'm only saying it is reasonable to consider the question unclear and close it, not that we must. – Eliah Kagan Aug 16 '13 at 5:23
  • I agree with your assessment of the accepted answer, but that only proves that the OP doesn't have an intimate knowledge of how building works in the .NET and Visual Studio worlds—which, to be fair, many of the great .NET programmers don't have either. There is a comment on the answer indicating that very point; it should at least raise an eyebrow somewhere. And (please don't take this as me trying to be argumentative, I mean it reasonably) I don't really see how you can find the question to be unclear. It plainly states an objective based on a situation. – Adam Maras Aug 16 '13 at 5:27
  • @AdamMaras Everything you're saying is reasonable (and I don't consider anything you're saying to be argumentative). And while I think it may be better to close the question than leave it open, I think it's certainly acceptable to leave it open. I think our disagreement fundamentally comes down to the issue of what it means for a question to be unclear. I think the underlying situation is unclear in the sense that the OP may not have enough information to get a good answer. Also, I think the OP is deliberately (though with good reason) refusing to provide potentially important information. – Eliah Kagan Aug 16 '13 at 5:32
  • Fair enough. Given that the question has no close votes even after receiving attention from meta, I have to assume that the community doesn't seem to mind it being there (which is the ultimate answer to my question here, I suppose) so I'm just going to leave it at that. – Adam Maras Aug 16 '13 at 5:42
  • What specific details do you think the question is missing to make it answerable? I think it's pretty clear. We do not need to know why Visual Studio, we don't need to know what the court order says, etc. All we need to know are the requirements. Sure, we could provide a better solution if we knew that, that's why we try to simplify XY problems. But just because they're an XY problem doesn't mean that they are unanswerable. – Cody Gray Aug 16 '13 at 6:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .