compile 20.3 under VS2019

For complex topics that regular users would not be interested in. For power users and database administrators.
Post Reply
jfd2
Posts: 55
Joined: Sat Feb 16, 2008 10:14 pm

compile 20.3 under VS2019

Post by jfd2 » Tue Nov 10, 2020 3:27 pm

Hello All,

Sorry to bother everyone. Right now I am trying to compile and upgrade my systems and got some compiling errors. notably are all dlls not found, like codebase.dll, dataconnectbase,dll etc, total eight of them. I guess something wrong with the setup.

here is my system info:
  • windows 7 64 bit
    VS community 2019
    mySQl connector 8.x
my current production running env:
  • all db and files on ubuntu 16lts with mysql 5.6
    client are windows 10
since I am in preparation to move to ubuntu 20lts and the default mysql version is 8.x. i want to try this new version with opendental (please let me know if anybody already tried).

Please help with compilation, thanks a lot for that.
Best regards,

Jeff

User avatar
jordansparks
Site Admin
Posts: 5739
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: compile 20.3 under VS2019

Post by jordansparks » Tue Nov 10, 2020 6:14 pm

Just our ordinary source code? Or some of yours mixed in?
Jordan Sparks, DMD
http://www.opendental.com

jfd2
Posts: 55
Joined: Sat Feb 16, 2008 10:14 pm

Re: compile 20.3 under VS2019

Post by jfd2 » Tue Nov 10, 2020 6:50 pm

just pulled the code, no changes at all, but the Vs2019 made some changes to the project automatically. I did not digging to what it did. Thanks.
Best regards,

Jeff

User avatar
jordansparks
Site Admin
Posts: 5739
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: compile 20.3 under VS2019

Post by jordansparks » Tue Nov 10, 2020 8:17 pm

Make sure your configuration for the entire solution and most projects is Debug x86 (not Any CPU or Mixed Platforms).
Jordan Sparks, DMD
http://www.opendental.com

jfd2
Posts: 55
Joined: Sat Feb 16, 2008 10:14 pm

Re: compile 20.3 under VS2019

Post by jfd2 » Sat Nov 14, 2020 2:24 pm

Repulled everything using a clean repo, here is what I got from the loading. Looks like I am missing some of the sub-projects in the code. anything I missed? Thanks!

Code: Select all

D:\Work\Shared Projects Subversion\EHR\EHR_20_3\EHR\xEHR.csproj : error  : The project file could not be loaded. Could not find a part of the path 'D:\Work\Shared Projects Subversion\EHR\EHR_20_3\EHR\xEHR.csproj'.  D:\Work\Shared Projects Subversion\EHR\EHR_20_3\EHR\xEHR.csproj

D:\Work\Shared Projects Subversion\OpenDentalHelp\OpenDentalHelp_20_3\OpenDentalHelp\OpenDentalHelp.csproj : error  : The project file could not be loaded. Could not find a part of the path 'D:\Work\Shared Projects Subversion\OpenDentalHelp\OpenDentalHelp_20_3\OpenDentalHelp\OpenDentalHelp.csproj'.  D:\Work\Shared Projects Subversion\OpenDentalHelp\OpenDentalHelp_20_3\OpenDentalHelp\OpenDentalHelp.csproj

D:\Work\Shared Projects Subversion\OpenDentalWebApps\OpenDentalWebApps_20_3\OpenDentalWebCore\OpenDentalWebCore.csproj : error  : The project file could not be loaded. Could not find a part of the path 'D:\Work\Shared Projects Subversion\OpenDentalWebApps\OpenDentalWebApps_20_3\OpenDentalWebCore\OpenDentalWebCore.csproj'.  D:\Work\Shared Projects Subversion\OpenDentalWebApps\OpenDentalWebApps_20_3\OpenDentalWebCore\OpenDentalWebCore.csproj

D:\Work\Shared Projects Subversion\CDT\CDT_20_3\xCDT.csproj : error  : The project file could not be loaded. Could not find a part of the path 'D:\Work\Shared Projects Subversion\CDT\CDT_20_3\xCDT.csproj'.  D:\Work\Shared Projects Subversion\CDT\CDT_20_3\xCDT.csproj

D:\Work\Shared Projects Subversion\ODCrypt\ODCrypt_20_3\xODCrypt.csproj : error  : The project file could not be loaded. Could not find a part of the path 'D:\Work\Shared Projects Subversion\ODCrypt\ODCrypt_20_3\xODCrypt.csproj'.  D:\Work\Shared Projects Subversion\ODCrypt\ODCrypt_20_3\xODCrypt.csproj

D:\Work\Shared Projects Subversion\OpenDentalWebApps\OpenDentalWebApps_20_3\OpenDentalSocket\OpenDentalSocket.csproj : error  : The project file could not be loaded. Could not find a part of the path 'D:\Work\Shared Projects Subversion\OpenDentalWebApps\OpenDentalWebApps_20_3\OpenDentalSocket\OpenDentalSocket.csproj'.  D:\Work\Shared Projects Subversion\OpenDentalWebApps\OpenDentalWebApps_20_3\OpenDentalSocket\OpenDentalSocket.csproj

D:\Work\Shared Projects Subversion\VirtualWeb\VirtualWeb_20_3\VirtualWeb.csproj : error  : The project file could not be loaded. Could not find a part of the path 'D:\Work\Shared Projects Subversion\VirtualWeb\VirtualWeb_20_3\VirtualWeb.csproj'.  D:\Work\Shared Projects Subversion\VirtualWeb\VirtualWeb_20_3\VirtualWeb.csproj

D:\Work\Shared Projects Subversion\OpenDentalImaging\OpenDentalImaging_20_3\OpenDentalImaging.csproj : error  : The project file could not be loaded. Could not find a part of the path 'D:\Work\Shared Projects Subversion\OpenDentalImaging\OpenDentalImaging_20_3\OpenDentalImaging.csproj'.  D:\Work\Shared Projects Subversion\OpenDentalImaging\OpenDentalImaging_20_3\OpenDentalImaging.csproj

D:\Work\Shared Projects Subversion\OpenDentalWebApps\OpenDentalWebApps_20_3\OpenDentBusiness.ODXam_20_3\OpenDentBusiness.ODXam_20_3.csproj : error  : The project file could not be loaded. Could not find a part of the path 'D:\Work\Shared Projects Subversion\OpenDentalWebApps\OpenDentalWebApps_20_3\OpenDentBusiness.ODXam_20_3\OpenDentBusiness.ODXam_20_3.csproj'.  D:\Work\Shared Projects Subversion\OpenDentalWebApps\OpenDentalWebApps_20_3\OpenDentBusiness.ODXam_20_3\OpenDentBusiness.ODXam_20_3.csproj
Best regards,

Jeff

joes
Posts: 239
Joined: Tue Aug 13, 2019 12:41 pm

Re: compile 20.3 under VS2019

Post by joes » Mon Nov 16, 2020 9:05 am

Any projects with "Shared Projects Subversion" in their path are Open Dental's internal projects. The repos for these are not publicly available. You can unload or remove those projects.
Joe Sullivan
Open Dental Software
http://www.opendental.com

jfd2
Posts: 55
Joined: Sat Feb 16, 2008 10:14 pm

Re: compile 20.3 under VS2019

Post by jfd2 » Mon Nov 16, 2020 5:41 pm

thanks, I tried that and removed all unloadables and added all required dlls to the reference. but still got some complaints. looks like some of the required dlls not checked in.
Best regards,

Jeff

joes
Posts: 239
Joined: Tue Aug 13, 2019 12:41 pm

Re: compile 20.3 under VS2019

Post by joes » Tue Nov 17, 2020 8:47 am

What dlls are causing the issue?
Joe Sullivan
Open Dental Software
http://www.opendental.com

jfd2
Posts: 55
Joined: Sat Feb 16, 2008 10:14 pm

Re: compile 20.3 under VS2019

Post by jfd2 » Tue Nov 17, 2020 6:09 pm

Looks like this error message is critical:

Code: Select all

Severity	Code	Description	Project	File	Line	Suppression State
Error		Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.	OpenDentBusiness	I:\dev\opendental\opendental20.3\OpenDentBusiness\SGEN	

This made the opendentalbusiness.dll not compiled and then all dependencies broken due to this.

Thanks
Best regards,

Jeff

User avatar
jordansparks
Site Admin
Posts: 5739
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: compile 20.3 under VS2019

Post by jordansparks » Tue Nov 17, 2020 8:11 pm

Mixed mode assembly error is addressed here:
https://www.opendental.com/site/sourcecode.html
Jordan Sparks, DMD
http://www.opendental.com

jfd2
Posts: 55
Joined: Sat Feb 16, 2008 10:14 pm

Re: compile 20.3 under VS2019

Post by jfd2 » Tue Nov 17, 2020 8:57 pm

thanks! that solved the compile issue and all dlls comiled. then it bumps into the app version lower than the db version (43 < 44 as it indicated).
Best regards,

Jeff

User avatar
jordansparks
Site Admin
Posts: 5739
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: compile 20.3 under VS2019

Post by jordansparks » Tue Nov 17, 2020 10:16 pm

That means you must be trying to connect to a database that had been used by a slightly newer version of OD. Not sure how you did that, exactly. It's good to have a slightly older version of a db that you can make copies of for repeated testing. There are lots of ways to approach it. You'll figure something out.
Jordan Sparks, DMD
http://www.opendental.com

jfd2
Posts: 55
Joined: Sat Feb 16, 2008 10:14 pm

Re: compile 20.3 under VS2019

Post by jfd2 » Wed Nov 18, 2020 8:45 am

Actually I did not do anything unusual to come to that. after compiling and I run it directly from the release dir to test. then it started the db upgrade as expected, which is from 17.3.x to 20.3.x. At the end, it throws the version mismatch message and out.

I guess if it is not a bug, then might be related to the checked in dlls that have an index to the older version? I updated the latest code to make sure that I have not missed any new changes.

as for the db, I have lots of backups and I was on a non-production server so should be fine. BTW, I am still on the mysql 5.6.x for the testing. once this test passes, I will move to the mysql 8.0.x.

thanks a lot.
Best regards,

Jeff

jfd2
Posts: 55
Joined: Sat Feb 16, 2008 10:14 pm

Re: compile 20.3 under VS2019

Post by jfd2 » Thu Nov 19, 2020 10:32 am

Ok, did more on this today and got very puzzled.

Basically I pulled the 20.4 branch and compiled it. then running it got the database upgrade. unfortunately the same thing happened. the error message is "app 20.4.21.0 less than db 20.4.22.0".

I am wonder if my db has some issues previously exist that trigger this sort of issues? in any case, the only way to solve this that I can think of right now is to manually bump up the version number using a stalled branch, like 20.2.x etc?

Thanks.
Best regards,

Jeff

User avatar
jordansparks
Site Admin
Posts: 5739
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: compile 20.3 under VS2019

Post by jordansparks » Thu Nov 19, 2020 8:21 pm

Not sure. We don't usually see that.
Jordan Sparks, DMD
http://www.opendental.com

jfd2
Posts: 55
Joined: Sat Feb 16, 2008 10:14 pm

Re: compile 20.3 under VS2019

Post by jfd2 » Fri Nov 20, 2020 7:53 am

I reproduced this again using 20.4.21.0, which is the latest code I pulled as of yesterday. here are the observation:

When db upgrade start, the message clearly stated that the upgrade is to 20.4.21.0, but as it finished, it bumped up to 20.4.22.0. So resetting or auto-increasing this number during end of db upgrade is not consistent with the app version.

I also checked the updatehistory, the table clearly show the programVersion is 20.4.21.0.

The solution I am thinking of right now is to reset this to the app version in the db since clearly the db version is wrongly set.

Could you please tell me which table is this number set? I will do a manualy reset and see.

Thanks.
Best regards,

Jeff

jfd2
Posts: 55
Joined: Sat Feb 16, 2008 10:14 pm

Re: compile 20.3 under VS2019

Post by jfd2 » Fri Nov 20, 2020 8:33 am

Ok, I pulled the latest code 20.4.22 and then recompiled it. the issue magically gone. Is this due to some odd/even version strategies?
thanks.
Best regards,

Jeff

User avatar
jordansparks
Site Admin
Posts: 5739
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: compile 20.3 under VS2019

Post by jordansparks » Fri Nov 20, 2020 8:55 am

I think I know. We add conversion scripts at random times prior to release. Then, we change the version number upon release. I always work in the head, so I never notice this issue. Go to OpenDental, Program, Properties, Assembly Information. Change the version there to match the version of the conversion script in ConvertDatabases6(or7). I spend a lot of time in ConvertDatabases7 trying to catch queries that slipped through between versions. Errors can accumulate over time, and research in that file is required. As I'm working in the head, and more and more queries get missed by me, the database becomes too corrupt to use, so I start with a fresh one from a few versions ago. That won't work if you're trying to use it with live patient data, so you will want to keep a close eye on those scripts. We tend to add fewer new scripts to the stable (20.3) than the beta (20.4), so 20.3 will be a little easier to maintain.
Jordan Sparks, DMD
http://www.opendental.com

allends
Posts: 235
Joined: Fri Aug 23, 2013 11:29 am

Re: compile 20.3 under VS2019

Post by allends » Fri Nov 20, 2020 9:49 am

jfd2,

If you want to self-compile and not have this problem happen a lot of the time or have to go through the hassle of constantly monitoring what queries and features are getting added to the convert script, then I recommend updating to commits that have specific versions noted in the commit log message rather than updating to the latest code.

This will allow you to side-step this issue since you will always be using a commit revision that we considered a release commit.
Allen
Open Dental Software
http://www.opendental.com

jfd2
Posts: 55
Joined: Sat Feb 16, 2008 10:14 pm

Re: compile 20.3 under VS2019

Post by jfd2 » Fri Nov 20, 2020 10:39 am

Thank you both for the replies. good point that from now on if I checked out version, I will try to use the tag to avoid this issue. right now my next step is let the doctor play for several days with the new version and I will try to connect it to the mysql 8.0.
Best regards,

Jeff

jfd2
Posts: 55
Joined: Sat Feb 16, 2008 10:14 pm

Re: compile 20.3 under VS2019

Post by jfd2 » Fri Nov 20, 2020 2:57 pm

Some thoughts on the DB corruption since Dr Sparks mentioned that the maintenance time consumed. As myself an engineer in the bay area, have done lots of releases. It might be better to adopt a different release strategies to reduce the dev debt. Looks like you are on the quarterly release trains. it might well reduce the cost if only allow the 1st month of the cycle to have scheme changes; then the other parts of the cycle no scheme changes and only code fix. in this way, it might give better planning and design and reduce the maintenance costs. if later in the cycle find out that more scheme changes is needed for a feature, then push to the next train other than the current train.

Just 2 cents.

BTW, any plan to move to the git repo or stay with svn?

Thanks.
Best regards,

Jeff

User avatar
jordansparks
Site Admin
Posts: 5739
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: compile 20.3 under VS2019

Post by jordansparks » Sun Nov 22, 2020 8:17 am

No schema changes would be best, of course, but the downside is making customers wait months. We have big discussions about backporting any schema changes, and the benefits must heavily outweigh the costs each time.
Yes, we've been trying to move to git for years. But we have a massive private repository as well. There is a huge complex web of hard-coded paths, automated tools, documentation, etc, that must all be changed at the same time. Since we don't want to lose our commit history, it will also involve a conversion of all history. It will take us down for about a month, even after very careful planning. That's fine, and we will do it, but it's just hard to find the right time.
Jordan Sparks, DMD
http://www.opendental.com

jfd2
Posts: 55
Joined: Sat Feb 16, 2008 10:14 pm

Re: compile 20.3 under VS2019

Post by jfd2 » Tue Nov 24, 2020 7:01 pm

The schema change is a discipline, once starts, it might have some cry during the first 1-2 releases, but late on will smooth out.

for the git move, I would think it would be better if done earlier since it will enhance your release strategies in addition to other benefits.

I might be able to help if you allow me for the git move. I can start to investigate since I will have time during the X'mas period. My plan advanced and I am ready to make all the changes during Thanksgiving (without anything to do anyway during the pandemic!) by upgrading servers to ubuntu 20LTS and mysql 8.0 and OD to 20.3. Through It was scheduled to upgrade during Christmas and New Year break.

These two weeks I had some brief browsering of the code and have some thoughts. I have to mention that I am not a C# guy and the only thing I did with C# was in 2001 or so in its earliest stage. I am more of a java and python guy. so be aware that my thinking could be way out of whack!
1) I notice you checked in all required dlls, this could be replaced with nuget packages in definition with public libs. It will reduce lot of binary files in the git repo which git is not very smart to handle LFS and need a special module.
2) for your local generated shared dll files from none-public source code, you might need to use a local Nuget-like gallery for your dlls other than check all them in, but linked like nuget way by version numbers. I checked this could be done.
3) then for the current code, I do not know too much about how you structured, branched and tagged, it should be able to do since lots of repos already did. one thing I did before (10 yrs ago) is an author files as the start.
4) Most of the cases are only cloning the trunk. then manually inspect and tag them. I assume all your branches have ended up in the trunk at some points.

just throw some idea for you. not really well thought!

Thanks.
Best regards,

Jeff

User avatar
jordansparks
Site Admin
Posts: 5739
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: compile 20.3 under VS2019

Post by jordansparks » Tue Nov 24, 2020 8:29 pm

Thanks for the ideas. We have to do this ourselves, of course.
Jordan Sparks, DMD
http://www.opendental.com

Post Reply