Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I add the .NET framework directories to my PATH?

I sometimes need to run gacutil.exe or installutil.exe, etc. from the command line. Is it OK to add the .NET framework directories to my system PATH? If so, which ones should I add and in which order?

like image 954
Jeremy Stein Avatar asked Apr 06 '10 15:04

Jeremy Stein


4 Answers

Sure, nothing wrong with that. First thing I did once I got tired of digging out installutil and/or gacutil. You should only need to add:

%WINDIR%\Microsoft.NET\Framework\v2.0.50727

or

%WINDIR%\Microsoft.NET\Framework64\v2.0.50727

...depending on whether or not you want 64bit utilities or not. Typically you don't need to add 3.0 or 3.5 directories and they are really just add-ons for 2.0.*

like image 163
x0n Avatar answered Nov 13 '22 03:11

x0n


I always add the following to my path:

  1. C:\Windows\Microsoft.NET\Framework\v3.5
  2. C:\Windows\Microsoft.NET\Framework\v2.0.50727

I sometimes need to compile on the command line when I write simple stuff and also to use gacutil and regasm.

like image 27
Frank Hale Avatar answered Nov 13 '22 03:11

Frank Hale


It's a fine thing to do. Works great on my dev machines. I also add the Windows SDK so I can use ildasm from anywhere.

C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin

As for the order of the paths, typically the first path that contains the matching command is the winner.

like image 39
Matthew Whited Avatar answered Nov 13 '22 03:11

Matthew Whited


just be aware that some utilities like gacutil (I know this for sure at least with the 2.0 framework) isn't always available on every computer with the framework installed. I've seen some servers where I work that don't have it and we had a script that needed it :) Bad situation to be in.... but for development, you should be fine.

like image 24
TheToasterThatCould Avatar answered Nov 13 '22 03:11

TheToasterThatCould