zcz527 / autofac

Automatically exported from code.google.com/p/autofac
Other
0 stars 0 forks source link

Winforms app fails to start when using Autofac 3.0.0 #401

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I running Windows forms Application
2. On Start it fails with following exception:
Type : System.IO.FileNotFoundException
Stack Trace :    at Autofac.Builder.RegistrationData..ctor(Service 
defaultService)
   at Autofac.Builder.RegistrationBuilder`3..ctor(Service defaultService, TActivatorData activatorData, TRegistrationStyle style)
   at Autofac.Builder.RegistrationBuilder.ForDelegate[T](Func`3 delegate)
   at Autofac.RegistrationExtensions.Register[T](ContainerBuilder builder, Func`3 delegate)
   at Autofac.RegistrationExtensions.Register[T](ContainerBuilder builder, Func`2 delegate)
   at ..()
   at ..()
Target : Void .ctor(Autofac.Core.Service)
Message : Could not load file or assembly 'System.Core, Version=2.0.5.0, 
Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of 
its dependencies. The system cannot find the file specified.

What version of Autofac are you using? On what version of .NET/Silverlight?
Autofac version 3.0.0
.net version 4

When I run the app on a dev machine with installed VS2012 all works fine. When 
I switch to a client machine with .Net framework 4 installed and patched with 
all latest updates from Microsoft it fails.

Please advice! 

Original issue reported on code.google.com by gordan.j...@gmail.com on 31 Jan 2013 at 4:00

GoogleCodeExporter commented 8 years ago
Unfortunately, I'm not able to reproduce this. The only time I see the error is 
when there's a patch missing.

Are you sure the problem machine is patched?

Make sure if you're using Windows Update on an enterprise network with WSUS 
installed that you're checking *Microsoft* as the source for patches, not your 
internal WSUS system. (I've been bitten by this - IT doesn't release certain 
patches in a timely fashion and it looks like things are updated when they're 
not.)

Also make sure no updates have been "hidden" in Windows Update. (A user can opt 
to hide updates they don't want so they won't be prompted by them.)

Other than that... being unable to reproduce it, I'm not sure what I can offer 
you. It's not an Autofac problem, it's a .NET/Portable Class Library problem. 
Autofac is just an early adopter of the tech so you're encountering it here.

@davkean on Twitter (and he's on StackOverflow) might be able to provide some 
additional insight or tips. He's one of the primaries on the Portable Class 
Library stuff for Microsoft.

Original comment by travis.illig on 31 Jan 2013 at 11:32