473,414 Members | 1,937 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,414 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 4298
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.