Marcin
unread,Sep 19, 2011, 11:13:15 AM9/19/11You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi,
When I run msbuild on my machine it is supposed to run under framework
3.5. Today I found that it crashes:
C:\Windows\system32>msbuild
Unhandled Exception: System.TypeInitializationException: The type
initializer for 'Microsoft.Build.CommandLine.MSBuildApp' threw an
exception. ---> System.TypeLoadException: Could not load type
'Microsoft.Build.Shared.AssemblyResources' from assembly
'Microsoft.Build.Engine, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'.
at Microsoft.Build.CommandLine.MSBuildApp..cctor()
--- End of inner exception stack trace ---
at Microsoft.Build.CommandLine.MSBuildApp.Main()
I have found this in fusion log:
*** Assembly Binder Log Entry (2011-09-19 @ 16:20:33) ***
The operation was successful.
Bind result: hr = 0x0. The operation completed successfully.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework
\v4.0.30319\clr.dll
Running under executable C:\Windows\Microsoft.NET\Framework
\v3.5\MSBuild.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User =xxxxx
LOG: DisplayName = System, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
(Fully-specified)
LOG: Appbase = file:///C:/Windows/Microsoft.NET/Framework/v3.5/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = MSBuild.exe
Calling assembly : MSBuild, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a.
===
LOG: Start binding of native image System, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089.
LOG: Start validating native image System, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089.
LOG: Start validating all the dependencies.
LOG: [Level 1]Start validating native image dependency mscorlib,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
LOG: Dependency evaluation succeeded.
LOG: [Level 1]Start validating native image dependency mscorlib,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
LOG: Dependency evaluation succeeded.
LOG: [Level 1]Start validating IL dependency System.Configuration,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a,
processorArchitecture=MSIL.
LOG: Dependency evaluation succeeded.
LOG: [Level 1]Start validating IL dependency System.Xml,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089,
processorArchitecture=MSIL.
LOG: Dependency evaluation succeeded.
LOG: [Level 1]Start validating IL dependency System.Xml,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089,
processorArchitecture=MSIL.
LOG: Dependency evaluation succeeded.
LOG: [Level 1]Start validating IL dependency System.Configuration,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a,
processorArchitecture=MSIL.
LOG: Dependency evaluation succeeded.
LOG: Validation of dependencies succeeded.
LOG: Start loading all the dependencies into load context.
LOG: Loading of dependencies succeeded.
LOG: Bind to native image succeeded.
Native image has correct version information.
Attempting to use native image C:\Windows\assembly
\NativeImages_v4.0.30319_32\System
\4532468deac0fdeff26329333c7642b6\System.ni.dll.
Native image successfully used.
I think the problem is that it uses assembly loader from framework 4.0
instead of 3.5 (I have installed both, but currently I need 3.5). Does
anybody know how to change the loader?
m.