Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio
All postings are provided AS IS with no warranties, and confer no rights. Additionally, views expressed herein are my own and not those of my employer, Microsoft.
I often get questions from fellow employees or customers who find my blog regarding how to troubleshoot .NET Framework installation errors. I want to outline the process that I use to narrow down one of the most common errors that I see that can cause the .NET Framework 3.0, the .NET Framework 3.0 SP1 or the .NET Framework 3.5 to fail in the hopes that it will help some folks who read this post in the future be able to narrow down and resolve this issue on their system if they encounter it.
This particular error occurs when a custom action that runs an EXE named ServiceModelReg.exe during .NET Framework 3.0 setup fails. This custom action is inside of the Windows Communication Foundation (WCF) MSI in the .NET Framework 3.0, and it also is run during .NET Framework 3.5 setup because the .NET Framework 3.5 requires the .NET Framework 3.0 SP1 as a prerequisite. I use the following process to narrow down the root cause of the error and attempt to identify useful workarounds:
Step 1 - Find the exact component that is failing
I start the investigation process by looking at the .NET Framework 3.0 setup log files or the .NET Framework 3.5 setup log files, depending on what setup is failing.
If the error occurs during .NET Framework 3.0 setup, the main .NET Framework 3.0 setup error log file (named %temp%\dd_dotnetfx3error.txt) will show an error like the following in this case:
[03/25/08,11:11:11] Windows Communication Foundation: [2] Error: Installation failed for component Windows Communication Foundation. MSI returned error code 1603
If the error occurs during .NET Framework 3.5 setup, then the main .NET Framework 3.5 setup error log file (named %temp%\dd_dotnetfx35error.txt) will show an error like the following in this case:
[03/25/08,11:11:11] Microsoft .NET Framework 3.0a: [2] Error: Installation failed for component Microsoft .NET Framework 3.0a. MSI returned error code 1603
Step 2 - Find the verbose MSI log for the failing component
From here, I proceed to locate the verbose MSI log file for the specific component that is failing. As I described in this blog post, the .NET Framework 3.0 and 3.5 installers create their own verbose log files by default, so there is no need to enable logging and re-run setup to produce verbose logs.
If the error occurs during .NET Framework 3.0 setup, the verbose log file that contains the error will be named %temp%\dd_wcf_retMSI*.txt in this case.
If the error occurs during .NET Framework 3.0 SP1 setup, the verbose log file that contains the error will be named %temp%\dd_NET_Framework30_Setup*.txt in this case.
Step 3 - Find the error causing the failure within the verbose MSI log
Once I have located the appropriate verbose MSI log file, I use the technique described in this blog post to narrow down the root cause of the failure. Searching for the string return value 3 in the case of this particular error shows that the last action being run prior to setup failing is the following:
MSI (s) (B4:D0) [11:11:11:011]: Executing op: CustomActionSchedule(Action = DD_CA_InstallXwsRegExe_X86.3643236F_FC70_11D3_A536_0090278A1BB8, ActionType=3073, Source=BinaryData, Target=QuietExec, CustomActionData=c:\WINDOWS\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe /r /x /y /v; dummy; c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\)
Note that you cannot search for the string return value 3 if you are installing on a non-English OS. Windows Installer translates the string "return value" into the OS language when it creates entries in a verbose MSI log file, so you will need to search for a translated version of this message if you are installing on a non-English OS.
Step 4 - Find the root cause of this custom action failure
In this case, the verbose MSI log file shows that the custom action that runs ServiceModelReg.exe is failing in this case. This custom action is designed to create its own log file named %temp%\dd_wcf_retCA*.txt, so the first thing I try when I see this type of error is to find that file and look for errors, warnings, or exceptions. Most of the time, if that log is created, the error listed there is fairly self-explanatory and it is straightforward to determine how to work around the problem.
However, I have also seen many cases where ServiceModelReg.exe fails but does not create this additional log file. In that case, the next step is to go look at the application event log to see if any exceptions were logged by this action that will help narrow down the root cause. You can do the following to locate this type of error in the application event log:
In most cases that I've seen of this issue in the past, the exception listed in the application event log looks like the following:
System.TypeInitializationException: The type initializer for 'System.ServiceModel.Install.IisHelper' threw an exception. ---> System.ApplicationException: ServiceModelReg.exe has detected a possible corruption in the IIS metabase that prevents the registration of the ServiceModel IIS scriptmaps. Please either fix the IIS metabase corruption, or, if you do not desire ServiceModel WebHost funtionality, disable the IISAdmin service and reregister ServiceModel. ---> System.Runtime.InteropServices.COMException (0x8009000F): Object already exists.
Step 5 - Try to fix the underlying issue
Typically, the above error means that there is something wrong with the installation of IIS on the system. What I normally suggest to try to fix this type of error is to try to uninstall and then re-install IIS using the Add/Remove Windows Components control panel, reboot, and then try to install the .NET Framework 3.0 or 3.5 again. If that does not help, it should also be possible to disable the IISAdmin service on the system prior to installing the .NET Framework 3.0 or 3.5 (assuming that you do not plan on using Windows Communication Foundation WebHost functionality after installing the .NET Framework 3.0 or 3.5). To do that, you can use these steps:
If the above steps do not work, it can also be helpful to try to install the .NET Framework 3.5 SP1 (which will install the .NET Framework 3.0 SP2 and 2.0 SP2 behind the scenes). As described in this blog post, there are some changes in .NET Framework 3.5 SP1 setup that can allow it to succeed in cases where .NET Framework 3.0 or 3.5 setup would otherwise fail.
What to do if steps 4 and 5 do not match what you see on your system
This blog post is intended to demonstrate how I approach narrowing down the root cause of a particularly common installation problem that affects the .NET Framework 3.0 and 3.5. However, there are several possible causes of installation failures in the .NET Framework, so that means that these steps will not work for all cases. If you do not see the specific types of entries in your log files, then the workaround in step 5 will likely not help, but steps 1 through 4 can still be helpful in finding the root cause.
I have posted about other possible causes of ServiceModelReg.exe custom action failures in the following blog post:
I also suggest consulting the .NET Framework setup troubleshooting guide for links to other possible installation issues and workarounds, links to log file locations, links to readme files, etc.
<update date="11/24/2008"> Added a link to a new blog post I wrote about another possible cause of ServiceModelReg.exe custom action failures in the .NET Framework 3.0 and 3.5. </update>
<update date="8/10/2009"> Added a suggestion to try installing the .NET Framework 3.5 SP1 as a possible workaround to this type of install failure. </update>
XNA Game Studio 2.0 introduces the concept of a Game Content Project. A content project is nested within an XNA Game Studio 2.0 project in Visual Studio, and it is designed to store all assets and content for a game (sounds, textures, 3D models, etc) and build them as a part of the build process for the game project or independently of the game code.
Having a nested content project within an XNA Game Studio 2.0 project makes it more difficult to create customized Visual Studio templates for XNA Game Studio 2.0 game projects or game library projects. Fortunately, a couple of members of the XNA Game Studio team (Stephen and Nazeeh) have written in-depth blog posts that describe how to create customized Visual Studio project templates for XNA Game Studio 2.0 and demonstrate the process with a real-world example.
If you are interested in creating customized project templates for XNA Game Studio 2.0, I encourage you to check out these blog posts:
A while back, I posted a set of instructions for automating the install of Visual Studio 2005 Express Editions. Since the Visual Studio 2008 product family shipped last November, I have been asked for an equivalent set of instructions for Visual Studio 2008 Express Editions as well.
Before using the instructions in this post, you must use one of the following links to create a network install point for one or all of the Visual Studio 2008 Express Editions:
Once you have downloaded the pieces of the Express Edition setup package, you will need to figure out which pieces are needed for the OS type (Windows XP, Windows Server 2003, etc), OS language (English, etc), processor architecture (x86, x64) and Express Edition type (VB, VWD, etc) that you are planning to install. Each Express Edition consists of a set of prerequisites, the main Express Edition package and a set of optional components.
The following components are prerequisites, meaning they must be installed before attempting to install the main Express Edition package:
The following components are optional components, meaning they are not required to be installed, and must be installed after the main Express Edition package if you choose to install them:
The following is a list of all VS 2008 Express Edition prerequisites, main packages and optional components, what conditions they are needed for and their silent install command line switches. Note that some packages are self-extracting packages that require 2 steps - one to extract the contents and a second to perform the silent install.
Windows Installer 3.1
Needed on Windows XP x86 if not already installed.
WindowsInstaller-KB893803-v2-x86.exe /quiet /norestart
Visual C++ Minimal Redistributable
Needed on all operating systems if not already installed.
.NET Framework 3.5
dotnetfx35setup.exe /q /norestart /lang:ENU
.NET Framework 3.5 language pack (x86)
Needed for all non-English Express Editions on all x86 operating systems if not already installed.
dotnetfx35langpack_x86**.exe /q /norestart
Note: In this command line, ** is the 2 letter culture code for the language you are installing. For example, the file name will be dotnetfx35langpack_x86fr.exe for the French language pack.
.NET Framework 3.5 language pack (x64)
Needed for all non-English Express Editions on all x64 operating systems if not already installed.
dotnetfx35langpack_x64**.exe /q /norestart
Note: In this command line, ** is the 2 letter culture code for the language you are installing. For example, the file name will be dotnetfx35langpack_x64fr.exe for the French language pack.
Remote Debugger (x64)
Needed on all x64 operating systems if not already installed.
Windows SDK Express Headers and Libraries (x86)
Only needed for the Visual C++ 2008 Express Edition. Needed on all x86 operating systems if not already installed.
Windows SDK Express Headers and Libraries (x64)
Only needed for the Visual C++ 2008 Express Edition. Needed on all x64 operating systems if not already installed.
Windows SDK Express Tools for the .NET Framework (x86)
Only needed for Visual Basic, Visual C++ 2008 and Visual C# 2008 Express Editions. Needed on all x86 operating systems if not already installed.
Windows SDK Express Tools for the .NET Framework (x64)
Only needed for Visual Basic, Visual C++ 2008 and Visual C# 2008 Express Editions. Needed on all x64 operating systems if not already installed.
Windows SDK Express Tools for Win32 (x86)
Only needed for Visual Basic 2008, Visual C++ 2008 and Visual C# 2008 Express Editions. Needed on all x86 operating systems if not already installed.
Windows SDK Express Tools for Win32 (x64)
Only needed for Visual Basic 2008, Visual C++ 2008 and Visual C# 2008 Express Editions. Needed on all x64 operating systems if not already installed.
Windows SDK Express Tools for Web (x86)
Only needed for the Visual Web Developer 2008 Express Edition. Needed on all x86 operating systems if not already installed.
Windows SDK Express Tools for Web (x64)
Only needed for the Visual Web Developer 2008 Express Edition. Needed on all x64 operating systems if not already installed.
Visual Studio Web Authoring Component
Only needed for the Visual Web Developer 2008 Express Edition. Needed on all operating systems if not already installed.
WebDesignerCore.EXE /q /install /1033
Main Visual Basic 2008 Express Edition package
Needed on all operating systems in order to install the Visual Basic 2008 Express Edition.
Main Visual C++ 2008 Express Edition package
Needed on all operating systems in order to install the Visual C++ 2008 Express Edition.
Main Visual C# 2008 Express Edition package
Needed on all operating systems in order to install the Visual C# 2008 Express Edition.
Main Visual Web Developer 2008 Express Edition package
Needed on all operating systems in order to install the Visual Web Developer 2008 Express Edition.
SQL Server Compact 3.5
Only needed for Visual Basic 2008 and Visual C# 2008 Express Editions. Optional on all operating systems if not already installed.
msiexec /i SSCERuntime-enu.msi /qn /l*v %temp%\SSCERuntime-enu.log USING_EXUIH=1 REBOOT=ReallySuppress
SQL Server Compact 3.5 Design Tools
msiexec /i SSCEVSTools-ENU.msi /qn /l*v %temp%\SSCEVSTools-ENU.log USING_EXUIH=1 REBOOT=ReallySuppress
MSDN Express
Optional on all operating systems if not already installed.
SQL Express (x86)
Optional on all x86 operating systems if not already installed.
sqlexpr32.exe -q /norebootchk /qn reboot=ReallySuppress AddUserAsAdmin=1 addlocal=all instancename=SQLEXPRESS SCCCHECKLEVEL=IncompatibleComponents:1;MDAC25Version:0 ERRORREPORTING=2 SQLAUTOSTART=1
SQL Express (x64)
Optional on all x64 operating systems if not already installed.
sqlexpr.exe -q /norebootchk /qn reboot=ReallySuppress AddUserAsAdmin=1 addlocal=all instancename=SQLEXPRESS SCCCHECKLEVEL=IncompatibleComponents:1;MDAC25Version:0 ERRORREPORTING=2 SQLAUTOSTART=1
SQL Publishing Wizard
Only needed for the Visual Web Developer 2008 Express Edition. Optional on all operating systems if not already installed.
msiexec /i SqlPubWiz.msi /qn /l*v %temp%\sqlpubwiz.log USING_EXUIH=1 REBOOT=ReallySuppress ISINVOKEDFROMVS=1
Silverlight 1.0
Silverlight1.0.exe /q
Additional notes about silent install of the Express Editions:
Bob Arnson has posted some information on his blog about a new feature he has added to WiX 3.0 that I wanted to link to here. In his post at http://www.joyofsetup.com/2008/03/18/new-wix-feature-internet-shortcuts/, Bob describes the Internet shortcut creation feature that he added to WixUtilExtension. The new InternetShortcut element allows you to create a shortcut to a web site or to a locally installed file referenced via the file:// protocol.
For example, the following authoring will create an http:// shortcut:
<util:InternetShortcut Id="MyBlog" Directory="DesktopFolder" Name="My Blog" Target="http://blogs.msdn.com/astebner/"/>
After adding the InternetShortcut element to your WiX authoring, you need to make sure to add a reference to the WixUtilExtension when compiling your MSI. To do that, you must use the /ext parameter for the WiX compiler (candle.exe) like the following:
candle.exe yoursetup.wxs -ext 'c:\Program Files\Windows Installer XML v3\bin\WixUtilExtension.dll'
This feature will be available in the next weekly WiX 3.0 release (it is not in the 3.0.3907.0 build but will be in the next build after that).
As a side note, as Bob mentioned in his post, it is technically possible to use the IniFile table in Windows Installer to create a .url file that will accomplish the same thing as an Internet shortcut, but the format of .url files is not officially documented and therefore is not guaranteed to work in the future. This is how the XNA Game Studio 2.0 setup creates a start menu shortcut for the Creators Club Web site:
<IniFile Id="CreatorsClubLink" Action="createLine" Name="XNA Creators Club Online.url" Directory="XnaProgramMenuDir" Section="InternetShortcut" Key="URL" Value="http://go.microsoft.com/fwlink/?LinkId=101279&clcid=0x409"/>
I previously posted an item describing how to create an installable layout for a Visual Studio 2008 Express Edition. In this post, I will extend upon the topic of creating a network install point and demonstrate how to create a network install point that can be used to install all of the Express Editions from a single location. This topic is more advanced than my previous post because it requires some modifications to setup data files, but it is all achievable with a few additional steps.
At a high level, what the steps below will do is walk you through the process of downloading the prerequisite packages (which are common to all Express Editions), and then downloading the individual installers for each Express Edition. Then we will update a setup data file for each Express Edition to force setup to search for the prerequisite packages in a common location so they only have to be downloaded and stored on the network install point once.
Here are the specific steps to accomplish this:
Now, for each of the other 3 Express Editions (Visual Basic 2008 Express Edition, Visual C++ 2008 Express Edition and Visual C# 2008 Express Edition), follow the set of steps listed below to add them to your network install point.
Visual Basic 2008 Express Edition
Visual C++ 2008 Express Edition
Visual C# 2008 Express Edition
The following options can be used to download and assemble a folder structure that can be used to install one of the Visual Studio 2008 Express Editions.
Option 1: Download and burn or extract the CD image (easiest option)
The first, and easiest option is to utilize the Offline Install instructions for Visual Studio 2008 Express Editions page on the MSDN site. These instructions allow you to download an ISO file for a DVD image that contains all of the following Visual Studio 2008 Express Editions and their prerequisites and optional components:
Once you have downloaded the ISO file, you can either burn the image onto a DVD and then copy the contents to your local hard drive or extract the contents to your local hard drive directly using a tool such as IsoBuster.
Once you have copied the contents to a local hard drive, you can share out the folder on a network and install it from there if you choose to.
Option 2: Manually assemble the equivalent of the CD image (advanced option)
If you need to optimize bandwidth or for some other reason cannot use option 1, you can use some advanced steps to reverse engineer the VS 2008 Express Edition setup data files and manually download the individual pieces you will need to create a network installation point. If you use these steps, you can optimize your download size by only including a single Express Edition instead of all 4. You can include only the optional components you want to install (meaning you can skip SQL Express and MSDN if you choose to not install them during Express Edition setup). You can also optimize your download size based on the configuration of the machines you will be installing on. For example, if you know you will not need to install on any x64 systems, you can skip downloading the x64 components for SQL Express and the remote debugger. Also, if you know that the systems you will install on already have prerequisites such as Windows Installer 3.1 or the .NET Framework 3.5, you can skip downloading those components.
The following steps will allow you to manually assemble an installable layout for an Express Edition. In this example, I will use the Visual Web Developer 2008 Express Edition (English), but equivalent steps can be used for the other Express Editions and non-English languages as well. For other Express Editions, you will need to change the download location used in steps 1 and 5 below.
Windows SDK Express Tools for Web (only needed for Visual Web Developer Express Edition)
Windows SDK Express Tools for the .NET Framework (needed for Visual Basic, Visual C++ and Visual C# Express Editions)
Windows SDK Express Tools for Win32 (needed for Visual Basic, Visual C++ and Visual C# Express Editions)
Windows SDK Express Headers and Libraries (only needed for Visual C++ Express Edition)
Visual Studio Web Authoring Component (only needed for Visual Web Developer Express Edition)
SQL Server Compact 3.5 (needed for Visual Basic and Visual C# Express Editions)
SQL Server Compact 3.5 Design Tools (needed for Visual Basic and Visual C# Express Editions)
SQL Publishing Wizard (only needed for Visual Web Developer Express Edition)
SQL Server Express (x86)
SQL Server Express (x64)
Additional notes for non-English Express Editions
If you want to create an installable layout for a non-English Express Edition, you will need to use different URLs than the ones listed above. The URLs can all be assembled using the prefix http://go.microsoft.com and the data stored in the URL value for the section in the file baseline.dat that corresponds to the component in question.
In addition, you will also need to download the language pack for the .NET Framework 3.5 for non-English Express Editions. This can be done with the following steps:
Advanced note about setting default checked state for optional components
You can configure the default checked state for the SQL Server Compact 3.5, SQL Server Compact 3.5 Design Tools, MSDN Express, SQL Express and Silverlight 1.0 optional components using the DefaultSelected and WebDefaultSelected values in baseline.dat. Setting them to 0 will cause the setup UI to appear with the checkbox unchecked for the item in question, and setting them to 1 will cause the setup UI to appear with the checkbox checked for the item in question. The default selection state only applies to optional components for the Express Editions, so setting these values for components other than SQL Server Compact 3.5, SQL Server Compact 3.5 Design Tools, MSDN Express, SQL Express or Silverlight 1.0 will not have any effect.
I have heard from a few customers who have installed Visual Studio 2008 and then seen a dialog appear stating "Invalid license data. Reinstall is required." when attempting to launch the IDE. The dialog looks like the following:
Pressing OK on this dialog dismisses the IDE and VS 2008 is not usable.
There are a couple of cases where registry data can be orphaned on the machine that causes this type of error. Unfortunately, running a repair of VS 2008 will not correctly fix the registry values that control this functionality in most cases.
The following steps can be used to resolve most instances of this Invalid license data error message:
reg delete HKCR\Licenses\21B7CDC0-21A6-4fa8-8CE5-F6A6B2B60839 /freg delete HKCR\Licenses\2AC5863D-48B9-490c-ACD3-B7723A1FEB9E /freg delete HKCR\Licenses\45D0AA33-5564-4a89-BE94-C1972EF4658C /freg delete HKCR\Licenses\46D504D7-557F-4C19-A4DD-6605411EF496 /freg delete HKCR\Licenses\743A8267-4958-460e-B757-7110EED3D53C /freg delete HKCR\Licenses\82198EB8-0FAB-4b2b-98AD-F745A8566EFE /freg delete HKCR\Licenses\AEA64E56-7C97-4a1c-8974-4E0BB4E48FCD /freg delete HKCR\Licenses\B2825A63-A482-4032-80E6-42C9D2C1A78B /freg delete HKCR\Licenses\BA32367F-28F8-4AEA-848D-95AE438B3B9C /freg delete HKCR\Licenses\F2E1F428-5B9A-4a69-B1F4-28C3C644168A /f
reg delete HKCR\Wow6432Node\Licenses\21B7CDC0-21A6-4fa8-8CE5-F6A6B2B60839 /freg delete HKCR\Wow6432Node\Licenses\2AC5863D-48B9-490c-ACD3-B7723A1FEB9E /freg delete HKCR\Wow6432Node\Licenses\45D0AA33-5564-4a89-BE94-C1972EF4658C /freg delete HKCR\Wow6432Node\Licenses\46D504D7-557F-4C19-A4DD-6605411EF496 /freg delete HKCR\Wow6432Node\Licenses\743A8267-4958-460e-B757-7110EED3D53C /freg delete HKCR\Wow6432Node\Licenses\82198EB8-0FAB-4b2b-98AD-F745A8566EFE /freg delete HKCR\Wow6432Node\Licenses\AEA64E56-7C97-4a1c-8974-4E0BB4E48FCD /freg delete HKCR\Wow6432Node\Licenses\B2825A63-A482-4032-80E6-42C9D2C1A78B /freg delete HKCR\Wow6432Node\Licenses\BA32367F-28F8-4AEA-848D-95AE438B3B9C /freg delete HKCR\Wow6432Node\Licenses\F2E1F428-5B9A-4a69-B1F4-28C3C644168A /f
After doing this, the license data should be recreated and correct and allow you to launch the VS 2008 IDE.
The .NET Framework 3.5 installs service packs for the .NET Framework 2.0 and 3.0 behind the scenes as prerequisites. On Windows Vista and Windows Server 2008, the .NET Framework 2.0 and 3.0 are installed as OS components, which means that the 2.0 and 3.0 service packs are delivered as .msu files that contain OS update metadata files and payload.
I was asked by a colleague today about how to view and extract the contents of the .NET Framework 2.0 SP1 and 3.0 SP1 .msu files and then automate the installation if needed. An .msu file is essentially a .zip file, so in the past I have used standard .zip viewing tools (such as WinZip) to view the contents.
Fortunately, my colleague found a useful knowledge base article describing how to automate this type of scenario and I wanted to post a link to it here to hopefully make it easier to find. You can check out the article at this location:
http://support.microsoft.com/kb/934307
To summarize the information in that article, you can use the following syntax to extract the contents of an .msu file. I am using the .NET Framework 2.0 SP1 .msu file that is included as a prerequisite for the .NET Framework 3.5 in the below examples:
expand -f:* "NetFX2.0-KB110806-v6000-x86.msu" %temp%\netfx20sp1
After extracting the contents of the .msu file, you can install it by using Package Manager (pkgmgr.exe) with a command line like the following:
pkgmgr.exe /n:%temp%\netfx20sp1\Windows6.0-KB110806-v6000-x86.xml
Alternatively, you can use Windows Update Standalone Installer (wusa.exe) to directly install a .msu file without extracting it by using a command line like the following:
wusa.exe "NetFX2.0-KB110806-v6000-x86.msu" /quiet /norestart
A while back, I posted a set of instructions that can be used to try to resolve .NET Framework installation issues in case other troubleshooting steps listed on my blog, in knowledge base articles or elsewhere do not work. Those steps are out of date now because several new versions of the .NET Framework have been released since then, a new verification tool has been released and there are some other helpful steps that are not listed there. Instead of trying to update those steps in that old post, I decided to write a replacement post that contains the new information.
I have created a .NET Framework troubleshooting guide that contains links to information about various types of .NET Framework installation issues that we've seen over the years. However, the links in that article do not cover all possible errors, and there are likely some scenarios that cannot be resolved by any of the workarounds listed in that article.
If you run into an issue installing or using the .NET Framework or a .NET Framework hotfix or service pack, and the links in the .NET Framework troubleshooting guide do not help, I usually suggest trying the following steps in order to get your system back into a known state and then re-installing the .NET Framework and any hotfixes or service packs that apply to it:
.NET Framework setup log file locations
If none of the above help, then it can be useful to look at the .NET Framework setup log files for more in-depth troubleshooting. Here are links to information about the log files created by each version of the .NET Framework:
The .NET Framework 1.0 and 1.1 are not listed above because they do not create log files automatically. You need to use steps like the ones listed in this blog post in order to create log files for .NET Framework 1.0 and 1.1 setup.
.NET Framework setup packaging notes that affect uninstalls
The .NET Framework 1.0, 1.1 and 2.0 are all side-by-side versions that can be installed and uninstalled without affecting the others. This means that if you are running into an issue in the .NET Framework 2.0, for example, you do not necessarily need to remove the .NET Framework 1.0 and 1.1 in addition to removing 2.0.
The .NET Framework 3.0 is an add-on that requires the .NET Framework 2.0 to be present as a prerequisite. If you have the .NET Framework 3.0 installed, you will not be allowed to uninstall the .NET Framework 2.0 until you first uninstall the .NET Framework 3.0.
The .NET Framework 3.5 is an add-on that requires the .NET Framework 2.0 SP1 and the .NET Framework 3.0 SP1 to be present as prerequisites. If you have the .NET Framework 3.5 installed, you will not be allowed to uninstall the .NET Framework 3.0 SP1 or 2.0 SP1 until you first uninstall the .NET Framework 3.5. You will also not be allowed to uninstall the .NET Framework 2.0 SP1 until you first uninstall the .NET Framework 3.5 and the .NET Framework 3.0 SP1.
The .NET Framework 3.5 SP1 is an add-on that requires the .NET Framework 2.0 SP2 and the .NET Framework 3.0 SP2 to be present as prerequisites. If you have the .NET Framework 3.5 SP1 installed, you will not be allowed to uninstall the .NET Framework 3.0 SP2 or 2.0 SP2 until you first uninstall the .NET Framework 3.5 SP1. You will also not be allowed to uninstall the .NET Framework 2.0 SP2 until you first uninstall the .NET Framework 3.5 SP1 and the .NET Framework 3.0 SP2.
<update date="4/22/2008"> Added information and a link to the Microsoft .NET Framework 2.0 Registration Correction Tool, which should be used before resorting to trying the cleanup tool for .NET Framework 2.0 issues. </update>
<update date="9/21/2008"> Added a link to download the .NET Framework 3.5 SP1 now that it has shipped. </update>
<update date="9/23/2008"> Updated the link to the .NET Framework 2.0 Registration Correction Tool to point to the official knowledge base article now that it has been published. </update>
<update date="1/25/2009"> Added a link to the standalone .NET Framework 2.0 SP2 installer. </update>
<update date="2/25/2009"> Added links to the .NET Framework 3.5 SP1 family update installers. </update>
<update date="3/23/2009"> Fixed broken link to the .NET Framework cleanup tool. </update>
<update date="3/28/2009"> Fixed broken link to the .NET Framework setup verification tool. </update>
<update date="12/2/2010"> Added download link for .NET Framework 4. </update>
<update date="9/8/2012"> Added download link for .NET Framework 4.5 and fixed broken links to other versions of the .NET Framework. </update>
<update date="1/24/2013"> Added a link to the .NET Framework Repair Tool. <update>
A while ago, I published a .NET Framework setup verification tool that can be run to provide a sanity check of the install state of the .NET Framework 1.0, 1.1 and 2.0 on a system. However, there are some limitations in that tool:
As a result, I decided to create a new verification tool, and I have an initial version that I think is ready for more people to use. I wanted to post some information about the tool so that folks can try it out to verify the installation state of the various versions of the .NET Framework on their systems.
Where to download the new verification tool
I have a draft version of a new verification tool that can be used to verify all versions of the .NET Framework (1.0, 1.1, 2.0, 2.0 SP1, 3.0, 3.0 SP1 and 3.5) on any supported OS and processor architecture. You can find information about the tool and download it from this location:
http://blogs.msdn.com/astebner/pages/8999004.aspx
The UI for the tool is straightforward - it contains a drop-down list box that lets you choose the version of the .NET Framework that you would like to verify and a Verify Now button to initiate the verification process for the chosen product. After verification completes, it will display results for the chosen product and allow you to select additional products to verify.
I have been testing this new version on several systems that I have access to, but there are likely to still be issues where the tool falsely reports errors or misses some error cases. Please let me know if you see any issues while using this tool by posting comments on this blog post or by contacting me directly. If possible, please include information about your scenario and copies of the log files that I describe below so I can continue to make this tool better in the future.
How to run the tool in silent mode
This verification tool supports running in silent mode if you would like to automate the verification process. To run in silent mode, you need to download the verification tool .zip file, extract the file netfx_setupverifier.exe from the .zip file, and then run it using syntax like the following:
netfx_setupverifier.exe /q:a /c:"setupverifier.exe /p <name of product to verify>"
The value that you pass with the /p switch to replace <name of product to verify> in this example must exactly match one of the products listed in the file setupverifier.ini that is included in the self-extracting package for the verification tool.
Currently, the verification tool includes the following product names that can be passed in using the /p switch:
For example, if you would like to run the tool in silent mode and verify the install state of the .NET Framework 2.0, you would use a command line like the following:
netfx_setupverifier.exe /q:a /c:"setupverifier.exe /p .NET Framework 2.0"
The verification tool returns the following exit codes:
Logging
This verification tool creates 2 log files by default that can be used to determine what actions the tool is taking and what errors it encounters while verifying a product. The 2 log files are listed below, and they are created in the %temp% directory by default. Note that you can find the %temp% directory by clicking on the Windows start menu, choosing Run, typing %temp% and clicking OK to open the directory in Windows Explorer.
A new pair of log files will be created each time the verification tool is launched. The date and time the tool is launched will be appended to the end of the log file names by default in place of the * in the names listed above. If you want to control the exact names used for the log files, you can use the following command line parameters:
For example, the following command line will allow you to specify non-default names for both log files:
netfx_setupverifier.exe /q:a /c:"setupverifier.exe /l %temp%\my_main_log.txt /e %temp%\my_error_log.txt"
<update date="9/2/2009"> Fixed broken link to the verification tool. </update>