zcz527 / autofac

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

Exception while trying to throw an exception in Metro app #376

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. VS 2012, New blank metro app
2. Add code that throws an exception. e.g. The following should throw a 
ComponentNotRegisteredException:
    var builder = new ContainerBuilder().Build().Resolve<Foo>();

What is the expected output? What do you see instead?
Expected: An exception that explains what the error is.
Actual: A MissingManifestResourceException

System.Resources.MissingManifestResourceException was unhandled by user code
  HResult=-2146233038
  Message=Unable to load resources for resource file "Autofac.Core.Registration.ComponentNotRegisteredExceptionResources" in package "2f3436b9-928b-4e1b-b69d-84b0d0be9f0c".
  Source=mscorlib
  StackTrace:
       at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
       at Autofac.Core.Registration.ComponentNotRegisteredExceptionResources.get_Message()
       at Autofac.Core.Registration.ComponentNotRegisteredException..ctor(Service service)
       at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
       at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType, IEnumerable`1 parameters)
       at Autofac.ResolutionExtensions.Resolve[TService](IComponentContext context, IEnumerable`1 parameters)
       at Autofac.ResolutionExtensions.Resolve[TService](IComponentContext context)
       at TestAutofacMetro.App..ctor() in c:\dev\joshka\TestAutofacMetro\TestAutofacMetro\App.xaml.cs:line 33
       at TestAutofacMetro.Program.<Main>b__0(ApplicationInitializationCallbackParams p) in c:\dev\joshka\TestAutofacMetro\TestAutofacMetro\obj\Debug\App.g.i.cs:line 29
  InnerException: 

What version of Autofac are you using? On what version of .NET/Silverlight?
2.6.3.862-Portable

Please provide any additional information below.
I was unclear on what was necessary in order to build the portable libraries as 
they are on the downloads page.

Original issue reported on code.google.com by jos...@joshka.net on 24 Jun 2012 at 2:34

GoogleCodeExporter commented 8 years ago
Adding
[assembly: NeutralResourcesLanguageAttribute("en")]
to GlobalAssemblyInfo.cs fixes this bug

Original comment by jos...@joshka.net on 25 Jun 2012 at 4:07

GoogleCodeExporter commented 8 years ago

Original comment by alex.meyergleaves on 28 Jun 2012 at 1:34

GoogleCodeExporter commented 8 years ago

Original comment by travis.illig on 21 Sep 2012 at 4:36

GoogleCodeExporter commented 8 years ago
This appears to be fixed in the 3.0 codeline, which should be released fairly 
soon.

Original comment by travis.illig on 8 Oct 2012 at 11:48

GoogleCodeExporter commented 8 years ago

Original comment by travis.illig on 8 Oct 2012 at 11:49

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 50a39febb986.

Original comment by travis.illig on 8 Oct 2012 at 11:50