Sunday, May 9, 2010
Who is the leader of the mobile computing?
Try ChromeOS
Wednesday, May 5, 2010
C#: Exception in using () {...}
Tuesday, May 4, 2010
Fixed .NET framework 4.0 error when installing Visual Studio 2010
The error:
- Windows 7 Pro 32bits
- I had VisualStudio 2010 RC installed successfully but removed prior to VS 2010 setup
- I have Visual Studio 2008 installed at the same PC
- My system disk is called I:, not C:
- I turned off all the anti-virus software while installing
- I got the following error in the event viewer after turning on the Installer trace:
Windows update "Update for Windows (KB958488)" could not be installed because of error 2147944003 "Fatal error during installation." (Command line: "wusa.exe "I:\7ef862549a4cbd33ceefb00d4a1c19\Windows6.1-KB958488-v6001-x86.msu" /quiet /norestart")
- I got the following error in the log:
Action: Performing Action on Exe at I:\Users\Billibit\AppData\Local\Temp\Microsoft .NET Framework 4 Setup_4.0.30319\Windows6.1-KB958488-v6001-x86.msu...
[5/3/2010, 22:55:21]Exe (I:\Users\Billibit\AppData\Local\Temp\Microsoft .NET Framework 4 Setup_4.0.30319\Windows6.1-KB958488-v6001-x86.msu) failed with 0x643 - Fatal error during installation. .
[5/3/2010, 22:55:21]PerformOperation on exe returned exit code 1603 (translates to HRESULT = 0x643)
[5/3/2010, 22:55:21]OnFailureBehavior for this item is to Rollback.
...
Final Result: Installation failed with error code: (0x00000643), "Fatal error during installation. " (Elapsed time: 0 00:01:24).
Monday, May 3, 2010
How do I debug a custom action/installer class?
• Add a call in your code to System.Diagnostics.Debugger.Launch. This method opens Just-In-Time debugging and allows you to attach a new debugger to your code.
• Add a call in your code to MessageBox.Show("Debug Me"). When the message box is shown, use Visual Studio to attach to the MessageBox process. Then place breaks (for Visual C# projects) or stops (for Visual Basic projects) in the code.
• Set your debugging preferences to start InstallUtil.exe (which is located in \winnt\Microsoft.net\Framework\version) and pass it your assembly as a parameter. When you press F5, you hit your breakpoint. InstallUtil.exe will run your custom actions the same way that MSI does.