Error compiling 16.2.53

This forum is for programmers who have questions about the source code.
Post Reply
User avatar
mopensoft
Posts: 146
Joined: Tue Dec 04, 2012 3:33 pm
Location: Melbourne, Australia
Contact:

Error compiling 16.2.53

Post by mopensoft » Tue Sep 27, 2016 10:42 pm

Hi,

When I compile OD 162.53, I got a number of error from QualityMeasure.cs from properties for serializing ie.

[XmlElement(nameof(QualityMeasure.DictPatNumListEncounters),typeof(List<KeyValuePair<long,List<EhrCqmEncounter>>>))]

Errors are:

Error 146 An object reference is required for the non-static field, method, or property 'OpenDentBusiness.QualityMeasure.DictPatNumListEncounters'
Error 153 The name 'nameof' does not exist in the current context

Could you give me a hint on how to fix it? The projects are building on .NET Framework 4. I guess some settings may need to update.

Thanks
M

User avatar
jsalmon
Posts: 1551
Joined: Tue Nov 30, 2010 12:33 pm
Contact:

Re: Error compiling 16.2.53

Post by jsalmon » Wed Sep 28, 2016 9:12 am

The keyword "nameof" is a C# 6.0 feature which currently only Visual Studio 2015 supports a C# 6.0 compiler (that I'm aware of).

I believe we or you could fix it by changing it from

Code: Select all

[XmlElement(nameof(QualityMeasure.DictPatNumListEncounters),typeof(List<KeyValuePair<long,List<EhrCqmEncounter>>>))]
to

Code: Select all

[XmlElement("QualityMeasure.DictPatNumListEncounters",typeof(List<KeyValuePair<long,List<EhrCqmEncounter>>>))]
Or something along those lines.
The best thing about a boolean is even if you are wrong, you are only off by a bit.

Jason Salmon
Open Dental Software
http://www.opendental.com

User avatar
cmcgehee
Posts: 711
Joined: Tue Aug 25, 2015 5:06 pm
Location: Salem, Oregon

Re: Error compiling 16.2.53

Post by cmcgehee » Wed Sep 28, 2016 2:32 pm

You also have the option to download a NuGet package so that you can use the most up-to-date C# compiler.
https://www.nuget.org/packages/Microsoft.Net.Compilers/
http://stackoverflow.com/questions/2863 ... tudio-2012
Chris McGehee
Open Dental Software
http://www.opendental.com

User avatar
mopensoft
Posts: 146
Joined: Tue Dec 04, 2012 3:33 pm
Location: Melbourne, Australia
Contact:

Re: Error compiling 16.2.53

Post by mopensoft » Wed Oct 05, 2016 9:04 pm

I tried to install compiler package but doesn't seem to work.

Installed VS2015 and all are working fine so far.

Thanks
M

mowgli
Posts: 134
Joined: Fri Sep 14, 2007 1:42 pm

Re: Error compiling 16.2.53

Post by mowgli » Thu Oct 06, 2016 1:25 pm

Would like to add that I also tried the other methods with VS2013 but that didn't get it. Upgrade to VS2015 did get it.

bantyg
Posts: 6
Joined: Mon Aug 17, 2015 1:58 am

Re: Error compiling 16.2.53

Post by bantyg » Sun Feb 19, 2017 2:21 am

is there a latest compiled version somewhere which I can download

User avatar
cmcgehee
Posts: 711
Joined: Tue Aug 25, 2015 5:06 pm
Location: Salem, Oregon

Re: Error compiling 16.2.53

Post by cmcgehee » Mon Feb 20, 2017 8:50 am

We don't store a compiled version of the program in our public repository. You can download the trial version which is fully compiled and contains the database: http://opendental.com/TrialDownload-15-4-35.exe. It, however, is not the latest and greatest. It contains version 15.4 while our latest stable version is 16.3. See http://opendental.com/manual/versions.html for version details.
Chris McGehee
Open Dental Software
http://www.opendental.com

Post Reply