custom module assembly info
So I've followed the directions in the documentation to create a custom module, except I've created a "Customers" module instead of a JobApplication (renaming where needed). However when I add the module and then try to access the Content-> Customers screen I get the error below.
One thing that stands out. My module is "Customers" the Assembly properties are set to "Customers" the .dll is "Customers.dll" (note: all plural) but the error is referencing "Customer" (singular). huh?
I could use help figuring out why it has a different name, and where is this controlled. So I can double check the code and get the reference correct.
thanks,
--mike
=============================
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'Customer' or one of its dependencies. The system cannot find the file specified.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Customer' could not be loaded.
=== Pre-bind state information ===
LOG: User = WIN-43GT8R2G3K0\mnimer
LOG: DisplayName = Customer
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Customer | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper go.microsoft.com/.../ for more information and common solutions to this issue.
LOG: Appbase = file:///C:/Users/mnimer/Development/UniversalMind/mdc-epko/trunk/mdcwall/
LOG: Initial PrivatePath = C:\Users\mnimer\Development\UniversalMind\mdc-epko\trunk\mdcwall\bin
Calling assembly : Telerik.Sitefinity.Utilities, Version=4.1.1395.0, Culture=neutral, PublicKeyToken=b28c218413bdf563.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\mnimer\Development\UniversalMind\mdc-epko\trunk\mdcwall\web.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
Stack Trace:
[FileNotFoundException: Could not load file or assembly 'Customer' or one of its dependencies. The system cannot find the file specified.]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +132
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +144
System.Reflection.Assembly.Load(String assemblyString) +28
Telerik.Sitefinity.Utilities.TypeConverters.TypeResolutionService.GetType(String name, Boolean throwOnError, Boolean ignoreCase) +1182
Telerik.Sitefinity.Utilities.TypeConverters.TypeResolutionService.GetType(String name, Boolean throwOnError) +44
Telerik.Sitefinity.Utilities.TypeConverters.TypeResolutionService.GetType(String name) +38
Telerik.Sitefinity.Utilities.TypeConverters.TypeResolutionService.ResolveType(String name) +39
Telerik.Sitefinity.ManagerTypeAttribute..ctor(String managerTypeName) +109
System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs) +0
System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs) +46
System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +529
System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit) +248
System.RuntimeType.GetCustomAttributes(Boolean inherit) +41
Telerik.Sitefinity.Descriptors.DynamicFieldsTypeDescriptor..ctor(ICustomTypeDescriptor parent, Type type) +227
Telerik.Sitefinity.Model.DynamicFieldsTypeDescriptionProvider.GetTypeDescriptor(Type objectType, Object instance) +458
System.ComponentModel.DefaultTypeDescriptor.System.ComponentModel.ICustomTypeDescriptor.GetAttributes() +76
System.ComponentModel.TypeDescriptor.GetAttributes(Type componentType) +45
Telerik.Sitefinity.Data.ManagerBase.GetManagerTypeFromAttribute(Type itemType) +54
Telerik.Sitefinity.Data.ManagerBase.GetMappedManagerTypeInternal(Type itemType, Boolean throwException) +205
Telerik.Sitefinity.Data.ManagerBase.GetMappedManagerType(Type itemType) +101
Telerik.Sitefinity.Data.ManagerBase.GetMappedManager(Type itemType, String providerName) +104
Telerik.Sitefinity.Web.UI.ContentUI.ContentView.ResolveContentManager() +321
Telerik.Sitefinity.Web.UI.ContentUI.ContentView.ResolveDetailItem() +129
Telerik.Sitefinity.Web.UI.ContentUI.ContentView.CreateChildControls() +63
System.Web.UI.Control.EnsureChildControls() +102
System.Web.UI.Control.PreRenderRecursiveInternal() +42
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
Hello Mike,
It seems that somewhere in your code you have referenced to Customer instead of Customers. Can you provide me with screenshots of the following:
1. The registered module in the backend settings.
2. The module.cs namespace
3. The module structure and files.
All the best,
Victor Velev
the Telerik team
Victor,
I'm attaching a screen shot from the admin. And you can download the source for the module from here, hopefully you can see the issues with these. (I wasn't allowed to upload with this post).
dl.dropbox.com/.../customersModule.zip
And to answer #2 the namespace is "Customers".
Thanks for helping me debug this, I have no idea what to try next.
--mike
Hi Mike,
I was able to setup your module. There are few notes I would like to make:
1. Make sure you clear and rebuild your project. If the system says you are missing an assembly or file it is probably because it is not added to Sitefinity or it is not in the bin folder.
2. You need to enhance your project. Please replace your Customer.csproj with the one from the archive.
3. Also you need to change the webservice path to look like the one from the screenshot.
Do not forget to leave the version field empty when registering the module.
Greetings,
Victor Velev
the Telerik team
I'm trying this now, thanks for looking into it. However a quick comment on #1
>
1. Make sure you clear and rebuild your project. If the system says you are missing an assembly or file it is probably because it is not added to Sitefinity or it is not in the bin folder.
I have now fixed the project so I can clean it. However I had originally created the project with the sitefinity project manager and the way it sets up the project you can't run clean/rebuild - it has references linked to the dll's in /bin which clean deletes. I'm sure this is a known bug but wanted to mention just in case.
--mike