ProductCatalogSample module problem

Posted by Community Admin on 05-Aug-2018 18:15

ProductCatalogSample module problem

All Replies

Posted by Community Admin on 19-Jan-2011 00:00

Hi,

I moved products module from the Samples folder to my project folder and updated the project file and references so it will compile. Updated the app.config of the products module to point to the correct database. Also added a project reference in my webproject to products module project. the whole solution builds without any issues and the module assembly is copied over to the bin folder of the website.

I have modified the SystemConfig.config to have a line to register the module in Sitefinity. I simply copied that line from the sample webproject and pasted it over in my website's SystemConfig.con file.

Now what's happenning is it throws an exception when it executes the ProductsManager.GetManager(string providerName) method and the exception is TargetInvocationException and the message is as follows. providerName gets passed is empty. I continued my debugging session after the exception and the website loaded but in administration Products is not appearing under Content menu.

Exception Message: Persistence-capable-superclass 'Telerik.Sitefinity.GenericContent.Model.Content' not declared in meta data. --> ProductCatalogSample, Version=1.0.4036.18724, Culture=neutral, PublicKeyToken=null/namespace[ProductCatalogSample.Model]/class[ProductCatalogSample.Model.ProductItem]


This is where the exception occurs:

return

 

 

ManagerBase<ProductsDataProvider>.GetManager<ProductsManager>(providerName);

 

 

Appriciate if someone can help me to get this sample module code working.

Thanks,
Duneel

Posted by Community Admin on 20-Jan-2011 00:00

Hi Duneel,

After changing the folder you should also verify your OpenAccess Enhancer path, which you can find if you open your .csproj file for text editing.

Find the two Exec tags that reference the enhancer in the property Command, it may look like this

<Exec IgnoreExitCode="false" WorkingDirectory="$(TargetDir)" Command=""..\..\..\SDK\Libraries\VEnhance.exe" -verboseMode:2 "-config:$(ProjectDir)App.config" -signAssembly "-keyFile:$(ProjectDir)$(AssemblyOriginatorKeyFile)" "-assembly:$(TargetPath)"" Condition="'$(AssemblyOriginatorKeyFile)'!=''" />
<Exec IgnoreExitCode="false" WorkingDirectory="$(TargetDir)" Command=""..\..\..\SDK\Libraries\VEnhance.exe" -verboseMode:2 "-config:$(ProjectDir)App.config" "-assembly:$(TargetPath)"" Condition="'$(AssemblyOriginatorKeyFile)'==''" />

Then change the paths with your new ones and build again.

Kind regards,
George
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.

Posted by Community Admin on 20-Jan-2011 00:00

Hi George,

I fixed the paths once i moved the sample project to a different folder. The enhancer paths seems configured properly now. Initially i was getting the following error when I tried to build the project. So i fixed the paths and now it builds without any problems.

The command ""SSDK\Libraries\VEnhance.exe" -verboseMode:2 "-config:D:\Dev\Code Library\ASP.NET\SFCustomModule\Products\App.config" "-assembly:D:\Dev\Code Library\ASP.NET\SFCustomModule\Products\bin\Debug\ProductCatalogSample.dll"" exited with code 3

Thanks,
Duneel

 

Posted by Community Admin on 21-Jan-2011 00:00

Hello Duneel,

Thank you for getting back to us.

Could you please clarify did fixing the paths to enhancer resolve the issue or not? It is a little bit unclear to us what happened after you have fixed them.

All the best,
Radoslav Georgiev
the Telerik team


Check out Telerik Trainer, the state of the art learning tool for Telerik products.

Posted by Community Admin on 21-Jan-2011 00:00

Hello Radoslav,

No I still couldnt get it working. I'm receiving the exception I have stated in my first post. I triled the sample solution itself that came with the SDK and I'm still receiving the same error.

Thanks,
Duneel

Posted by Community Admin on 28-Jan-2011 00:00

Hello Duneel,

Can you upload the project in your current configuration , so we could simulate the same build, if the module is properly enhanced, there shouldn't be any issues with the installation.
Also what i would suggest to do is to delete all configuration files in the web project , start sitefinity installation from scratch so it builds a new database, and than put the configuration line for installing the new module. E.g. there might be some left-over data in the database or configuration from a unsuccessfull module installation.

Regards,
Nikolay Datchev
the Telerik team


Check out Telerik Trainer, the state of the art learning tool for Telerik products.

This thread is closed