Subscribe to Stuck in an Infiniteloop        RSS Feed
-----

Simple Solutions Are Best

Icon 3 Comments
I recently picked up and am working my way through Pro C# 2010 and the .NET 4 Platform. One of the early exercises is to play around with the C# command line compiler (when was the last time anyone here used a command line compiler?) to get a feel for the tools and, I imagine, to fully appreciate all of the features of Visual Studio down the line.

Booting up the command line tool (on Windows 7 x64), I see this:

Quote

Setting environment for using Microsoft Visual Studio 2010 x86 tools.
ERROR: Cannot determine the location of the VS Common Tools folder.

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>


Problem solving mode engaged: perhaps there's a wayward environmental variable, something didn't run correctly on set up, a rebellious batch file, so on and so forth.

A quick query on MSDN reveals that many individuals found themselves in a similar predicament. For the most part, my hypothesis was correct, as all the help threads involved checking the VS100COMNTOOLS environmental variable, modifying some batch files, and reinstalling.

After digging around a bit to no avail, I came across the suggestion of "Run as Administrator". No way, I thought. I'm logged into an admin account with zero permission issues, but why not, nothing else has worked thus far. Lo and behold, that was the issue.

Short moral of the story: try the easy solutions first.

Slightly longer moral of the story: start at the "bottom" of the problem solving tree and gradually work your way up after eliminating possibilities. I personally guarantee a reduction in "head against wall" time.


Author's Note: Having dug through the typical suspects of this problem based on MSDN help threads, I then ran the command line tool as admin. In no way should this be the first course of action without fully researching the issue. I merely meant to comment on the fact of its simplicity since [as it turns out] I had nothing wrong with my environment and running as admin was the fix for my personal situation.

3 Comments On This Entry

Page 1 of 1

dorknexus Icon

18 October 2010 - 07:06 PM
simple solution? i am going to call it a non-intuitive violation of basic computer security. "doesn't work? run it in a fully privileged administrator mode." Principle of least privilege anyone?
0

KYA Icon

18 October 2010 - 07:55 PM
In hind sight it does seem that I am advocating "Run As Admin" right off the bat. I'll edit in the fact that I dove through all of the other possibilities before then.
0

moopet Icon

19 October 2010 - 05:35 AM

Quote

when was the last time anyone here used a command line compiler?

Today.

Interesting question, actually. Maybe I should make a poll, but then I'd have to figure out what forum to put it in :)
0
Page 1 of 1

October 2014

S M T W T F S
   1234
567891011
12131415161718
1920 21 22232425
262728293031 

Tags

    Recent Entries

    Recent Comments

    Search My Blog

    0 user(s) viewing

    0 Guests
    0 member(s)
    0 anonymous member(s)