.NET Framework Bookmark and Share   
 index > .NET Base Class Library > Finding Regasm
 

Finding Regasm

Are there versions of .NET 2.0 for which REGASM.exe is not located here?

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

I worry that there might be a v.2.0.50711 or something of the sort instead, or that there might be some way for it to be isntalled to a completely different location.

I am registering a .net DLL for being called as a COM dll with regasm and the /codebase switch. I was just going to copy regasm to a tempory location and run it against the DLL, but I was also afraid that the version of regasm I deploy might not be exactly the same version as .NET on the machine, and thus may bomb out if it is utilizing features of the .NET framework. So I felt it might be best just to call regasm from where it is at on the machine.

Thanks.
AaronLST
Please tone down the sarcasm a bit. If you need professional paid support, you can contact Microsoft CSS.

Other than early .NET 2.0 beta versions that you're unlikely to encounter in the wild, all release versions of 2.0, 2.0 SP1, 3.0 and 3.5 are installed to the V2.0.50727 folder.
nobugz

AaronLST,

1. Please open the "Properties" of RegAsm.exe file in this location. The File version on my machine is 2.0.50727.1433. Except the file version, there is regasm.exe.config file in the same location. Please open the check this XML file on the imageVersion node. You can set this value to v2.0.50727

2. I have also the .NET Framework 1.1 installed with the regasm.exe file version 1.1.4322.573. If you are using Windows Server 2003, there will be .NET Framework 1.1 installed with the operating system.

3. If there is no SP1 for your .NET Framework 2.0, please try to reinstall the framework with SP1 in the link below:

http://www.microsoft.com/downloads/details.aspx?familyid=79BC3B77-E02C-4AD3-AACF-A7633F706BA5&displaylang=en

If there is any further issue, please feel free to reply. Thanks again for your question.

  • Unmarked As Answer byAaronLST Monday, October 27, 2008 1:22 AM
  •  
Bruno Yu
Bruno Yu - MSFT wrote:

AaronLST,

1. Please open the "Properties" of RegAsm.exe file in this location. The File version on my machine is 2.0.50727.1433. Except the file version, there is regasm.exe.config file in the same location. Please open the check this XML file on the imageVersion node. You can set this value to v2.0.50727


I am not concerned with the version of the RegAsm.exe, and there is no need for my users to change the version of the exe. I don't see how manipulating version numbers is at all helpful to locating RegAsm.exe. I asked specifically about the location of the file, not its version.


Bruno Yu - MSFT wrote:

2. I have also the .NET Framework 1.1 installed with the regasm.exe file version 1.1.4322.573. If you are using Windows Server 2003, there will be .NET Framework 1.1 installed with the operating system.


That is more on target, but my question is only regarding .NET 2.0. My app has a requirement that .NET 2.0 already be installed, therefore I am only concerned with finding RegAsm in the .NET 2.0 installation.


Bruno Yu - MSFT wrote:

3. If there is no SP1 for your .NET Framework 2.0, please try to reinstall the framework with SP1 in the link below:

http://www.microsoft.com/downloads/details.aspx?familyid=79BC3B77-E02C-4AD3-AACF-A7633F706BA5&displaylang=en

If there is any further issue, please feel free to reply. Thanks again for your question.



I don't see any reason to require my users to install SP1. My application works fine without it. It is up to them and their administrators to decide when SP1 is an appropriate upgrade. I should not enforce additional requirements upon them that are not necessary.

My question is a simple yes or no question.

Are there versions of .NET 2.0 for which RegAsm.exe is installed to a folder other than "%WINDIR%\Microsoft.NET\Framework\v2.0.50727"?

For example, one response may be:
'Yes, there was a release of .NET 2.0 which installs to
"%WINDIR%\Microsoft.NET\Framework\v2.0.12456"'
or
'No, all official releases of .NET 2.0 install to
"%WINDIR%\Microsoft.NET\Framework\v2.0.50727"'

Notice the key element of a reponse to a Yes or No question is Yes or No, and often followed by a clarifying restatement of the question.
This is one of those things Microsoft doesn't teach you in their .NET Framework Design Guidelines classes, because it falls more in the scope of human language rather than computer languages.

I would simply go out and try to find every version of .NET 2.0 that I can and install each one to a clean VirtualPC, but I would still be left wondering if there are versions that MS no longer provides links to on their website for which some of my users may have.
AaronLST
Please tone down the sarcasm a bit. If you need professional paid support, you can contact Microsoft CSS.

Other than early .NET 2.0 beta versions that you're unlikely to encounter in the wild, all release versions of 2.0, 2.0 SP1, 3.0 and 3.5 are installed to the V2.0.50727 folder.
nobugz
Sorry, just frustrating that MVPs mark there own responses as answers when they haven't even addressed a question. It's like people don't even read before they respond.
AaronLST
If you are registering from code, You may use Environment.GetRuntimeDirectory() to get the directory where regasm.exe is.
  • Proposed As Answer byOK_10 Tuesday, June 02, 2009 8:36 AM
  •  
OK_10
See this post: http://stackoverflow.com/questions/968324/how-to-run-regasm-exe-from-a-c-program

And this post: http://msdn.microsoft.com/en-us/library/k0588yw5.aspx

It is a API-call that allows you to find the root of the .NET installation without using managed code.
Ernstjan Freriks

You can use google to search for other answers

Custom Search

More Threads

• TableAdapter Select Method is returning an extra column
• ListViewItemSorter: why so slow?
• Question about System.IO.Path.Combine
• Can't Uninstall my Service
• pass parameter with predicate search (listof.find)
• creating sequential access file
• System.Data.SqlClient
• Convert two digits into one byte
• At least one element in the source array could not be cast down to the destination array type
• Connection string in app config is not found