Quantcast
Channel: Microsoft Visual Studio/.Net Framework Setup & Deployment Tips & Tricks
Viewing all 75 articles
Browse latest View live

System.TypeLoadException while executing any .Net Framework 2.0 application

$
0
0

You may find any .Net 2.0 application crashes with an error message "setup.exe has encountered a problem and needs to close"

You may also find the following error message in the Application Event log: EventType clr20r3, P1 <application name>, P2 6.0.3790.1830, P3 42435be1, P4 app_web_7437ep-9, P5 0.0.0.0, P6 433b1670, P7 9, P8 a, P9 system.exception, P10 NIL.

We found that the .Net Framework 2.0 verification tool (http://cid-27e6a35d1a492af7.skydrive.live.com/self.aspx/Blog%7C_Tools/netfx%7C_setupverifier%7C_new.zip) reported the below failure as well:

 [02/13/13,09:59:31] Launching process 'Netfx20TestApplication.exe' now
[02/13/13,09:59:31] Process successfully launched. Waiting 300 seconds for it to complete.
[02/13/13,09:59:53] ****ERROR**** Process 'Netfx20TestApplication.exe' exited with return code -532459699
[02/13/13,09:59:53] Section [Files - .NET Framework netfxperf.dll] - start parsing entries
[02/13/13,09:59:53] File C:\WINDOWS\system32\netfxperf.dll (version 1.1.4322.573) is installed on the system
[02/13/13,09:59:53] Section [Files - .NET Framework netfxperf.dll] - stop parsing entries
[02/13/13,09:59:53] ****ERROR**** Verification failed for product .NET Framework 2.0

We launched the sample.Net 2.0 application in debugger ( http://msdn.microsoft.com/en-us/windows/hardware/gg463009.aspx) and found the below exception and root cause of the failure:

0:000> k
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll -
ChildEBP RetAddr 
WARNING: Stack unwind information not available. Following frames may be wrong.
0012d8ac 79f55b05 KERNEL32!RaiseException+0x3c
0012d90c 7a056a79 mscorwks!DllGetClassObjectInternal+0x27dad
0012d948 7a056b30 mscorwks!GetAddrOfContractShutoffFlag+0xa7d3
0012d974 7a056b41 mscorwks!GetAddrOfContractShutoffFlag+0xa88a
0012da70 79e7b29b mscorwks!GetAddrOfContractShutoffFlag+0xa89b
0012daa0 79e9c9c0 mscorwks!DllRegisterServerInternal+0xe17
0012daa4 79e9c991 mscorwks!CoUninitializeEE+0x179a4
0012daac 79e82ef6 mscorwks!CoUninitializeEE+0x17975
0012daf4 79e82eac mscorwks!DllRegisterServerInternal+0x8a72
0012db3c 79ee16d2 mscorwks!DllRegisterServerInternal+0x8a28
0012db7c 79eee5d1 mscorwks!StrongNameErrorInfo+0x403
0012db80 79eee5a5 mscorwks!StrongNameErrorInfo+0xd302
0012db90 79eee5c2 mscorwks!StrongNameErrorInfo+0xd2d6
0012dc14 7c87c34b mscorwks!StrongNameErrorInfo+0xd2f3
0012dc84 7c854f44 ntdll!RtlpNtMakeTemporaryKey+0x897f
0012dc90 7c83dbea ntdll!RtlIpv4StringToAddressExW+0x1377e
0012dcb4 79e787b7 ntdll!RtlSubAuthorityCountSid+0x413
0012dd10 79ee3707 mscorwks!LogHelp_TerminateOnAssert+0x39f
0012dd28 79e8837d mscorwks!StrongNameErrorInfo+0x2438
0012dd3c 79e86e2f mscorwks!CoUninitializeEE+0x3361


0:000> !pe
PDB symbol for mscorwks.dll not loaded
Exception object: 01258510
Exception type: System.TypeLoadException
Message: Failure has occurred while loading a type.
InnerException: <none>
StackTrace (generated):
    SP       IP       Function
    00000000 00000001 System.Environment.GetResourceFromDefault(System.String)
    0012EC4C 03DB4E91 System.Reflection.TargetInvocationException..ctor(System.Exception)
    00000000 00000001 System.RuntimeTypeHandle.CreateInstance(System.RuntimeType, Boolean, Boolean, Boolean ByRef, System.RuntimeMethodHandle ByRef, Boolean ByRef)
    0012F418 033764AD System.Activator.CreateInstance[[System.__Canon, mscorlib]]()
    0012F434 03376276 WinApp2._0.My.MyProject+ThreadSafeObjectProvider`1[[System.__Canon, mscorlib]].get_GetInstance()
    0012F450 033761C1 WinApp2._0.My.MyProject.get_Application()
    0012F45C 03374253 WinApp2._0.My.MyApplication.Main(System.String[])

StackTraceString: <none>
HResult: 80131522

0:000> !do 01258510
Name: System.TypeLoadException
MethodTable: 03da50a4
EEClass: 03d74f34
Size: 88(0x58) bytes
(C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll)
Fields:

      MT    Field   Offset                 Type VT     Attr    Value Name
00929350  40000b5        4        System.String  0 instance 00000000 _className
03366b2c  40000b6        8 ...ection.MethodBase  0 instance 00000000 _exceptionMethod
00929350  40000b7        c        System.String  0 instance 00000000 _exceptionMethodString
00929350  40000b8       10        System.String  0 instance 0125627c _message
0336a1e8  40000b9       14 ...tions.IDictionary  0 instance 00000000 _data
010d1254  40000ba       18     System.Exception  0 instance 00000000 _innerException
00929350  40000bb       1c        System.String  0 instance 00000000 _helpURL
00926cf0  40000bc       20        System.Object  0 instance 0125b8ec _stackTrace
00929350  40000bd       24        System.String  0 instance 00000000 _stackTraceString
00929350  40000be       28        System.String  0 instance 00000000 _remoteStackTraceString
03367e40  40000bf       34         System.Int32  0 instance        0 _remoteStackIndex
00926cf0  40000c0       2c        System.Object  0 instance 00000000 _dynamicMethods
03367e40  40000c1       38         System.Int32  0 instance -2146233054 _HResult
00929350  40000c2       30        System.String  0 instance 00000000 _source
010d9930  40000c3       3c        System.IntPtr  0 instance        0 _xptrs
03367e40  40000c4       40         System.Int32  0 instance -532459699 _xcode
00929350  4000397       44        System.String  0 instance 00000000 ClassName
00929350  4000398       48        System.String  0 instance 00000000 AssemblyName
00929350  4000399       4c        System.String  0 instance 00000000 MessageArg
03367e40  400039a       50         System.Int32  0 instance        0 ResourceId

0:000> !do 0125627c
Name: System.String
MethodTable: 00929350
EEClass: 00a4184c
Size: 102(0x66) bytes
(C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll)
String: Failure has occurred while loading a type.
Fields:

      MT    Field   Offset                 Type VT     Attr    Value Name

03367e40  4000096        4         System.Int32  0 instance       43 m_arrayLength
03367e40  4000097        8         System.Int32  0 instance       42 m_stringLength
010d0010  4000098        c          System.Char  0 instance       46 m_firstChar
00929350  4000099       10        System.String  0   shared   static Empty

   >> Domain:Value  0014cd90:01251374 <<
010d6fc8  400009a       14        System.Char[]  0   shared   static WhitespaceChars
    >> Domain:Value  0014cd90:01251388 <<


0:000> lmvm mscorlib
start    end        module name
790c0000 79500000   mscorlib   (deferred)            
    Image path: C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll
    Image name: mscorlib.dll
    Has CLR image header, track-debug-data flag not set
    Timestamp:        Tue Oct 23 23:30:35 2007 (471EBC5B)
    CheckSum:         00444046
    ImageSize:        00440000
    File version:    2.0.50727.1433
    Product version:  2.0.50727.1433
    File flags:       0 (Mask 3F)
    File OS:          4 Unknown Win32
    File type:        2.0 Dll
    File date:        00000000.00000000
    Translations:     0409.04b0
    CompanyName:      Microsoft Corporation
    ProductName:      Microsoft® .NET Framework
    InternalName:     mscorlib.dll
    OriginalFilename: mscorlib.dll
    ProductVersion:   2.0.50727.1433
    FileVersion:      2.0.50727.1433 (REDBITS.050727-1400)
    FileDescription:  Microsoft Common Language Runtime Class Library
    LegalCopyright:   © Microsoft Corporation.  All rights reserved.
    Comments:         Flavor=Retail


0:000> lmvm mscorwks
start    end        module name
79e70000 7a3d6000   mscorwks   (export symbols)       C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
    Loaded symbol image file: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
    Image path: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
    Image name: mscorwks.dll
    Timestamp:        Fri Apr 13 03:15:54 2007 (461F2E2A)
    CheckSum:         0056BC8E
    ImageSize:        00566000
    File version:     2.0.50727.832 
    Product version:  2.0.50727.832
    File flags:       0 (Mask 3F)
    File OS:          4 Unknown Win32
    File type:        2.0 Dll
    File date:        00000000.00000000
    Translations:     0409.04b0
    CompanyName:      Microsoft Corporation
    ProductName:      Microsoft® .NET Framework
    InternalName:     mscorwks.dll
    OriginalFilename: mscorwks.dll
    ProductVersion:   2.0.50727.832
    FileVersion:      2.0.50727.832 (QFE.050727-8300)
    FileDescription:  Microsoft .NET Runtime Common Language Runtime - WorkStation
    LegalCopyright:   © Microsoft Corporation.  All rights reserved.
    Comments:         Flavor=Retail


The binary mscorlib.dll version 2.0.50727.1433 was loaded from GAC where loaded mscorwks.dll version was 2.0.50727.832. So there were mismatch version of CLR binaries. Both the files should be at the same level. Hence, we renamed the existing mscorlib.dll at C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll and added the mscorlib.dll version 2.0.50727.832 to GAC from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727.  Both the binaries were at the same level and we were  able to run the sample .Net 2.0 application successfully. Another  solution would be to install the .Net Framework 2.0 SP2 http://www.microsoft.com/en-us/download/details.aspx?id=1639 to upgrade all the core binaries.


Installation of an MSI package shows "Assembly Error: The assembly is built by a runtime newer than the currently loaded runtime, and cannot be loaded." error

$
0
0

While working on a customer case involving a Windows installer based package, we came across an interesting issue that was preventing the installation of the MSI package on a particular computer.

The setup failed with the following error message that we captured from a verbose log.

Error message: Assembly Error: The assembly is built by a runtime newer than the currently loaded runtime, and cannot be loaded.

Log snippet:

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------

MSI (s) (B4:98) [00:42:12:401]: Executing op: SetTargetFolder(Folder=C:\Program Files (x86)\)

MSI (s) (B4:98) [00:42:12:401]: Executing op: SetSourceFolder(Folder=1\ProgramF\boziguka\|Program Files\Global Assembly Cache\)

MSI (s) (B4:98) [00:42:12:401]: Executing op: ChangeMedia(,MediaPrompt=Please insert the disk: [ProductName] ,MediaCabinet=Cabs.m4,BytesPerTick=32768,CopierType=2,ModuleFileName=C:\Windows\Installer\30895a.msi,,,,,IsFirstPhysicalMedia=1)

MSI (s) (B4:98) [00:42:12:401]: Executing op: AssemblyCopy(SourceName=nobzwco5.dll|CustomerPrivate.dll,SourceCabKey=CustomerPrivate.dll.A15E27FB_AF96_4B01_A086_134C0E9A760B,

DestName=CustomerPrivate.dll,Attributes=512,FileSize=108544,PerTick=32768,,VerifyMedia=1,,,,,ComponentId={20D5E9E9-8110-45C3-9320-DA65098CBBA9},IsManifest=1,,,AssemblyMode=0,)

MSI (s) (B4:98) [00:42:12:401]: Source for file 'CustomerPrivate.dll.A15E27FB_AF96_4B01_A086_134C0E9A760B' is compressed

InstallFiles: File: CustomerPrivate.dll,  Directory: ,  Size: 108544

MSI (s) (B4:98) [00:42:12:401]: Note: 1: 2360

MSI (s) (B4:98) [00:42:12:401]: Note: 1: 2360

MSI (s) (B4:98) [00:42:12:401]: Note: 1: 2360

MSI (s) (B4:58) [00:42:12:651]: Assembly Error:The assembly is built by a runtime newer than the currently loaded runtime, and cannot be loaded.

MSI (s) (B4:58) [00:42:12:667]: Note: 1: 1935 2:  3: 0x8013101B 4: IStream 5: Commit 6: 

MSI (s) (B4:98) [00:42:12:667]: Note: 1: 1304 2: CustomerPrivate.dll

DEBUG: Error 2835:  The control ErrorIcon was not found on dialog ErrorDialog

Internal Error 2835. ErrorIcon, ErrorDialog

Error 1304. Error writing to file: CustomerPrivate.dll.  Verify that you have access to that directory.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------

On further investigation, we found that we were getting the error message on a machine that only had .NET Framework 3.5 SP1, where the runtime is still at 2.0 version.

Later, we also found that the component that is installing the DLL file had the following condition

MsiNetAssemblySupport > "2.0"

This means, the application needed a .Net runtime version greater than 2.0 to be installed prior to running this setup package.

Resolution: Installing .NET Framework 4.0 fixed this issue.

Further reference:

http://msdn.microsoft.com/en-us/library/windows/desktop/aa370325(v=vs.85).aspx

 

Content By : Keshav Jain.

Error HRESULT E_FAIL has been returned from a call to a COM component

$
0
0

There are scenarios where you might find the following errors/exceptions:

---------------------------
Setup
---------------------------
Setup encountered an unexpected error in the package contents.The package will not be installed.Please contact your vendor for a new package.
---------------------------
OK  
---------------------------


---------------------------
Microsoft Visual Studio
---------------------------
Error HRESULT E_FAIL has been returned from a call to a COM component.
---------------------------
OK  
---------------------------

Scenario One: The Microsoft Visual Studio 2010 install crashes immediately after launching the Setup.

I ran process explorer tool http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx before launching the VS 2010 setup and I found the below information:

Setup.exe 2436 RegQueryValue HKCR\Wow6432Node\CLSID\{F5078F32-C551-11D3-89B9-0000F81FE221}\InProcServer32\(Default) SUCCESS Type: REG_EXPAND_SZ, Length: 66, Data: %SystemRoot%\System32\msxml3.dll
Setup.exe 2436 RegQueryValue HKCR\Wow6432Node\CLSID\{F5078F32-C551-11D3-89B9-0000F81FE221}\InProcServer32\(Default) SUCCESS Type: REG_EXPAND_SZ, Length: 66, Data: %SystemRoot%\System32\msxml3.dll
Setup.exe 2436 RegQueryValue HKCR\Wow6432Node\CLSID\{F5078F32-C551-11D3-89B9-0000F81FE221}\InProcServer32\(Default) SUCCESS Type: REG_EXPAND_SZ, Length: 66, Data: %SystemRoot%\System32\msxml3.dll

From the above information I found that it was using 64 bit msxml3.dll from a 32 bit registry location( com registration). So registering msxml3.dll appropriately resolved the issue.

Start—>Run—> regsvr32  %SystemRoot%\System32\msxml3.dll

Start—>Run—> regsvr32  %SystemRoot%\SysWOW64\msxml3.dll

 Scenario Two:

The Microsoft Visual Studio 2010 IDE  crashes while creating OR debugging a web application project.

This above error occurs because of corrupted Cache of Visual Studio 2010. In order to resolve the issue just delete the project Cache from the below location:

C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplatesCache

C:\Program Files(x86)\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplatesCache

Then run "devenv.exe /setup" to re-build the cache.

Start—>Run—> C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe  /setup

"Unknown trust provider" Error while installing .NET Framework 4.0.

$
0
0

 

Error messages found from the installation logs:

1) Final Result: Installation failed with error code: (0x800B0001), "Unknown trust provider. " (Elapsed time: 0 00:00:12).

2) Windows update could not be installed because of error 2359302 "" (Command line: "wusa.exe "D:\7176a536af72f98249ad\Windows6.1-KB958488-v6001-x64.msu" /quiet /norestart")

3) MSI (s) (8C:EC) [09:34:30:829]: Product: Microsoft .NET Framework 4 Client Profile -- Error 1330. A file that is required cannot be installed because the cabinet file “<Path>\netfx_core.mzz”  has an invalid digital signature.  This may indicate that the cabinet file is corrupt.  Error 1 was returned by WinVerifyTrust.

While working on the issue it was found that the Digital Signature tab was missing from the file properties page.

File Properties page

We also noticed an error in the Windows Update shown as WindowsUpdate_800B0001

Searching for this error lead to the following page:
http://windows.microsoft.com/is-is/windows7/windows-update-error-800b0001

As per the steps motioned in the above page we tried to use the System Update Readiness Tool available at the following page.

http://support.microsoft.com/kb/947821

The  System Update Readiness Tool was able to fix the Windows Update related issue and that was in turn able to resolved the .Net Framework 4.0 installation issue.

Content By : Keshav Jain.

Visual Studio 2012 Update 3 unexpectedly shows installation UI in a language that you are not familiar with, while everything else on the machine appears in English

$
0
0

Issue Description:

Visual Studio 2012 Update 3 unexpectedly shows installation UI in a language that you are not familiar with, while everything else on the machine including the Visual studio IDE appears to be in English

Environment:

Windows 7 SP1 (x86 and x64)

Windows 8 (x86 and x64)

Windows Server 2008 R2 (x64)

Windows Server 2012 (x64)

Symptom and inference:

Launching the installation of Visuals Studio 2012 update 3 regardless of whether you have downloaded the update from http://www.microsoft.com/visualstudio/eng/downloads#d-visual-studio-2012-update or from http://www.microsoft.com/en-us/download/details.aspx?id=39305 or whether or not you have used the /layout switch for to get the complete package, it shows up like this (or in another language that you are not familiar with):

clip_image001

Resolution:

You need to open the registry editor and navigate to the following path:

Path: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\General

At this location you wil find a DWORD key named ‘UILanguage’

Check the value for this key ensuring that radio button for ‘Decimal’ is selected; Modify it to 1033, which is the standard locale ID (LCID) language code for US English. http://msdn.microsoft.com/en-US/goglobal/bb964664.aspx gives you the exhaustive list of locale ID (LCID) language codes. Note that this list is not specific to Visual Studio and not all of these would take effect.

As soon as this change is made (no reboot required), you will get the screen that you expect to see-

clip_image002

The value change is likely to have occurred during the installation of a 3rd party add in (and you might not have noticed this change, as the key does not affect the core IDE language!).

 

-Content By

Ritwik Sinha

An error occurred creating the configuration section handler for userSettings/Microsoft.SqlServer.Configuration.LandingPage.Properties

$
0
0

You may receive the below error message while installing Microsoft® SQL Server® 2008 Express Setup as a part of the Visual Studio Setup.

System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for userSettings/Microsoft.SqlServer.Configuration.LandingPage.Properties.Settings: Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.

As per the fusion log:

The operation failed.  
Bind result: hr = 0x80070002. The system cannot find the file specified.

I launched the Setup in debugger and captured a crash dump.  I found the following information from the crash dump:

0:000> kpnL50  
# ChildEBP RetAddr 
00 0017e788 771066c9 ntdll!KiFastSystemCallRet(void)   
01 0017e78c 04bc8e08 user32!NtUserWaitMessage(void)+0xc   
02 0017e820 04bc88f7 System_Windows_Forms_ni!System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(<HRESULT 0x80004001>)+0x3c8   
03 0017e878 04bc8741 System_Windows_Forms_ni!System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(<HRESULT 0x80004001>)+0x177   
04 0017e8a8 050de597 System_Windows_Forms_ni!System.Windows.Forms.Application+ThreadContext.RunMessageLoop(<HRESULT 0x80004001>)+0x61   
05 0017e8c0 05112d98 System_Windows_Forms_ni!System.Windows.Forms.Application.RunDialog(<HRESULT 0x80004001>)+0x33   
06 0017e94c 05112faf System_Windows_Forms_ni!System.Windows.Forms.Form.ShowDialog(<HRESULT 0x80004001>)+0x370   
07 0017e98c 050df6f2 System_Windows_Forms_ni!System.Windows.Forms.Form.ShowDialog(<HRESULT 0x80004001>)+0x7   
08 0017e98c 050e80c6 System_Windows_Forms_ni!System.Windows.Forms.Application+ThreadContext.OnThreadException(<HRESULT 0x80004001>)+0xd2   
09 0017e998 050eab4c System_Windows_Forms_ni!System.Windows.Forms.Control.WndProcException(<HRESULT 0x80004001>)+0x16   
0a 0017ea54 04bb8512 System_Windows_Forms_ni!System.Windows.Forms.Control+ControlNativeWindow.OnThreadException(<HRESULT 0x80004001>)+0xc   
0b 0017ea54 002b0a34 System_Windows_Forms_ni!System.Windows.Forms.NativeWindow.Callback(<HRESULT 0x80004001>)+0x72

0:000> !pe   
Exception object: 01d017bc   
Exception type: System.Configuration.ConfigurationErrorsException   
Message:An error occurred creating the configuration section handler for userSettings/Microsoft.SqlServer.Configuration.LandingPage.Properties.Settings: Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.   
InnerException: System.IO.FileNotFoundException, use !PrintException 01cf2048 to see more   
StackTrace (generated):   
    SP       IP       Function   
    0017E5A0 6423FA81 System_Configuration_ni!System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(System.String, Boolean ByRef)+0x111   
    0017E658 6423F8C8 System_Configuration_ni!System.Configuration.BaseConfigurationRecord.GetSectionRecursive(System.String, Boolean, Boolean, Boolean, Boolean, System.Object ByRef, System.Object ByRef)+0x598   
    0017E6F0 6423F309 System_Configuration_ni!System.Configuration.BaseConfigurationRecord.GetSection(System.String, Boolean, Boolean)+0x39   
    0017E70C 6423F2B9 System_Configuration_ni!System.Configuration.BaseConfigurationRecord.GetSection(System.String)+0x9   
    0017E710 64233821 System_Configuration_ni!System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(System.String)+0x41   
    0017E724 64242B4F System_Configuration_ni!System.Configuration.ConfigurationManager.GetSection(System.String)+0x4f   
    0017E730 79900220 System_ni!System.Configuration.ClientSettingsStore.ReadSettings(System.String, Boolean)+0xa0   
    0017E770 798DAB09 System_ni!System.Configuration.LocalFileSettingsProvider.GetPropertyValues(System.Configuration.SettingsContext, System.Configuration.SettingsPropertyCollection)+0x79   
    0017E7C4 798DA9B3 System_ni!System.Configuration.SettingsBase.GetPropertiesFromProvider(System.Configuration.SettingsProvider)+0x103   
    0017E800 798FF815 System_ni!System.Configuration.SettingsBase.GetPropertyValueByName(System.String)+0x85   
    0017E814 798FF73B System_ni!System.Configuration.SettingsBase.get_Item(System.String)+0x3b   
    0017E844 798FF5C7 System_ni!System.Configuration.ApplicationSettingsBase.GetPropertyValue(System.String)+0x37   
    0017E858 798FF53B System_ni!System.Configuration.ApplicationSettingsBase.get_Item(System.String)+0x3b   
   0017E888 005D547A LandingPage!Microsoft.SqlServer.Configuration.LandingPage.Properties.Settings.get_WindowPlacement()+0x12   
    0017E898 005D1704 LandingPage!Microsoft.SqlServer.Configuration.LandingPage.LandingPageForm.OnLoad(System.EventArgs)+0x54   
    0017E8D4 04BC4145 System_Windows_Forms_ni!System.Windows.Forms.Form.OnCreateControl()+0x55   
    0017E8E0 04BB6D71 System_Windows_Forms_ni!System.Windows.Forms.Control.CreateControl(Boolean)+0x181   
    0017E91C 04BB6B74 System_Windows_Forms_ni!System.Windows.Forms.Control.CreateControl()+0x24   
    0017E934 04BC3008 System_Windows_Forms_ni!System.Windows.Forms.Control.WmShowWindow(System.Windows.Forms.Message ByRef)+0x98   
    0017E970 04BB8966 System_Windows_Forms_ni!System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)+0x2b6   
    0017E9C8 04BC1DAA System_Windows_Forms_ni!System.Windows.Forms.ScrollableControl.WndProc(System.Windows.Forms.Message ByRef)+0x2a   
    0017E9D4 04BC1D60 System_Windows_Forms_ni!System.Windows.Forms.ContainerControl.WndProc(System.Windows.Forms.Message ByRef)+0x10   
    0017E9DC 04BC2F51 System_Windows_Forms_ni!System.Windows.Forms.Form.WmShowWindow(System.Windows.Forms.Message ByRef)+0x41   
    0017E9EC 04BC1B34 System_Windows_Forms_ni!System.Windows.Forms.Form.WndProc(System.Windows.Forms.Message ByRef)+0x154   
    0017EA00 04BB86A0 System_Windows_Forms_ni!System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)+0x10   
    0017EA08 04BB8621 System_Windows_Forms_ni!System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)+0x31   
    0017EA1C 04BB84FA System_Windows_Forms_ni!System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)+0x5a

StackTraceString: <none>  
HResult: 80131902   
0:000> !do 01d017bc   
Name: System.Configuration.ConfigurationErrorsException   
MethodTable: 64246b18   
EEClass: 642127dc   
Size: 92(0x5c) bytes   
(C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll)   
Fields:   
      MT    Field   Offset                 Type VT     Attr    Value Name   
788d0d28  40000b5        4        System.String  0 instance 01d0d690 _className   
788d019c  40000b6        8 ...ection.MethodBase  0 instance 00000000 _exceptionMethod   
788d0d28  40000b7        c        System.String  0 instance 00000000 _exceptionMethodString   
788d0d28  40000b8       10        System.String  0 instance 01d01c30 _message   
788ca684  40000b9       14 ...tions.IDictionary  0 instance 00000000 _data   
788d0ebc  40000ba       18     System.Exception  0 instance 01cf2048 _innerException   
788d0d28  40000bb       1c        System.String  0 instance 00000000 _helpURL   
788d0944  40000bc       20        System.Object  0 instance 01d023e0 _stackTrace   
788d0d28  40000bd       24        System.String  0 instance 00000000 _stackTraceString   
788d0d28  40000be       28        System.String  0 instance 00000000 _remoteStackTraceString   
788d2f74  40000bf       34         System.Int32  1 instance        0 _remoteStackIndex   
788d0944  40000c0       2c        System.Object  0 instance 00000000 _dynamicMethods   
788d2f74  40000c1       38         System.Int32  1 instance -2146232062 _HResult   
788d0d28  40000c2       30        System.String  0 instance 00000000 _source   
788d35f0  40000c3       3c        System.IntPtr  1 instance        0 _xptrs   
788d2f74  40000c4       40         System.Int32  1 instance -532459699 _xcode   
788d0d28  400315d       44        System.String  0 instance 00000000 _filename   
788d2f74  400315e       48         System.Int32  1 instance        0 _line   
788d0d28  4000253       4c        System.String  0 instance 01cd4434 _firstFilename   
788d2f74  4000254       54         System.Int32  1 instance        5 _firstLine   
00000000  4000255       50              SZARRAY  0 instance 00000000 _errors

0:000> !do 01cf2048   
Name: System.IO.FileNotFoundException   
MethodTable: 788b7638   
EEClass: 78684310   
Size: 84(0x54) bytes   
(C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll)   
Fields:   
      MT    Field   Offset                 Type VT     Attr    Value Name   
788d0d28  40000b5        4        System.String  0 instance 00000000 _className   
788d019c  40000b6        8 ...ection.MethodBase  0 instance 00000000 _exceptionMethod   
788d0d28  40000b7        c        System.String  0 instance 00000000 _exceptionMethodString   
788d0d28  40000b8       10        System.String  0 instance 01cf24b8 _message   
788ca684  40000b9       14 ...tions.IDictionary  0 instance 00000000 _data   
788d0ebc  40000ba       18     System.Exception  0 instance 00000000 _innerException   
788d0d28  40000bb       1c        System.String  0 instance 00000000 _helpURL   
788d0944  40000bc       20        System.Object  0 instance 01cf29ec _stackTrace   
788d0d28  40000bd       24        System.String  0 instance 00000000 _stackTraceString   
788d0d28  40000be       28        System.String  0 instance 00000000 _remoteStackTraceString   
788d2f74  40000bf       34         System.Int32  1 instance        0 _remoteStackIndex   
788d0944  40000c0       2c        System.Object  0 instance 00000000 _dynamicMethods   
788d2f74  40000c1       38         System.Int32  1 instance -2147024894 _HResult   
788d0d28  40000c2       30        System.String  0 instance 00000000 _source   
788d35f0  40000c3       3c        System.IntPtr  1 instance        0 _xptrs   
788d2f74  40000c4       40         System.Int32  1 instance -532459699 _xcode   
788d0d28  4001bb3       44        System.String  0 instance 00000000 _maybeFullPath   
788d0d28  4001bcf       48        System.String  0 instance 01cf15f8 _fileName   
788d0d28  4001bd0       4c        System.String  0 instance 01cf169c _fusionLog

0:000> !do 01cf24b8    
Name: System.String   
MethodTable: 788d0d28   
EEClass: 7868d66c   
Size: 698(0x2ba) bytes   
(C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll)   
String: Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.   
Fields:   
      MT    Field   Offset                 Type VT     Attr    Value Name   
788d2f74  4000096        4         System.Int32  1 instance      341 m_arrayLength   
788d2f74  4000097        8         System.Int32  1 instance      178 m_stringLength   
788d1a08  4000098        c          System.Char  1 instance       43 m_firstChar   
788d0d28  4000099       10        System.String  0   shared   static Empty   
    >> Domain:Value  00375b90:01b51198 <<   
788d1958  400009a       14        System.Char[]  0   shared   static WhitespaceChars   
    >> Domain:Value  00375b90:01b51720 <<

I found that there was an invalid entry in the userSettings section of the Microsoft.SqlServer.Configuration.LandingPage.Properties.Settings file. So the resolution was to delete this configuartion file or delete the folder "Microsoft_Corporation". Since it is a cached copy location, there is no harm in doing it. In order to resolve the issue, try running the command: rd /s /q %localappdata%\Microsoft_Corporation

Installation of Visual Studio 2012 Update 3 fails with error ‘The pipe is being closed’

$
0
0

ISSUE DESCRIPTION:

Installation of Visual Studio 2012 Update 3 fails with error ‘The pipe is being closed’

ENVIRONMENT:

Windows 7 SP1 (x86 and x64)

Windows 8 (x86 and x64)

Windows Server 2008 R2 (x64)

Windows Server 2012 (x64)

SYMPTOM:

The Installation of Visual Studio 2012 Update 3 fails with errors ‘The pipe is being closed’ for several components and then finally with ‘User Cancelled Installation’ (I know you didn’t cancel the installation!!).

clip_image002

RESOLUTION:

To resolve this, you first need to download the complete .iso file for the update 3 from this direct link http://go.microsoft.com/fwlink/?LinkId=301705

Once you have this downloaded, and extracted/mounted/burnt you need to open an administrative CMD window and navigate to ...\packages\WinACK\ and install these 2 patches:

I. Windows App Certification Kit x64-x86_en-us.msp

II. Windows App Certification Kit Native Components-x64_en-us.msp

Having installed this, you can then run the setup for Visual Studio 2012 Update 3 using the same .iso file that you had downloaded.

 

Content by-

Ritwik Sinha

How to add a registry key (InstallLocation) that points to the full path to an application's primary folder

$
0
0

REQUIREMENT-

To add a registry key (InstallLocation) that can point to the full path to the application's primary folder

RESOLUTION-

Any application that gets installed using the windows installer engine, stores the ‘full path to the application's primary folder’ as a string value ‘InstallLocation’ under either of these two registry key : 

Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{product_code}\

OR

Key:  HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{product_code}

Value of the "InstallLocation" is added by the public property ‘ARPINSTALLLOCATION’ and typically this needs to be set by a custom action. Here is the sample custom action that can be added to the installer project-

Action: SetARPINSTALLLOCATION             

Type: 51                        

Source: ARPINSTALLLOCATION                           

Target: [TARGETDIR]

In my case I am adding this custom action using Orca, this is how it looks like:

clip_image002

This action also needs to be added under the Execute sequence after the CostFinalize Action.

clip_image004

 

Content by: Keshav Deo Jain


Installation of Visual Studio 2012 fails with error message ‘Cannot find requested object’ on final screen

$
0
0

ISSUE DESCRIPTION:

Installation of Visual Studio 2012 fails with error message <component_name> ‘Cannot find requested object’ on final screen

ENVIRONMENT:

Windows 7 SP1 (x86 and x64)

Windows 8 (x86 and x64)

Windows Server 2008 R2 (x64)

Windows Server 2012 (x64)

SYMPTOM AND INFERENCE:

The installation of Visual Studio 2012 fails on the machine within a couple of minutes from the launch with the following screen-

clip_image002

And then with-

Problem signature:

  Problem Event Name:                        VSSetup

  P1:                                                        vs_ultimate

  P2:                                                        11.0.50727.01

  P3:                                                        11.0.50727

  P4:                                                        Install

  P5:                                                        vsbsln_neu_28

  P6:                                                        Verify

  P7:                                                        0x80092009

  P8:                                                        unknown

  P9:                                                        unknown

  OS Version:                                          6.1.7601.2.1.0.256.4

  Locale ID:                                             1033

 

Also when you navigate to %temp%, you will find a log file named similar to ‘dd_vs_ultimate_xxx’. This will contain the following excerpt-

 -------------------------------------------------------------------------------------------------------------------

[2EA4:2680][2013-08-18T04:24:19]: MUX:  Source confirmed

[2EA4:2680][2013-08-18T04:24:19]: Acquiring package: vsbsln_neu_28, payload: cab9983B5EBA09B050DF52143E9009A7DF5, copy from: D:\Setup\Visual Studio 2012 Ultimate\packages\64bitPrereq\x64\VS_Prerequisites_x64_neutral.cab

[2DC8:212C][2013-08-18T04:24:19]: Error 0x80092009: Failed to get authenticode certificate embedded in: C:\ProgramData\Package Cache\.unverified\cab9983B5EBA09B050DF52143E9009A7DF5

[2DC8:212C][2013-08-18T04:24:19]: Error 0x80092009: Failed to verify signature of payload: cab9983B5EBA09B050DF52143E9009A7DF5

[2DC8:212C][2013-08-18T04:24:19]: Failed to verify payload: cab9983B5EBA09B050DF52143E9009A7DF5 at path: C:\ProgramData\Package Cache\.unverified\cab9983B5EBA09B050DF52143E9009A7DF5, error: 0x80092009. Deleting file.

[2DC8:212C][2013-08-18T04:24:19]: Error 0x80092009: Failed to cache payload: cab9983B5EBA09B050DF52143E9009A7DF5

[2EA4:2680][2013-08-18T04:24:19]: MUX:  Verify Failed.

-------------------------------------------------------------------------------------------------------------------

The installation of Visual Studio 2012 can fail at any of the components, and accordingly you might get -

clip_image004

 

And correspondingly-

 -------------------------------------------------------------------------------------------------------------------

[2334:2944][2013-08-18T04:45:19]: MUX:  Source confirmed

[2334:2944][2013-08-18T04:45:19]: Acquiring package: vs_professionalcore, payload: cab67C0D8636C1BBC76B71D3B33D4DBB2AC, copy from: D:\Setup\Visual Studio 2012 Ultimate\packages\professionalcore\Setup\cab1.cab

[2538:3280][2013-08-18T04:45:19]: Error 0x80092009: Failed to get authenticode certificate embedded in: C:\ProgramData\Package Cache\.unverified\cab67C0D8636C1BBC76B71D3B33D4DBB2AC

[2538:3280][2013-08-18T04:45:19]: Error 0x80092009: Failed to verify signature of payload: cab67C0D8636C1BBC76B71D3B33D4DBB2AC

[2538:3280][2013-08-18T04:45:19]: Failed to verify payload: cab67C0D8636C1BBC76B71D3B33D4DBB2AC at path: C:\ProgramData\Package Cache\.unverified\cab67C0D8636C1BBC76B71D3B33D4DBB2AC, error: 0x80092009. Deleting file.

[2538:3280][2013-08-18T04:45:19]: Error 0x80092009: Failed to cache payload: cab67C0D8636C1BBC76B71D3B33D4DBB2AC

[2334:2944][2013-08-18T04:45:19]: MUX:  Verify Failed.

-------------------------------------------------------------------------------------------------------------------

The installation is failing due to the corruption of one of the cab files corresponding to the component listed in the error/log file (for eg. D:\Setup\Visual Studio 2012 Ultimate\packages\64bitPrereq\x64\VS_Prerequisites_x64_neutral.cab and D:\Setup\Visual Studio 2012 Ultimate\packages\professionalcore\Setup\cab1.cab in the two cases illustrated above)

RESOLUTION:

To handle the issue, you first need to correctly download the .iso for Visual Studio 2012 from your MSDN downloads page, or from http://www.microsoft.com/visualstudio/eng/downloads as the case may be.

 

Here is how you can calculate the hash value that you will need to compare against the one listed on the Visual Studio 2012 download page-

1. Download the File Checksum Integrity Verifier utility (Windows-KB841290-x86-ENU.exe) from http://support.microsoft.com/kb/841290

2. Extract (by execution) ‘Windows-KB841290-x86-ENU.exe’ to get ‘fciv.exe’

3. Start >> run >> CMD

4. <Extraction_Path>\fciv.exe -md5 -sha1 <VS2012_Download_Path>\<VS2012_iso>

     Eg. C:\Users\ritsinha>C:\Users\ritsinha\Desktop\fciv.exe -md5 -sha1 "D:\Setup\Visual Studio\vs_ultimate.iso"

More at http://support.microsoft.com/kb/889768!

 

Once you are sure that the value calculated matches, you can launch the Visual Studio 2012 setup. You will see a screen similar to-

clip_image006

And you will have to go ahead with the ‘Uninstall’ option. This should get you to this screen -

clip_image008

Once this is done, you can re-launch the setup for Visual Studio 2012 and this time it should run through successfully.

 

Content by-

Ritwik Sinha

Visual Studio IDE may crash without any error message

$
0
0

While launching Visual Studio 2012/2010 IDE, Visual Studio IDE may crash without any error message. I launched the devenv.exe in the debugger and took a crash dump. You can also run the following command to capture a crash dump: cscript adplus.vbs -crash –sc "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe"

After debugging I found the below Call Stack and the exception:

0:000> kL  
ChildEBP RetAddr 
00ebe444 73c390bf KERNELBASE!RaiseException+0x6c   
00ebe4e8 73d70a4c clr!RaiseTheExceptionInternalOnly+0x276   
00ebe500 73d70c7d clr!RaiseTheException+0x86   
00ebe528 73d70cad clr!RealCOMPlusThrowWorker+0x72   
(Inline) -------- clr!RealCOMPlusThrow+0x23   
00ebe55c 73cefae6 clr!RealCOMPlusThrow+0x2f   
00ebea44 73b63fbe clr!MethodTable::DoRunClassInitThrowing+0x382   
00ebeacc 73b64022 clr!JIT_GetSharedNonGCStaticBase_Helper+0x85   
00ebeb14 06c82520 clr!JIT_GetSharedNonGCStaticBase_Portable+0x2f   
00ebeb14 06c82520 WindowsBase!MS.Win32.HwndSubclass.HookWindowProc(IntPtr, WndProc, IntPtr)+0x50   
00ebeb24 06c82292 WindowsBase!MS.Win32.HwndSubclass.HookWindowProc(IntPtr, WndProc, IntPtr)+0x50   
00ebeb64 0347a24d WindowsBase!MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)+0x5a   
00ebeb98 750377d8 CLRStub[StubLinkStub]@9f897f120347a24d   
00ebebc4 750378cb user32!InternalCallWinProc+0x23   
00ebec40 75037b6f user32!UserCallWinProcCheckWow+0x100   
00ebeca4 7503e4e0 user32!DispatchClientMessage+0x15d   
00ebecdc 77942c92 user32!__fnINOUTLPPOINT5+0x2e   
00ebecf0 0160f320 ntdll!KiUserCallbackDispatcher+0x2e

0:000> !pe  
Exception object: 04041f58   
Exception type:   System.TypeInitializationException   
Message:          The type initializer for 'MS.Win32.ManagedWndProcTracker' threw an exception.   
InnerException:   System.BadImageFormatException, Use !PrintException 04040794 to see more.

StackTrace (generated):   
    SP       IP       Function   
    00EBEAEC 06C82964 WindowsBase!MS.Win32.ManagedWndProcTracker.TrackHwndSubclass(MS.Win32.HwndSubclass, IntPtr)+0x2c   
    00EBEB1C 06C82520 WindowsBase!MS.Win32.HwndSubclass.HookWindowProc(IntPtr, WndProc, IntPtr)+0x50   
    00EBEB34 06C82292 WindowsBase!MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)+0x5a

StackTraceString: <none>  
HResult: 80131534

0:000> !PrintException 04040794   
Exception object: 04040794   
Exception type:   System.BadImageFormatException   
Message:          Bad IL range.   
InnerException:   <none>   
StackTrace (generated):   
    SP       IP       Function   
    00000000 00000001 WindowsBase!MS.Internal.ShutDownListener..ctor(System.Object, MS.Internal.ShutDownEvents)+0x2   
    00EBE3F4 06C82ACA WindowsBase!MS.Win32.ManagedWndProcTracker+ManagedWndProcTrackerShutDownListener..ctor()+0xa   
    00EBE3F8 06C82AA7 WindowsBase!MS.Win32.ManagedWndProcTracker..cctor()+0x9f

StackTraceString: <none>  
HResult: 8007000b

0:000> .frame06   
06 00ebea44 73b63fbe clr!MethodTable::DoRunClassInitThrowing+0x382

0:000> dv /v /t  
@esi              class MethodTable * this = 0x06c9544c    
00ebe590          class GCCoop __gcHolder = class GCCoop   
00ebe5f8          class AppDomain * pDomain = 0x01079850   
00ebe5dc          class Thread * pThread = 0x010be9f8   
@edi              class ListLock * _pLock = 0x061dd010   
00ebe600          class Wrapper<ListLock *,&ListLock::HolderEnter,&ListLock::HolderLeave,0,&CompareDefault<ListLock *>,2,1> pInitLock = class Wrapper<ListLock *,&ListLock::HolderEnter,&ListLock::HolderLeave,0,&CompareDefault<ListLock *>,2,1>   
<unavailable>     struct MethodTable::DoRunClassInitThrowing::__l18::_gc gc = <value unavailable>   
<unavailable>     class ListLockEntry * pEntry = <value unavailable>   
<unavailable>     class FrameWithCookie<GCFrame> __gcframe = <value unavailable>   
<unavailable>     unsigned long hOrigInitException = <value unavailable>   
<unavailable>     class InlineSString<1024> _ssclsname_w_ = <value unavailable>   
<unavailable>     wchar_t * wszName = <value unavailable>   
00ebe5d8          unsigned long hNewInitException = 0x6c82938   
<unavailable>     class CLRException::HandlerState __state = <value unavailable>   
<unavailable>     class CAutoTryCleanup<CLRException::HandlerState> __autoCleanupTry = <value unavailable>   
00ebe59c          class Exception * __pExceptionRaw = 0x73b6c86f   
<unavailable>     class CLRLastThrownObjectException __defaultException = <value unavailable>   
<unavailable>     class ExceptionHolderTemplate<Exception> __pException = <value unavailable>   
<unavailable>     class ListLockEntry::LockHolder pLock = <value unavailable>   
<unavailable>     class ReleaseHolder<ListLockEntry> pEntry = <value unavailable>   
<unavailable>     struct MethodTable::DoRunClassInitThrowing::__l80::_gc gc = <value unavailable>   
00ebe574          class FrameWithCookie<GCFrame> __gcframe = class FrameWithCookie<GCFrame>   
<unavailable>     class InlineSString<1024> _ssclsname_w_ = <value unavailable>   
@ebx              wchar_t * wszName = 0x00ebe628 "MS.Win32.ManagedWndProcTracker"   
<unavailable>     class CLRException::HandlerState __state = <value unavailable>   
<unavailable>     class CAutoTryCleanup<CLRException::HandlerState> __autoCleanupTry = <value unavailable>   
00ebe598          class Exception * __pExceptionRaw = 0x00ebe920   
<unavailable>     class CLRLastThrownObjectException __defaultException = <value unavailable>   
<unavailable>     class ExceptionHolderTemplate<Exception> __pException = <value unavailable>

0:000> !dumpmt 0x06c9544c  
EEClass:         06c48194   
Module:          03473d48   
Name:            MS.Win32.ManagedWndProcTracker   
mdToken:         020002a2   
File:           C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll   
BaseSize:        0xc   
ComponentSize:   0x0   
Slots in VTable: 11   
Number of IFaces in IFaceMap: 0

I saved the module WindowsBase.dll locally by running the below command:

0:000> !savemodule 06da0000 C:\WindowsBase.dll

From the Visual Studio command prompt, I ran the following command to validate the MSIL and metadata: C:\>peverify  WindowsBase.dll

Microsoft (R) .NET Framework PE Verifier.  Version  4.0.30319.1  
Copyright (c) Microsoft Corporation.  All rights reserved.

[MD]: Error: Method has invalid local signature token (0x01af0039). [token:0x06000AFC]    
1 Error(s) Verifying C:\WindowsBase.dll

Hence, I copied the file WindowsBase.dll  from an another working system and launched Visual Studio IDE successfully.

DDSet_Error: CacheGACAssembly failed

$
0
0

The Microsoft .Net Framework 4.0 update KB2468871 may fail without any error message or the setup may crash almost at the end. You can find the below error messages in the log file (KB2468871v2_***_***-Microsoft .NET Framework 4 Client Profile):

08/07/13 11:57:37 DDSet_Entry: CacheGACAssembly started - Caching GAC Assemblies     
08/07/13 11:57:37 DDSet_Status: CustomActionData: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\;C:\Windows\Microsoft.NET\Framework\v4.0.30319\GAC26267;C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Xml.Serialization.dll      
08/07/13 11:57:37 DDSet_Status: Directory exists: C:\Windows\Microsoft.NET\Framework\v4.0.30319\GAC26267      
08/07/13 11:57:37 DDSet_Status: Attempting to copy C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Xml.Serialization.dll to C:\Windows\Microsoft.NET\Framework\v4.0.30319\GAC26267\System.Xml.Serialization.dll      
08/07/13 11:57:37 DDSet_Error: Could not copy file: C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Xml.Serialization.dll         
08/07/13 11:57:37 DDSet_Error: CacheGACAssembly failed
        
08/07/13 11:57:37 DDSet_Exit: CacheGACAssembly ended with return value 1603      
CustomAction CA_CacheGACAssemblyDeferred.3643236F_FC70_11D3_A536_0090278A1BB8 returned actual error code 1603      
MSI (s) (78:44) [11:57:37:647]: User policy value 'DisableRollback' is 0      
MSI (s) (78:44) [11:57:37:647]: Machine policy value 'DisableRollback' is 0      
Action ended 11:57:37: InstallFinalize. Return value 3.

I ran the process monitor tool and captured a trace for the patch(KB2468871) install. As per the trace, I found that the file System.Xml.Serialization.dll was not getting created in the source directory though it was created successfully in the 64 bit directory (Framework64)

11:57:37.6172866 AM msiexec.exe 6264 CreateFile C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Xml.Serialization.dll NAME NOT FOUND 
11:57:37.6175195 AM msiexec.exe 6264 CreateFile C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Xml.Serialization.dll SUCCESS 
11:57:37.6175793 AM msiexec.exe 6264 QueryNetworkOpenInformationFile C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Xml.Serialization.dll SUCCESS 
11:57:37.6176019 AM msiexec.exe 6264 CloseFile C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Xml.Serialization.dll SUCCESS 

I was able to resolve the issue by copying the file System.Xml.Serialization.dll at  C:\Windows\Microsoft.NET\Framework\v4.0.30319\  from an another system. Once the file is copied, installed the patch KB2468871 successfully.

Error 25003. Error occurred while initializing fusion

$
0
0

The Microsoft .Net Framework 4.0 Setup may fail without any error message or the setup may crash during the install phase. You can find the below error message in the Setup log file (Microsoft .NET Framework 4 Setup_******_******-MSI_netfx_Core_*.msi.txt) under user temp folder(%temp%):

MSI (s) (18:60) [15:39:53:968]: Executing op: CustomActionSchedule(Action=CA_InstallAssemblyDef.3643236F_FC70_11D3_A536_0090278A1BB8,ActionType=1025,Source=BinaryData,Target=InstallAssembly,CustomActionData=C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\ISymWrapper.dll;78168)   
MSI (s) (18:00) [15:39:54:031]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI43B.tmp, Entrypoint: InstallAssembly    
09/16/13 15:39:54 DDSet_Status: LANGID: 1033    
09/16/13 15:39:54 DDSet_Entry: InstallAssembly started    
09/16/13 15:39:54 DDSet_Status: CustomActionData: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\ISymWrapper.dll;78168    
09/16/13 15:39:54 DDSet_Status: No ProductCode was passed in the CustomActionData. Using the current ProductCode.    
09/16/13 15:39:54 DDSet_Status: ProductCode for assembly install/uninstall has been set to {F5B09CFD-F0B2-36AF-8DF4-1DF6B63FC7B4}    
09/16/13 15:39:54 DDSet_Status: Loading C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\fusion.dll    
09/16/13 15:39:54 DDSet_Error: Failure creating interface IAssemblyCache     
09/16/13 15:39:54 DDSet_Error: CreateAssemblyCache() returned -2147024703     
09/16/13 15:39:54 DDSet_Error: Error occurred while initializing fusion.    
MSI (s) (18:5C) [15:39:54:109]: Product: Microsoft .NET Framework 4 Client Profile -- Error 25003. Error occurred while initializing fusion.

The above error indicates that the Custom Action (CA_InstallAssemblyDef.3643236F_FC70_11D3_A536_0090278A1BB8) failed to install an assembly in the Global Assembly Cache. After debugging the issue, I found that dummy CRT file msvcr100_clr0400.dll was present on the system. The Microsoft .NET Framework 4.5 carries dummy versions of these CRT files (the files contain no executable code) for various compat reasons.

As per the installer log, the dummy CRT files were already present before the installation took place:

MSI (s) (18:60) [15:38:31:703]: File: C:\WINDOWS\system32\msvcr100_clr0400.dll;           Won't Overwrite;                Won't patch;      Existing file is of an equal version   
MSI (s) (18:60) [15:38:31:703]: File: C:\WINDOWS\SysWOW64\msvcr100_clr0400.dll;       Won't Overwrite;                Won't patch;      Existing file is of an equal version

I was able to resolve the issue by renaming the file msvcr100_clr0400.dll at the below two locations:

C:\Windows\System32\msvcr100_clr0400.dll     
C:\Windows\SysWOW64\msvcr100_clr0400.dll

Visual Studio 2012 fails with an error 'The pipe is being closed'

$
0
0

The Microsoft Visual Studio 2012 OR Visual Studio 2012 Update 3 install may fail with the below error message: 

 

 After reviewing the Setup failure log dd_vs_****_201308291*****.log, I found the below failure message:  

 [0690:23A4][2013-07-29T17:00:28]: MUX:  Source confirmed
[0690:23A4][2013-07-29T17:00:28]: Acquiring package: webdeploy_x86_en_usmsi_901, payload: webdeploy_x86_en_usmsi_901, copy from: C:\VS2012_ISO\packages\WebDeploy\WebDeploy_x86.msi
[0690:23A4][2013-07-29T17:00:29]: Error 0xc000000d: Failed to get signer chain from authenticode certificate.
[1638:1934][2013-09-03T22:42:51]:Error 0x800700e8: Failed to write message type to pipe.

 Another log snippet from Visual Studio 2012 UPDATE 3:

[1638:1934][2013-09-03T22:42:51]: Error 0x800700e8: Failed to register the dependency on per-machine package.
[1638:1934][2013-09-03T22:42:51]: Error 0x800700e8: Failed to execute dependency action.
[1638:0B30][2013-09-03T22:42:51]: Error 0x80070642: BA aborted copy of payload from: 'C:\VS2012.3\packages\WinACK\Windows App Certification Kit x64-x86_en-us.msp' to: C:\Users\ADMINI~1\AppData\Local\Temp\{29828f33-4679-462a-8c98-1c3507678922}\WinACK_x64_x86_en.
[1638:0B30][2013-09-03T22:42:54]: Failed to acquire payload: WinACK_x64_x86_en to working path: C:\Users\ADMINI~1\AppData\Local\Temp\{29828f33-4679-462a-8c98-1c3507678922}\WinACK_x64_x86_en, error: 0x80070642.
[1638:0B30][2013-09-03T22:42:54]: Error 0x800700e8: Failed to write message type to pipe.

So, I used signtool.exe to verify the digital signature of the file listed in the above error message (SignTool is available as part of the Windows SDK, which you can download from http://go.microsoft.com/fwlink/p/?linkid=84091):

C:\>signtool verify -pa -v "c:\VS2012.3\packages\WinACK\Windows App Certification Kit Native Components-x64_en-us.msp"

 Verifying: c:\VS2012.3\packages\WinACK\Windows App Certification Kit Native Components-x64_en-us.msp

Hash of file (SHA-256): 7242C5E45B7D51EF98FFC1B64A739281B06CE52C8F920952FF33808AEDC9D2CE

Signing Certificate Chain:

    Issued to: Microsoft Root Certificate Authority 2011

    Issued by: Microsoft Root Certificate Authority 2011

    Expires:   Sat Mar 22 17:13:04 2036

    SHA1 hash: 8F43288AD272F3103B6FB1428485EA3014C0BCFE

        Issued to: Microsoft Code Signing PCA 2011

        Issued by: Microsoft Root Certificate Authority 2011

        Expires:   Wed Jul 08 16:09:09 2026

        SHA1 hash: F252E794FE438E35ACE6E53762C0A234A2C52135

            Issued to: Microsoft Corporation

            Issued by: Microsoft Code Signing PCA 2011

            Expires:   Sun Oct 06 19:14:32 2013

            SHA1 hash: BCA0A72FBF7C3A6666CBB15EEB450A3AE6F14A48

 File is not timestamped.

SignTool Error: WinVerifyTrust returned error: 0xC000000D

 Number of files successfully Verified: 0

Number of warnings: 0

Number of errors: 1 

 

Even looking at the digital signature property of the same file, I found the below error (Right Click on the file -> select Properties -> Click on “Digital Signatures” tab):

 

                                         

 Hence, I captured CAPI2 events logged through the Microsoft-Windows-CAPI2 channel in the event log. The events are based on the common CAPI, which is part of the certificate path validation process. I found the below information from CAPI2 events log:

  <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">

<System>

<Provider Name="Microsoft-Windows-CAPI2" Guid="{5bbca4a8-b209-48dc-a8c7-b23d3e5216fb}" />

<EventID>81</EventID>

<Version>0</Version>

<Level>2</Level>

<Task>80</Task>

<Opcode>2</Opcode>

<Keywords>0x4000000000000040</Keywords>

<TimeCreated SystemTime="2013-09-05T19:15:11.964667100Z" />

<EventRecordID>1665</EventRecordID>

<Correlation />

<Execution ProcessID="9012" ThreadID="948" />

<Channel>Microsoft-Windows-CAPI2/Operational</Channel>

<Computer>COMPUTER1</Computer>

<Security UserID="S-1-5-21-2826430686-930391821-3413531744-500" />

</System>

            <UserData>

 <WinVerifyTrust>

<ActionID>{00AAC56B-CD44-11D0-8CC2-00C04FC295EE}</ActionID>

<UIChoice value="2">WTD_UI_NONE</UIChoice>

<RevocationCheck value="0" />

<StateAction value="1">WTD_STATEACTION_VERIFY</StateAction>

<Flags value="80000080" WTD_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT="true" CPD_USE_NT5_CHAIN_FLAG="true" />

<FileInfo filePath="C:\ProgramData\Package Cache\.unverified\WinACK_native_x64_en" hasFileHandle="true" />

<DigestInfo digestAlgorithm="" digest="7242C5E45B7D51EF98FFC1B64A739281B06CE52C8F920952FF33808AEDC9D2CE" />

<RegPolicySetting value="23C00" WTPF_OFFLINEOK_IND="true" WTPF_OFFLINEOK_COM="true" WTPF_OFFLINEOKNBU_IND="true" WTPF_OFFLINEOKNBU_COM="true" WTPF_IGNOREREVOCATIONONTS="true" />

            <SignerInfo>

<DigestAlgorithm oid="2.16.840.1.101.3.4.2.1" />

</SignerInfo>

<CertificateChain chainRef="{7BDEEF41-63C5-49DD-B819-F6C007B1D045}" />

 <StepError stepID="16" stepName="TRUSTERROR_STEP_MSG_COUNTERSIGINFO">

<Result value="80096005">The timestamp signature and/or certificate could not be verified or is malformed.</Result>

</StepError>

     <StepError stepID="33" stepName="TRUSTERROR_STEP_FINAL_SIGPROV">

<Result value="C000000D" />

</StepError>

<EventAuxInfo ProcessName="VS2012.3.exe" />

<CorrelationAuxInfo TaskId="{AD5981CA-F431-4A74-AF30-2CCC10DBC92D}" SeqNumber="9" />

<Result value="C000000D" />

</WinVerifyTrust>

</UserData>

</Event>

 After further debugging, I found a bunch of custom OID registrations under the registry [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\OID\EncodingType 0\CryptDllFindOIDInfo\]. Many registry keys under CryptDllFindOIDInfo were written by third party applications. In my scenario, I found there was an application called “Entrust Entelligence Security Provider for Windows” which added those registry keys. Entrust registers another copy of the sha256 hash algorithm OID with a legacy name of “SHA-256”, and the AlgId field not set to 0xffffffff (it uses 0x800c, or CALG_SHA_256) and does not set the CNG algorithm name field at all. This causes CAPI2 to find the Entrust OID registration instead of the built-in OID registration, that would cause CNG-based sha256 signature validation to fail. CAPI2 only uses CNG providers for sha2 hash algorithms, so this could be fatal to all sha256 signature validation. In order to resolve the issue, please add the below highlighted entry in the registry: 
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\OID\EncodingType 0\CryptDllFindOIDInfo\2.16.840.1.101.3.4.2.1!1]
"Name"="SHA-256"
"Algid"=dword:0000800c
"CNGAlgid"="SHA256"
"Flags"=dword:00000001

You may also execute the Fix_it.reg file attached with this blog. Another workaround would be to temporarily uninstall “Entrust Entelligence Security Provider for Windows” from Control panel/ARP and reboot the system. Then install the Visual Studio 2012/ Update3. Once, it is completed, please reinstall “Entrust Entelligence Security Provider for Windows”. 

 

 

Important: Please note that serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base: How to back up and restore the registry in Windows

Installation of the Visual Studio 2010 Service Pack 1 does not terminate as expected and keeps running indefinitely

$
0
0

ENVIRONMENT:

Windows 7 SP1 (x86 and x64)

Windows 8 (x86 and x64)

Windows Server 2008 R2 (x64)

Windows Server 2012 (x64)

SYMPTOM AND INFERENCE:

Installation of the Visual Studio 2010 Service Pack 1 does not terminate as expected and keeps running indefinitely. In fact you neither see the final page showing the success or failure message. The installation just keeps running. Additionally if you enable verbose logging on the machine as per http://support.microsoft.com/kb/223300 then you will notice the .txt and .html log files getting formed under the %temp% folder (Start >> Run >>%temp%). The size of these files will keep increasing with the following line getting appended to the log over and over again-

Warning 1909.Could not create Shortcut Visual Studio Itanium Cross Tools Command Prompt (2010).lnk. Verify that the destination folder exists and that you can access it. Are you sure you want to cancel?

The reason why the setup is unable to create the shortcut (.lnk) is an incorrectly valued environment variable, ComSpec.

RESOLUTION:

You need to go the Environment Variables (Start >> Run >> system.cpl >> advanced >> Environment Variables). Scroll through the lexically ordered list to get the variable by the name ComSpec and provide it with the correct value

%SystemRoot%\system32\cmd.exe

 

image

 

If you do not remember changing this value yourself then it is possible that it could have been modified by an application, particularly during its installation.

 

Content by: Ritwik Sinha

Installation of the Visual Studio 2012 fails with the error message “Microsoft .Net Framework required for Microsoft Visual Studio Ultimate Setup”.

$
0
0


SYMPTOM AND INFERENCE:

This error was appearing as soon as we launched the Visual Studio 2012 setup. The above error message appears to point towards an issue related to the .net framework 4.5. However .net framework 4.5 was already installed on the machine, and was found to be in good health. In order to debug this issue further we checked the event log and came across this error:

-------------------------------------------------------------------------------------------------------------------

Source: SideBySide
Date: xx/xx/xx 11:32:38 AM
Event ID: 33
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: XXXXX
Description:
Activation context generation failed for "C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll". Dependent Assembly Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50608.0" could not be found. Please use sxstrace.exe for detailed diagnosis.
-------------------------------------------------------------------------------------------------------------------

As the above error suggests to run the side by side trace, we took the sxstrace using the steps given in the following blog post: http://blogs.msdn.com/b/smondal/archive/2010/12/31/quot-the-application-has-failed-to-start-because-its-side-by-side-configuration-is-incorrect-please-see-the-application-event-log-for-more-detail-quot.aspx

Excerpt from the log generated:

-------------------------------------------------------------------------------------------------------------------

18D0:081C][2013-09-03T11:22:31]: Setting string variable 'WixBundleLog' to value 'C:\Users\~~~~~~~~~~\AppData\Local\Temp\dd_vs_ultimate_20130903112231.log'

[18D0:081C][2013-09-03T11:22:31]: Setting string variable 'WixBundleOriginalSource' to value 'C:\VSDOWNLOAD\en_visual_studio_ultimate_2012_x86_web_installer_2599164.exe'

[18D0:081C][2013-09-03T11:22:31]: Condition '(VersionNT >= v6.1)' evaluates to true.

[18D0:081C][2013-09-03T11:22:31]: Loading prerequisite bootstrapper application because managed host could not be loaded, error: 0x800736b1.

FO: Attempt to probe manifest at C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.VC80.CRT\Microsoft.VC80.CRT.MANIFEST.

    INFO: Did not find manifest for culture Neutral.

   INFO: End assembly probing.

ERROR: Cannot resolve reference Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50608.0".

ERROR: Activation Context generation failed.

End Activation Context Generation.

-------------------------------------------------------------------------------------------------------------------

CAUSE:

The above error in the sxs log and the event log points to Microsoft.VC80.CRTwhich gets installed with Visual C++ 2005.

We checked what applications were installed on the machine and found that the VC++ 2005 was missing.

RESOLUTION:

We needed to install the latest version of VC++ 2005.

We then downloaded update “Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update” from http://www.microsoft.com/en-us/download/details.aspx?id=26347 and installed on the computer.

After the installation of the VC++ 2005 we were finally able to install Visual Studio 2012.

 

Content by: Keshav Deo Jain


Installation of the Visual Studio 2012 fails with the error message “Microsoft Visual Studio 2012 Devenv Element not found”.

$
0
0


SYMPTOM AND INFERENCE:

This error message is shown as soon as the setup for Microsoft Visual Studio 2012 is launched. These errors are logged in a file named ‘dd_vs_ultimate_xxx.log’ located under the %temp% folder. This would contain the following text in the log:

-------------------------------------------------------------------------------------------------------------------

[0EE0:08B0] [2013-09-27T10:20:46]: Error 0x80070490: Failed to find expected public key in certificate chain.

[0EE0:08B0][2013-09-27T10:20:46]: Error 0x80070490: Failed to verify expected payload against actual certificate chain.

[0EE0:08B0][2013-09-27T10:20:46]: Error 0x80070490: Failed to verify signature of payload: cab528D5E86019AA7A84A37B99EE47495D5.

-------------------------------------------------------------------------------------------------------------------

 

CAUSE:

This could be happening due the following 2 reasons.

1. When you use Windows Update or Microsoft Update to install updates, you may receive Error code: 0x80070490 if the Component-Based Servicing (CBS) manifest is corrupted.

2. It is also possible that there are some issues with the certificates verification. In case it is due to the missing certificates from the “Certificate Root” follow the second resolution listed below.

 

RESOLUTION:

1. Please follow the steps documented at http://support.microsoft.com/kb/958044

2. To update the root certificates this KB update needs to be installed: http://support.microsoft.com/KB/931125. This is best done through the ‘Microsoft Update Catalog’ page: http://catalog.update.microsoft.com/v7/site/Home.aspx.
Click on the link to open the page and then search for "931125" and you will see several updates listed; select the correct update according to your operating system and OS architecture.

A reboot may be required. Once this is done, you should be able to Visual Studio 2012 without any issues.

 

Content by: Keshav Deo Jain

How to publish an application through ClickOnce Deployment if Front Page extension is not present on the server.

$
0
0

 

FrontPage Server Extensions is a software technology that allows Microsoft clients to communicate with web servers, and provide additional functionality intended for websites.

If the Front Page extension is not installed on your server you will get this error-

Error_One

As has been explained in this MSDN article , FrontPage Server Extensions from Microsoft is required for publishing applications to a Windows Web server that uses HTTP.

By default, Windows Server does not have FrontPage Server Extensions installed. If you want to use Visual Studio to publish to a Windows Server Web server that uses HTTP with FrontPage Server Extensions, you must install FrontPage Server Extensions first. You can perform the installation by using the Manage Your Server administration tool in Windows Server.

1. Create a FTP user in your web hosting server. Make a note of the FTP address and the username - password of the user.

2. In the Visual Studio, open your project and go to Properties >> Publish.

Enter the FTP address URL in the Publishing Folder Location as shown below. (In our example it is ftp://ftp.mywindowshosting.com/).

Enter the URL which your application should be installed or viewed from.
(In our example it is http://aparnachinya-001-site1.mywindowshosting.com/)

URL_Two

3. Now, click on Options >> Deployment
(mention the name of the file through which you want to initiate the ClickOnce deployment, which In our case is default.htm)

options_Three

4. Click on Publish. It will ask for the FTP Log On Credentials here.

LogOn_Four

5. Go to the website URL and you will find your application ready to be installed!

Website_Five

Note:
* Refer to Server and Client Configuration Issues in ClickOnce Deployments (http://msdn.microsoft.com/en-us/library/ms228998.aspx) to know about the advanced options available for ClickOnce Deployment.
* You can get a Web Hosting server from http://www.microsoft.com/web/hosting/home

 

Content By: Aparna Chinya

An error occurred while signing: Key not valid for use in specified state

$
0
0

When a user tries to publish a ClickOnce application after changing the user account password, it would fail with one of below error messages:

“Cannot publish because a project failed to build.”
“An error occurred while signing: Key not valid for use in specified state.”
“Error msb3482 an error occurred while signing key not valid for use in specified state”  Ex.
http://msdn.microsoft.com/en-us/library/ms228227(v=vs.90).aspx 

Please find the below steps to reproduce the issue:

1. Create a simple Windows Form application in Visual Studio.
2. Without changing any properties of the application, right click the project file and “publish” the application.
(A test certificate is automatically created by Visual Studio and stored under the project folder. )
3. Change the password of the local user account.
4. Logoff from the computer and login back to the computer using the same user account.
5. Open the same project that was created in step1, and without changing any properties of the application, right click the project file and “publish” the application.
6. The above error would occur.

 Resolution:

The above issue occurs due to ClickOnce application was not signed with the certificate after re-logging to the system using new user account password. In order to resolve the issue just re-sign the application after re-logging. For example, first time you sign the app using this certificate and publish it. Then change the password for the current user and log off/re-login to the system. Now sign the app again with the same certificate and publish the application. You should be able to publish the application successfully.

 

Reference in the manifest does not match the identity of the downloaded assembly

$
0
0

You may find the below error message while launching a ClickOnce application: “Reference in the manifest does not match the identity of the downloaded assembly MyApp.exe.”

Log snippet:

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of \\MyServer\MyApp.application resulted in exception. Following failure messages were detected:
  + Reference in the manifest does not match the identity of the downloaded assembly WinApp.exe.

Following errors were detected during this operation.
* [28-Feb-12 10:53:06 AM]

System.Deployment.Application.InvalidDeploymentException (RefDefValidation)
  - Reference in the manifest does not match the identity of the downloaded assembly WinApp.exe.
  - Source: System.Deployment

Stack trace:
   at System.Deployment.Application.DownloadManager.ProcessDownloadedFile(Object sender, DownloadEventArgs e)
   at System.Deployment.Application.FileDownloader.DownloadModifiedEventHandler.Invoke(Object sender, DownloadEventArgs e)
   at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
   at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
   at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
   at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
   at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
   at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
   at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
   at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

 After investigating this issue, I found that this issue occurs due to a manifest being embedded into the executable while building the application. On Visual Studio 2008 onwards, by default it embeds manifest information into assemblies. Hence, the resolution is to include /nowin32manifest switch http://msdn.microsoft.com/en-us/library/bb513864.aspx  while building your application. Another approach would be to exclude the embedded manifest file after building the application. In order to do that please open Visual Studio IDE and Open the executable file from the menu (File—>Open—>File). You will find the below screenshot:

manifest

 Now delete RT_MANIFEST and save the executable file.

Removal of a component from a feature is not supported

$
0
0

You might observe that files are not being upgraded after applying a small update or a minor upgrade patch. The upgrade log may not show the exact cause of the issue. After investigation, I found some component rule violation in the upgrade package.

To catch the violation to the upgrade component rules you can pass the public property MSIENFORCEUPGRADECOMPONENTRULES (http://msdn.microsoft.com/en-us/library/Aa370093) that will affect any install on the machine. This will cause small and minor updates to fail with either Windows Installer error 2771 if a component is removed from a feature, or error 2772 if the feature tree is rearranged with the exception of adding a new feature as a leaf feature to an existing feature.

For example first install the Target MSI package then run the below command:
msiexec /fvomus Your_Upgrade_Package.msi REINSTALL=ALL REINSTALLMODE=vomus MSIENFORCEUPGRADECOMPONENTRULES=1 /l*vx log.txt

The above command-line tells MSI to update the cached MSI to start the minor upgrade then do a reinstall to actually replace newer files and registry keys.  The MSIENFORCEUPGRADECOMPONENTRULES Property will cause the minor upgrade to fail if you violated any of the minor upgrade rules.  The log file (log.txt) would show the cause of the issue.

■Remove a component from a feature.
This can also occur if you change the GUID of a component. The component identified by the original GUID appears to be removed and the component as identified by the new GUID appears as a new component.

■Add a new feature to the top or middle of an existing feature tree.
The new feature must be added as a new leaf feature to an existing feature tree.

In the log (log.txt), I found the following information:

MSI (c) (B7:C0) [10:00:00:000]: SELMGR: ComponentId '{1F634567-89CD-ADEF-8179-D4A709CF0DBC}' is registered to feature 'FeatureA', but is not present in the Component table. Removal of components from a feature is not supported!
MSI (c) (B7:C0) [110:00:00:000]: SELMGR: Removal of a component from a feature is not supported

Please note that components can be added to new features - or existing features - but cannot be removed. In order to remove the component or make a change that would otherwise require a change in the component code - which is no different than removing one component and adding another - the ProductCode property must be changed, which constitutes a major upgrade. This applies even with obsolescence and supersedence. If we recall How Patching Works http://blogs.msdn.com/b/heaths/archive/2005/09/12/464047.aspx that when we obsolesce or supersede a previous patch Windows Installer removes the patch transform from the in-memory view of the product. This effectively removes a component from a feature or features and violates upgrade components rules.

As per the MSDN doc http://msdn.microsoft.com/en-us/library/Aa367850 the product code must be changed if any of the following are true for the update:

•Coexisting installations of both original and updated products on the same system must be possible.
•The name of the .msi file has been changed.
•The component code of an existing component has changed.
•A component is removed from an existing feature.
•An existing feature has been made into a child of an existing feature.
•An existing child feature has been removed from its parent feature.

In order to resolve the issue, try one of the steps:
• Don’t remove the component from the existing feature in the upgrade package
• Change the product Code in the upgrade package which would be a major upgrade.

Viewing all 75 articles
Browse latest View live




Latest Images