Solved

c# system.globalization.ChineseLunisolarCalendar can't seem to get this to work

Posted on 2014-09-29
6
323 Views
Last Modified: 2014-11-12
Hello

I am trying to use the ChineseLunisolarCalendar procedure which should be defined in the System.Globalization class using Visual Studio 2013 c# project, but I can't seem to get it to recognise the ChineseLunisolarCalendar reference within the System.Globalization namespace, any ideas on what I might be missing?
see http://technet.microsoft.com/en-us/network/system.globalization(v=vs.95)
and
http://technet.microsoft.com/en-us/network/system.globalization.chineselunisolarcalendar(v=vs.95)

The error I get is as follows:

Error      1      The type or namespace name 'ChineseLunisolarCalendar' does not exist in the namespace 'System.Globalization' (are you missing an assembly reference?

Thanks for any feedback you might be able to provide.

el
0
Comment
Question by:elschott
  • 2
  • 2
  • 2
6 Comments
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 40352301
What version of .NET are you targeting? That class seems to come up for me:

Screenshot
0
 
LVL 15

Assisted Solution

by:Ess Kay
Ess Kay earned 250 total points
ID: 40352358
You need to add a reference to sysglobl.dll. This is already installed in the GAC as sysglobl.

For future reference, if you check the MSDN page for CultureAndRegionInfo you can see that it says

Namespace:  System.Globalization

Assembly:  sysglobl (in sysglobl.dll)

The issue is that namespaces can be spread across different assemblies (for example, System.Globalization.CultureInfo lives in mscorlib.)
0
 

Author Comment

by:elschott
ID: 40354072
Thanks for the feedback both comments were useful. My application is a windows phone application so this might be the source of my problem. If I create a straight Windows application the system.globalization works correctly. So it doesn't appear to work with windows phone app.

I tried adding the sysglobl.dll but I get the following error:

"a reference to a higher version or incompatible assembly cannot be added to the project"

any ideas if this is fixable
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 74

Accepted Solution

by:
käµfm³d   👽 earned 250 total points
ID: 40354284
As I understand, Windows Phone uses a smaller subset of the Framework. This option may be lacking from that environment.
0
 

Author Closing Comment

by:elschott
ID: 40359213
Apparently it can't be done. Thanks for the feedback.
0
 
LVL 15

Expert Comment

by:Ess Kay
ID: 40360029
have you tried manually addind the reference,  and packaging it with the program?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now