473,385 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Retrieving .NET framework binaries directory

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
3 4293
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Gary Varga | last post by:
I have an application which runs on both CE.NET and the full framework. To allow for a shared code base the following describes the assembly structure: 1) There is an executable binary for each...
17
by: bob | last post by:
Is there any way to create a Csharp Console application that does not require the user to have the .NET framework installed?
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
6
by: Plat | last post by:
I've Googled this for a while, to no avail. Hopefully someone can help me. Maybe I'm using the wrong terminology. Here's the scoop! Let's say I've got a simple *.ASPX page that has a syntax...
13
by: RHPT | last post by:
I am wanting to capture the XML posted by an InfoPath form with .NET, but I cannot figure out how to capture the XML stream sent back by the InfoPath form. With Classic ASP, I could just create an...
7
by: Dmitry Shaporenkov | last post by:
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...
10
by: Dan | last post by:
I use the settings grid to create a setting named "ServerName". Now i want to retrieve it in code and i can't figure out how. This should be incredibly obvious but i cant get it. I have tried...
13
by: dancer | last post by:
I have made a new post because when I try to respond to another, I get the error, "Article Rejected -- Ill-formed message id" This is in response to the advice of Juan Libre to install Net...
6
by: jc | last post by:
I have an asp.net 2.0 website with vb.net classes. I can run that website with no problems from vs.net and from an iis 6.0 server. I deploy using a standard copying of files. I noticed a similar...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.