Reputation: 1346
I'm working on an open source MVC project for a class and once one of the other students added MEF into the project it stopped running for me. it still runs for everyone else I've researched this for quite some time and asked the prof and haven't been able get anything working.
For the entire Error please see the following
Here are the first lines of each section of the error page NOTE:
[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
NOTE: this is a single line on the error page I thought this was quite strange.
[InvalidOperationException: An error occurred while composing the MEF parts. Type(s): Microsoft.SqlServer.Management.Smo.SecurityUtils, Microsoft.SqlServer.Management.Smo.ExecutionManager, Microsoft.SqlServer.Management.Smo.ExecutionManager+ExecResult, Microsoft.SqlServer.Management.Smo.ExecutionStatus,
REMOVED A FEW HUNDRED LINES OF GARBAGE PLEASE SEE LINK FOR FULL ERROR
Microsoft.SqlServer.Management.Smo.ScriptContainer, Microsoft.SqlServer.Management.Smo.ObjectScriptContainer, Microsoft.SqlServer.Management.Smo.IdBasedObjectScriptContainer, Microsoft.SqlServer.Management.Smo.TableScriptContainer, Microsoft.SqlServer.Management.Smo.ScriptContainerFactory, Microsoft.SqlServer.Management.Smo.SfcDiscoveryNode, Microsoft.SqlServer.Management.Smo.SfcHierarchyDiscovery, Microsoft.SqlServer.Management.Smo.SfcDependencyDiscovery, Microsoft.SqlServer.Management.Smo.SfcDependencyDiscovery+SfcNodeVisitor, Microsoft.SqlServer.Management.Smo.SfcDependencyDiscovery+ScriptListContext, Microsoft.SqlServer.Management.Smo.SmoDependencyDiscovery, Microsoft.SqlServer.Management.Smo.ErrorLocation, Microsoft.SqlServer.Management.Smo.DependencyDiscoveryError, Microsoft.SqlServer.Management.Smo.DependencyDiscoverySink, {6700AF61-4E8B-4423-BE3B-A43DE0C1B3B3}, {6700AF61-4E8B-4423-BE3B-A43DE0C1B3B3}+_StaticArrayInitTypeSize=24, Microsoft.SqlServer.Management.Smo.Server+d_0, Microsoft.SqlServer.Management.Smo.Database+d_0, Microsoft.SqlServer.Management.Smo.Database+d_3, Microsoft.SqlServer.Management.Smo.CpuCollection+d_0, Microsoft.SqlServer.Management.Smo.BackupMediaSet+<>c_DisplayClass2, Microsoft.SqlServer.Management.Smo.BackupSet+<>c_DisplayClassa, Microsoft.SqlServer.Management.Smo.PropertyCollection+d_0, Microsoft.SqlServer.Management.Smo.ScriptMaker+d_2, Microsoft.SqlServer.Management.Smo.ScriptMaker+d_8, Microsoft.SqlServer.Management.Smo.SmoDependencyOrderer+<>c_DisplayClass25, Microsoft.SqlServer.Management.Smo.DatabasePrefetchBase+d_1, Microsoft.SqlServer.Management.Smo.ObjectScriptContainer+<>c__DisplayClass2, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Reason(s): Could not load file or assembly 'Microsoft.SqlServer.SqlEnum, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
Upvotes: 3
Views: 475
Reputation: 398
I would first confirm that you have the SqlEnum dll installed in the GAC on your machine. You can check this by going to C:\Windows\assembly. If something is missing, you may need to repair or reinstall the Sql Management Objects feature. Also check that the version you have installed is the same version MEF is trying to load.
If you do have it installed, try using the Fusion Log Viewer. This can help you find which dlls are failing to load, and what steps the loader is going through in trying to load the dll. This should help you narrow down where the issue is coming from.
Upvotes: 1
Reputation: 1662
I believe that you are missing a reference somewhere. I would go back through the code and ensure that all your "using" statements are as they should be, as well as the project's references to the assemblies.
Upvotes: 0