Vista SP2 - error CS0101: The namespace 'Resources'

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
5/14/2009 5:27:22 PM
Gravatar
Total Posts 245
mojoPortal Community Expert

Vista SP2 - error CS0101: The namespace 'Resources'

Any one having problems when installing Vista SP2?

I re-built my laptop the last few days and now get one of these errors every time I run one of my mojoPortal Module projects from Visual Studio.
It's randon which error comes up first.

error CS0101: The namespace 'Resources' already contains a definition for 'GalleryResources'
error CS0101: The namespace 'Resources' already contains a definition for 'ForumResources'
error CS0101: The namespace 'Resources' already contains a definition for 'ContactFormResources'
error CS0101: The namespace 'Resources' already contains a definition for 'FeedResources'
error CS0101: The namespace 'Resources' already contains a definition for 'XmlResources'
error CS0101: The namespace 'Resources' already contains a definition for 'Resource'
error CS0101: The namespace 'Resources' already contains a definition for 'EventCalResources'
error CS0101: The namespace 'Resources' already contains a definition for 'SharedFileResources'
error CS0101: The namespace 'Resources' already contains a definition for 'BlogResources'

Acer Aspire 7720 with 4 GB Ram
Windows Vista Ultimate SP2 (NOTE: SP2 just came out and is not public yet) with all MS updates.
Visual Studio 2008 SP1 with all updates (including SilverLight ToolKit and MVC1)
I tried renaming Web/App_GlobalResources/Resource.zh-hant.resx to Resource.zh-CHT.resx and nothing changed.
When I run windows update, it says 'Windows is up to date'

My gut feeling is that MS has mad changes in SP2. But what do I know???
 

5/14/2009 5:29:38 PM
Gravatar
Total Posts 18439

Re: Vista SP2 - error CS0101: The namespace 'Resources'

Hi,

See the FAQ, I recently updated and FAQ item about this issue.

http://www.mojoportal.com/faq.aspx

Cheers,

Joe 

5/14/2009 8:11:50 PM
Gravatar
Total Posts 245
mojoPortal Community Expert

Re: Vista SP2 - error CS0101: The namespace 'Resources'

Hi Joe

I read the faq and followed the links...

Just spent 3 hours trying what I could to solve this.

I deleted all resource files with zh-hant in the name.  Still get all errors above.

I made a small C# exe and ran it which created an culture alias
CreateCopyCulture("zh-Hant", "zh-CHT");
from a MS link I found in your faq.  Did not help.

I noticed I got all the errors every time so I targeted the GalleryResources in an attempt to isolate which culture was the problem.
I tried to stop this one error.
error CS0101: The namespace 'Resources' already contains a definition for 'GalleryResources'

So... I deleted all GalleryResources resources files except GalleryResources.resx - Still get all errors above.

I then deleted the GalleryResources.resx file too.  - Still get all errors above including
error CS0101: The namespace 'Resources' already contains a definition for 'GalleryResources'.

Windows update says 'Windows is up to date'.
 

I am baffled
 

5/15/2009 4:16:07 AM
Gravatar
Total Posts 18439

Re: Vista SP2 - error CS0101: The namespace 'Resources'

If you're working with the source code you should get the code from svn trunk where this issue is already fixed. If you are working with a .zip download then you need to make sure you get the *.zh-Hant.resx files from the App_GlobalResources folders in mojoPortal.Features.UI project in addition to the ones under the main web/App_GlobablResources folder, otherwise post build events copy them back into the Web/App_GlobablResources folder. You will also need to exclude the files from the projects by right clicking them in VS and then if you renamed them, then re-include them with the new name unless you just deleted them.

Hope it helps,

Joe

5/15/2009 8:49:35 AM
Gravatar
Total Posts 245
mojoPortal Community Expert

Re: Vista SP2 - error CS0101: The namespace 'Resources'

Thanks Joe!

I just bought you a couple of beer.

I'm using downloaded source. I also needed to rem out these lines in LetterTemplateEdit.cs to get it to compile after deleting *.zh-Hant.resx files.

//reqTitle.ErrorMessage = Resource.NewsletterTemplateTitleRequired;
//reqPreviewAddress.ErrorMessage = Resource.NewsletterPreviewAddressRequired;
//regexPreviewAddress.ErrorMessage = Resource.NewsletterPreviewAddressRequired;

Thanks so much.

Rick hubka

5/16/2009 6:17:53 AM
Gravatar
Total Posts 18439

Re: Vista SP2 - error CS0101: The namespace 'Resources'

Hi Rick,

I can't see any reason why those lines would need to be commented out. I would try a reboot and put them back in and rebuild the solution.

I'm running the latest updates and not having any errors.

Best,

Joe 

5/16/2009 7:32:31 AM
Gravatar
Total Posts 245
mojoPortal Community Expert

Re: Vista SP2 - error CS0101: The namespace 'Resources'

Hi Joe

I did a re-boot and recompile.  Still get the errors and need to rem those 3 lines.

Here's the errors:

'Resources.Resource' does not contain a definition for 'NewsletterTemplateTitleRequired'
'Resources.Resource' does not contain a definition for 'NewsletterPreviewAddressRequired'
'Resources.Resource' does not contain a definition for 'NewsletterPreviewAddressRequired'

Rick

5/16/2009 7:34:31 AM
Gravatar
Total Posts 245
mojoPortal Community Expert

Re: Vista SP2 - error CS0101: The namespace 'Resources'

Maybe I deleted one too many resource files.

5/16/2009 7:39:17 AM
Gravatar
Total Posts 18439

Re: Vista SP2 - error CS0101: The namespace 'Resources'

Unless you are forcing a specific culture to be used, it should not throw this error unless you are missing Resource.resx or if your copy of Resource.resx is missing those keys somehow.

You must sign in to post in the forums. This thread is closed to new posts.