ssteenkiste / nettiers

Automatically exported from code.google.com/p/nettiers
1 stars 0 forks source link

Bug with FileConfigurationSource (entlib5) #361

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Using r870, everything compiles OK although I get the following exception 
thrown in my code at runtime.

"Method 'DoAdd' in type 'xxxxx.Data.FileConfigurationSource' from assembly 
'xxxxx.Data, Version=1.0.57.0, Culture=neutral, PublicKeyToken=null' does not 
have an implementation."

I think the change too place in r865.

I have rolled back to r864 and all is well again.

Original issue reported on code.google.com by james.pa...@gmail.com on 11 Jan 2011 at 9:14

GoogleCodeExporter commented 9 years ago
Hello,

Does this error occur immediately after consuming the API or does it happen 
after an exception occurs? That class does contain a DoAdd Implementation. Can 
you please check this in reflector.

Thanks
-Blake Niemyjski

Original comment by bniemyjski on 11 Jan 2011 at 10:22

GoogleCodeExporter commented 9 years ago
I think we need a little more info.  How are you using Nettiers?  Are you using 
the ServiceLayer, UI components, or just the data layer.  Also, you might post 
a copy of your app/web.config and entlib.config files.  You can remove any 
sensitive appsettings / connection strings.

We just need to try and reproduce this.  If I generate, and run the admin 
website nettiers generates, I don't get this error.  That leads me to think 
something might be different with your setup.

jeff

Original comment by jmhin...@gmail.com on 11 Jan 2011 at 10:32

GoogleCodeExporter commented 9 years ago
Just for background:

My project is WPF4 using the MVVM pattern backed by Prism.

I've had a play for a few minutes and it seems something to do with Prism and 
when it enumerates DLLs during the bootstrap.  Think I need to get the source 
of Prism hooked in so I can do some debugging to be sure.

Original comment by james.pa...@gmail.com on 12 Jan 2011 at 10:28

GoogleCodeExporter commented 9 years ago
Managed to repro with only a console app.  All you need to do is replace 
C:\xxxxx.Data.dll with the path to your nettiers data dll.

Hopefully you will see the problem then.  My research has pointed towards 
references but I'm still no further forward.

==========

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Assembly ass = Assembly.ReflectionOnlyLoadFrom(@"C:\xxxxx.Data.dll");
            AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += new ResolveEventHandler(CurrentDomain_ReflectionOnlyAssemblyResolve);

            foreach (Type t in ass.GetExportedTypes())
            {
                Console.WriteLine(t);
            }
        }

        static Assembly CurrentDomain_ReflectionOnlyAssemblyResolve(object sender, ResolveEventArgs args)
        {
            return System.Reflection.Assembly.ReflectionOnlyLoad(args.Name);
        }
    }
}

Original comment by james.pa...@gmail.com on 13 Jan 2011 at 5:30

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 13 Jan 2011 at 7:08

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 13 Jan 2011 at 7:39

GoogleCodeExporter commented 9 years ago
It is possible to just exclude FileConfigurationSouce.cs and 
FileConfigurationSouceElement.cs and things behave themselves.  That is a quick 
stop gap for me until it can be explained why the exception occurs.

Original comment by james.pa...@gmail.com on 14 Jan 2011 at 1:49