Mono Support Building a custom WebPart 

Viewed 26123 time(s), 5 post(s), 5/27/2011 3:22:00 PM - by gonzalom
5/27/2011 3:22:39 PM
345 Reputation 38 Total posts

Hi, I tryed to follow this tutorial for building custom webparts.
After reading it I downloaded the code but found some errors at compile time.
It seems some references are missing at my solution tree. VS complains about undefined classes and namespaces but the only option it offers me is to generate the code.
Please look at the attached snaphots called PopularGroupRepository1.png and PopularGroupRepository2.png.

Something similar happens in the class PopularGroupRepository. This seems to be a less problematic case because is just one variable missing. I have no idea what value should it hold. Please look at BindData.png

Thanks in advance,

Gonzalo

1
5/27/2011 3:35:21 PM
7207 Reputation 956 Total posts

Hi Gonzalo,
CacheRootKey property was recently removed from the BasePart, but is still present in the samples - you can put your own value, it is just a simple string constant that uniqely identifies your part in the cache store. For example, BlogList uses CacheKeys.Blog.BlogList, which simply holds a string value "MxBlogList". You can put "MyPopularGroups" or something like that.
As for other errors, these are easy to fix - just delete the failing references from the project and add them again from the /bin folder of MonoX - from your screenshots, I would say that you need to do it for MonoX.dll, MonoSoftware.MonoX.DAL.dll and SD.LLBLGen.Pro.ORMSupportClasses.NET35.dll.

2
5/27/2011 6:18:57 PM
345 Reputation 38 Total posts

Hi Denis,

I have no failing references in the project. However it seems one of the assemblies you mention was missing.
I think you meant SD.LLBLGen.Pro.ORMSupportClasses.NET20.dll right? Because I didn't find SD.LLBLGen.Pro.ORMSupportClasses.NET35.dll and SD.LLBLGen.Pro.ORMSupportClasses.NET20.dll worked.

Thanks,

Gonzalo

3
5/27/2011 8:09:46 PM
7207 Reputation 956 Total posts

Yes, that was my mistake. Can you now compile the project?

4
5/30/2011 1:00:05 PM
345 Reputation 38 Total posts

Yes, thanks.

5
This is a demo site for MonoX. Please visit Mono Software for more info.