473,406 Members | 2,954 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,406 software developers and data experts.

Code to obtain the path of ILDASM.exe

Sam
Hi,

I can use System.Runtime.InteropServices.RuntimeEnvironment. GetRuntimeDirectory()
to obtain the path for ILASM.exe, but how can I obtain the path to
ILDASM.exe?

Examples of the path I'm looking for are:
VSNET 2002 - "C:\Program Files\Microsoft Visual Studio
..NET\FrameworkSDK\Bin"
VSNET 2003 - "C:\Program Files\Microsoft Visual Studio .NET
2003\SDK\v1.1\Bin"
Thanks

Sam
Jul 21 '05 #1
7 7308
Go to the Visual Studio .NET tools, Visual Studio .NET 2003 Command Prompt..
"Sam" <sm*****@lithonia.com> wrote in message
news:5b**************************@posting.google.c om...
Hi,

I can use System.Runtime.InteropServices.RuntimeEnvironment. GetRuntimeDirectory() to obtain the path for ILASM.exe, but how can I obtain the path to
ILDASM.exe?

Examples of the path I'm looking for are:
VSNET 2002 - "C:\Program Files\Microsoft Visual Studio
.NET\FrameworkSDK\Bin"
VSNET 2003 - "C:\Program Files\Microsoft Visual Studio .NET
2003\SDK\v1.1\Bin"
Thanks

Sam

Jul 21 '05 #2
Sam
Hi William,

I know about the Visual Studio .net 2003 command prompt, but I wish to
obtain the path in code in a dot net application. Any other ideas?

Thanks

Sam

"William Ryan" <do********@comcast.nospam.net> wrote in message news:<OW**************@TK2MSFTNGP12.phx.gbl>...
Go to the Visual Studio .NET tools, Visual Studio .NET 2003 Command Prompt..
"Sam" <sm*****@lithonia.com> wrote in message
news:5b**************************@posting.google.c om...
Hi,

I can use

System.Runtime.InteropServices.RuntimeEnvironment. GetRuntimeDirectory()
to obtain the path for ILASM.exe, but how can I obtain the path to
ILDASM.exe?

Examples of the path I'm looking for are:
VSNET 2002 - "C:\Program Files\Microsoft Visual Studio
.NET\FrameworkSDK\Bin"
VSNET 2003 - "C:\Program Files\Microsoft Visual Studio .NET
2003\SDK\v1.1\Bin"
Thanks

Sam

Jul 21 '05 #3
Cor
Hi Sam,

Did you try this?
\\\
Dim psi As New ProcessStartInfo
psi.FileName = "Your path"
psi.UseShellExecute = True
Process.Start(psi)
///
I know about the Visual Studio .net 2003 command prompt, but I wish to
obtain the path in code in a dot net application. Any other ideas?

Jul 21 '05 #4
Sam,
I know about the Visual Studio .net 2003 command prompt, but I wish to
obtain the path in code in a dot net application. Any other ideas?


Look in the registry, grab the string value

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramewor k\sdkInstallRootv1.1

I believe the value was named "sdkInstallRoot" for v1.0. Then append
"bin\ildasm.exe" to the path. Since one can have multiple versions of
the SDK installed, you have to be prepared to select one of them.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Jul 21 '05 #5
Sam
Hi Mattias,

Thanks for the information. This is exactly what I was looking for.
The only thing that I need to know now is which one to use based on if
I'm using VisualStudio 2002 or Visual Studio 2003.

I'll be writing an addin that will use this information and some users
will run VS 2002 or VS 2003. So depending on which one a user is
running I will need to build an appropriate path string to ILDASM.EXE.

Do you know of a way to programmatically determine which version of
Visual Studio.Net is being used?

Many Thanks,

Sam
Jul 21 '05 #6
Sam,
Do you know of a way to programmatically determine which version of
Visual Studio.Net is being used?


From within an add-in, you can check DTE.Version.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Jul 21 '05 #7
Sam
Hi Mattias,

Many thanks, this was exactly what I needed.

Sam
Jul 21 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Novice | last post by:
Hi all, I'm afraid this is the second posting of this information as I didn't get a response on the previous post. I will try to shorten my message (i.e. be more concise) in the hopes that it will...
1
by: Kamy Terminator | last post by:
Hi, I would like to open ILDASM, programatically. I could use System.Diagnostics.Process.Start("....\ILDASM.eXE"); But in that case i'll have to hard code the path... which i dont want...
1
by: Daveyk0 | last post by:
Hello there, I have a front end database that I have recently made very many changes to to allow off-line use. I keep copies of the databases on my hard drive and link to them rather than the...
1
by: james | last post by:
What class / method should I be using to get the full path to an embedded resource ? In my case I have an .xml file that my app uses, it is set as embedded resource, and I have a control that...
1
by: Edward Diener | last post by:
I understand that specifying an __event, let's call it X, actually generates add_X, remove_X, and raise_X methods in the class of the __event. If one wants to allow the adding, subtracting, and...
88
by: Peter Olcott | last post by:
Cab you write code directly in the Common Intermediate language? I need to optimize a critical real-time function.
4
by: Dean Slindee | last post by:
In order to deploy my app, I need to specify the following file path as relative to my project. I need the image to be a file so that it can be processed by the "DrawImageToScale" function so that...
7
by: ApexData | last post by:
Hello I currently Link the FE/BE using the LinkTables Option and the Linked Table Manager. Any time I need to move the BE to another location, I have to go through this process over again. I...
4
by: Robin Becker | last post by:
A kind user reports having problems running the reportlab tests because his path has non-ascii characters in it eg ......\Mes documents\Mes Téléchargements\Firefox\... somewhere in the tests...
4
by: monu121 | last post by:
Hi, I am working on VB 6.0 and I want to create a browse button to which when I will click then I will get the storage path to where I want to save my generate file. So please help me. ...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.