API Questions on Kentico API.
Version 6.x > API > Events as Products reference issue View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
tsm612 - 3/9/2012 3:34:06 PM
   
Events as Products reference issue
I'm trying to add this API (http://devnet.kentico.com/Knowledge-Base/E-commerce/Events-as-products-in-Kentico-6.aspx) to my current project and I've run into some problems. For step 5, I haven't been able to successfully add a reference to the CustomEventManager. I've gone through the steps to add a project reference, and it seemed to work, but it didn't add a copy of the assembly or xml documents to the bin folder. Attempting to rebuild the solution fails, and the error list shows several namespace errors from the CustomEventHelper.cs file. When I try to view the web site in a browser window, I get the compiler error message "Compiler Error Message: CS0234: The type or namespace name 'CustomEventManager' does not exist in the namespace 'Custom' (are you missing an assembly reference?)" When I try to add the reference again, I get the error message "A reference to 'CustomEventManager' could not be added. A reference to the project 'CustomEventManager' already exists in the Web site."

Also, setting the references to the existing DLLs (step 4) took care of most of the references, but there are still missing references for CMS.IDataConnectionLibrary and CMS.Staging. Are those required? How do I set those references?

Any idea of what I could be doing wrong? My project has the 6.0.19 hotfix installed.

Thanks.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 3/12/2012 3:41:46 AM
   
RE:Events as Products reference issue
Hi,

I am confused from the way you added the references. Have you added the the references to the CustomEventManager and also vice versa, to the CustomEventManager to your BIN folder?

I was able to follow the steps also without adding references to CMS.Staging DLL and the CMS.IDataConnectionLibrary does not exist in v6 anymore so, it should not be required.

Are youo using web project or web application? Which version of .Net are you using?

Have you tried to rebuild just the assemblies separately?

Best regards,
Juraj Ondrus

User avatar
Certified Developer v7
Certified  Developer v7
tsm612 - 3/12/2012 10:44:00 AM
   
RE:Events as Products reference issue
Yes. I added the references to CustomEventManager, which seemed to work, and then I added CustomEventManager to the BIN folder as a Project Reference.

I haven't tried rebuilding the assemblies separately. I'm using a web application with .NET 4.0.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 3/15/2012 4:13:31 AM
   
RE:Events as Products reference issue
Hi,

I have just followed the steps on that article with these exceptions for web application project:

step 3: I copied and merged the files to Old_App_Code\CMSModules\Ecommerce\Samples\ folder.

step 5: the reference to the custom event manager project was added as described here for the web application.

And these are the only things I have changed - everything else is the same and the build/compilation succeeded and it is working fine for me.

Best regards,
Juraj Ondrus

User avatar
Certified Developer 10
Certified Developer 10
josha-bpstudios - 11/26/2012 2:17:02 PM
   
RE:Events as Products reference issue
I am getting the same errors and have followed the steps exactly as they are. I am getting the namespace custom could not be found.Also another error is could not get dependencies for project reference CustomEventManager. The CustomEventHelper also brings up an error that deals with the tablemanager. An object reference is required for the non static field.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 11/27/2012 2:26:52 AM
   
RE:Events as Products reference issue
Hi,

What is the exact version of the CMS you are using please?

Best regards,
Juraj Ondrus