By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,562 Members | 1,223 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,562 IT Pros & Developers. It's quick & easy.

Retrieving .NET framework binaries directory

P: n/a
Hi all,

I'd like to programmatically retrieve the directory
of .NET framework binary tools (csc.exe, RegAsm.exe).
What is the right way to do this? I can get InstallRoot
via the Registry and append System.Environment.Version to
form the path, but is there a shorter and nicer way?

Thanks in advance.
Jul 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi!

You can do this using the GetCORSystemDirectory API. Include the
MSCOREE.H header and link to MSCOREE.LIB. These are present in the
"include" and "lib" folder respectively, in your .NET Framework SDK
installation folder.
Regards,
Gaurav Khanna
---------------
Microsoft MVP - .NET
WinToolZone - Spelunking Microsoft Technologies
http://www.wintoolzone.com/
OpSupport - Spelunking Rotor
http://opsupport.sscli.net/

On Fri, 25 Jul 2003 05:51:03 -0700, "Dmitry Shaporenkov"
<ds**@intellij.com> wrote:
Hi all,

I'd like to programmatically retrieve the directory
of .NET framework binary tools (csc.exe, RegAsm.exe).
What is the right way to do this? I can get InstallRoot
via the Registry and append System.Environment.Version to
form the path, but is there a shorter and nicer way?

Thanks in advance.


Jul 19 '05 #2

P: n/a
Thanks for your reply.
However, I need to do this from C# code.

-----Original Message-----
Hi!

You can do this using the GetCORSystemDirectory API. Include theMSCOREE.H header and link to MSCOREE.LIB. These are present in the"include" and "lib" folder respectively, in your .NET Framework SDKinstallation folder.
Regards,
Gaurav Khanna
---------------
Microsoft MVP - .NET
WinToolZone - Spelunking Microsoft Technologies
http://www.wintoolzone.com/
OpSupport - Spelunking Rotor
http://opsupport.sscli.net/

On Fri, 25 Jul 2003 05:51:03 -0700, "Dmitry Shaporenkov"
<ds**@intellij.com> wrote:
Hi all,

I'd like to programmatically retrieve the directory
of .NET framework binary tools (csc.exe, RegAsm.exe).
What is the right way to do this? I can get InstallRoot
via the Registry and append System.Environment.Version toform the path, but is there a shorter and nicer way?

Thanks in advance.


.

Jul 19 '05 #3

P: n/a
You could use Platform Invoke

http://msdn.microsoft.com/msdnmag/is...t/default.aspx

Tim
--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.

--------------------
Content-Class: urn:content-classes:message
From: "Dmitry Shaporenkov" <ds**@intellij.com>
Sender: "Dmitry Shaporenkov" <ds**@intellij.com>
References: <0a****************************@phx.gbl> <v2********************************@4ax.com>Subject: Re: Retrieving .NET framework binaries directory
Date: Sat, 26 Jul 2003 00:55:09 -0700
Lines: 41
Message-ID: <04****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Thread-Index: AcNTSzx/XOTggw37TfqF9vaEM486zg==
Newsgroups: microsoft.public.dotnet.general
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:102478
NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
X-Tomcat-NG: microsoft.public.dotnet.general

Thanks for your reply.
However, I need to do this from C# code.

-----Original Message-----
Hi!

You can do this using the GetCORSystemDirectory API.

Include the
MSCOREE.H header and link to MSCOREE.LIB. These are

present in the
"include" and "lib" folder respectively, in your .NET

Framework SDK
installation folder.
Regards,
Gaurav Khanna
---------------
Microsoft MVP - .NET
WinToolZone - Spelunking Microsoft Technologies
http://www.wintoolzone.com/
OpSupport - Spelunking Rotor
http://opsupport.sscli.net/

On Fri, 25 Jul 2003 05:51:03 -0700, "Dmitry Shaporenkov"
<ds**@intellij.com> wrote:
Hi all,

I'd like to programmatically retrieve the directory
of .NET framework binary tools (csc.exe, RegAsm.exe).
What is the right way to do this? I can get InstallRoot
via the Registry and append System.Environment.Versiontoform the path, but is there a shorter and nicer way?

Thanks in advance.


.


Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.