Problems with VS 2010 and OD12.3 compiling

This forum is for programmers who have questions about the source code.
Post Reply
richberman
Posts: 16
Joined: Wed Mar 03, 2010 8:33 am

Problems with VS 2010 and OD12.3 compiling

Post by richberman » Tue Nov 13, 2012 10:57 am

I have not tried to compile OD since I used VS 2008 (OD7). So I've downloaded and installed VS 2010 successfully and downloaded OD 12.3 successfully. I followed the instructions on the sourcecode page and still I cannot compile. Here's my first issue: When VS loads the solution it gives me errors loading PatientPortal (THE PROJECT TYPE IS NOT SUPPORTED BY THIS INSTALLATION)
and xEHR.csprog (unable to read the project file)

If I then ignore this and try to build using x86, I get 22 errors and 23 warnings: (see below)

Any thoughts on where to start?
thanks,
rich

Error 22 Error 175: The specified store provider cannot be found in the configuration, or is not valid. \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\WebForms\ODWebServiceModel.edmx 7 161 WebForms
Error 23 Metadata file '\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\bin\Release\OpenDentBusiness.dll' could not be found WebForms
Error 24 Metadata file '\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\bin\Release\OpenDentBusiness.dll' could not be found xODR
Error 25 Metadata file '\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\bin\Release\OpenDentBusiness.dll' could not be found SparksToothChart
Error 26 Metadata file '\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\bin\Release\OpenDentBusiness.dll' could not be found xCrudGenerator
Error 27 Metadata file '\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\bin\Release\OpenDentBusiness.dll' could not be found WebHostSynch
Error 28 Metadata file '\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\WebForms\bin\Release\WebForms.dll' could not be found WebHostSynch
Error 29 Metadata file '\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\bin\Release\OpenDentBusiness.dll' could not be found OpenDental
Error 30 Metadata file '\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentalWpf\bin\Release\OpenDentalWpf.dll' could not be found OpenDental
Error 31 Metadata file '\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\ODR\bin\Release\ODR.dll' could not be found OpenDental
Error 32 Metadata file '\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\SparksToothChart\bin\Release\SparksToothChart.dll' could not be found OpenDental
Error 33 Metadata file '\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\bin\Release\OpenDentBusiness.dll' could not be found OpenDentHL7
Error 34 Metadata file '\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\bin\Release\OpenDentBusiness.dll' could not be found TestToothChart
Error 35 Metadata file '\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\SparksToothChart\bin\Release\SparksToothChart.dll' could not be found TestToothChart
Error 36 Metadata file '\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\bin\Release\OpenDentBusiness.dll' could not be found OpenDentalServer
Error 37 Metadata file '\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\bin\Release\OpenDentBusiness.dll' could not be found TestCanada
Error 38 Metadata file '\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDental\bin\Release\OpenDental.exe' could not be found TestCanada
Error 39 Metadata file '\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\bin\Release\OpenDentBusiness.dll' could not be found WebCamOD
Error 40 Metadata file '\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\bin\Release\OpenDentBusiness.dll' could not be found xCentralManager
Error 41 Metadata file '\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentHL7\bin\Release\OpenDentHL7.exe' could not be found ServiceManager
Warning 42 The referenced project '..\..\..\Shared Projects Subversion\EHR\EHR_12_3\EHR\xEHR.csproj' does not exist. OpenDental
Error 43 Could not load file or assembly 'file://\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\Required dlls\CDT.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\SGEN OpenDentBusiness
Error 44 Unknown build error, 'Index was outside the bounds of the array.' OpenDentalWpf
Warning 45 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\bin\Debug\OpenDentBusiness.dll", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. MobileWeb

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

Re: Problems with VS 2010 and OD12.3 compiling

Post by jsalmon » Tue Nov 13, 2012 12:14 pm

The Error 175 is probably related to your MySQL connector. Install the one from our web page in the MySQL Connector section: http://opendental.com/manual/sourcecode.html Once that error is fixed the rest might fix itself.

Open Dental should compile without ehr or the patient portal so I wouldn't worry about those projects. Whenever I see errors looking for metadata in the bin folder it makes me think projects are not set to build. In particular, it looks like OpenDentBusiness is the one that isn't set to build. It might be as simple as to right click OpenDentBusiness and click build then try to compile again. To be sure, you could right click on the Solution in the Solution Explorer and click Configuration Manager. Make sure all the projects are set to build except for MobileWeb, TestCanada, UnitTests, xEHR. You can exclude more than those four, I can't remember off the top of my head which projects are not required.
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

richberman
Posts: 16
Joined: Wed Mar 03, 2010 8:33 am

Re: Problems with VS 2010 and OD12.3 compiling

Post by richberman » Tue Nov 13, 2012 1:40 pm

Jason,
I had previously run the sql connector on from the sourcepage. I just re-ran it in "repair" mode. The business project was checked in the config, but I built it on its own to see what happens, and here's the result:

Error 1 Error 175: The specified store provider cannot be found in the configuration, or is not valid. \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\WebForms\ODWebServiceModel.edmx 7 161 WebForms
Warning 2 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\bin\Debug\OpenDentBusiness.dll", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. MobileWeb
Warning 3 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\WebForms\bin\Debug\WebForms.dll", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. MobileWeb
Warning 4 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\WebHostSynch\bin\Debug\WebHostSynch.dll", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. MobileWeb
Warning 5 XML comment is not placed on a valid language element \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\Mobile\TableTypes\Prefm.cs 11 2 OpenDentBusiness
Warning 6 The variable 'ex' is declared but never used \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\Mobile\Data Interface\PrefmC.cs 21 20 OpenDentBusiness
Warning 7 XML comment on 'OpenDentBusiness.Mobile.LabPanelm.SpecimenSource' has badly formed XML -- 'A semi colon character was expected.' \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\Mobile\TableTypes\LabPanelm.cs 22 63 OpenDentBusiness
Warning 8 The variable 'tasklist' is declared but never used \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\Data Interface\TaskLists.cs 197 13 OpenDentBusiness
Warning 9 XML comment is not placed on a valid language element \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\TableTypes\Claim.cs 216 3 OpenDentBusiness
Warning 10 XML comment is not placed on a valid language element \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\TableTypes\Claim.cs 218 3 OpenDentBusiness
Warning 11 XML comment is not placed on a valid language element \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\TableTypes\Claim.cs 220 3 OpenDentBusiness
Warning 12 XML comment is not placed on a valid language element \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\TableTypes\Claim.cs 222 3 OpenDentBusiness
Warning 13 XML comment is not placed on a valid language element \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\TableTypes\Claim.cs 224 3 OpenDentBusiness
Warning 14 The variable 'extension' is assigned but its value is never used \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\InternalTools\Phones\Phones.cs 233 8 OpenDentBusiness
Warning 15 XML comment is not placed on a valid language element \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\Misc\DatabaseMaintenance.cs 2504 7 OpenDentBusiness
Warning 16 The variable 'ex' is declared but never used \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\Misc\ConvertDatabases2.cs 7031 21 OpenDentBusiness
Warning 17 The variable 'ex' is declared but never used \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\Misc\ConvertDatabases2.cs 7042 21 OpenDentBusiness
Warning 18 The variable 'ex' is declared but never used \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\Misc\ConvertDatabases2.cs 7053 21 OpenDentBusiness
Warning 19 The variable 'ex' is declared but never used \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\Misc\ConvertDatabases2.cs 7064 21 OpenDentBusiness
Warning 20 The variable 'ex' is declared but never used \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\Misc\ConvertDatabases2.cs 7075 21 OpenDentBusiness
Warning 21 The variable 'ex' is declared but never used \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\Misc\ConvertDatabases2.cs 8314 21 OpenDentBusiness
Warning 22 The variable 'ex' is declared but never used \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\Misc\ConvertDatabases2.cs 8432 21 OpenDentBusiness
Warning 23 The variable 'ex' is declared but never used \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\Misc\ConvertDatabases2.cs 9113 21 OpenDentBusiness
Warning 24 The variable 'ex' is declared but never used \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\Misc\ConvertDatabases2.cs 9136 21 OpenDentBusiness
Warning 25 The variable 'ex' is declared but never used \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\Misc\ConvertDatabases2.cs 9357 21 OpenDentBusiness
Error 26 Could not load file or assembly 'file://\\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\Required dlls\CDT.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) \\dellserver.dentalartandscience.com\users\rberman\Visual Studio 2010\Projects\OD 12_3\OpenDentBusiness\SGEN OpenDentBusiness

I also tried to compile in Debug mode and it does get through the debug wit only warnings. Just switching it to release mode creates all of the issues in my first post.

Any more thoughts? It wouldn't matter that I'm on a Win7 machine logged into a domain would it?

thanks,
rich

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

Re: Problems with VS 2010 and OD12.3 compiling

Post by jsalmon » Tue Nov 13, 2012 2:22 pm

When in Release mode, go back to the Configuration Manager and make sure the Active solution platform is set to x86 and that all project Platform's are set to x86 (MobileWeb can be Any CPU if it exists in that version of OD). If all else fails make it look exactly like the Debug configuration. You can hop back and forth with the Active solution configuration drop down.
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

richberman
Posts: 16
Joined: Wed Mar 03, 2010 8:33 am

Re: Problems with VS 2010 and OD12.3 compiling

Post by richberman » Thu Nov 15, 2012 9:31 am

Jason,
I could not fix these issues so I started fresh on a windows XP machine and was able to get it compiled. Now I've copied over my real office data sql files to the test machine to make sure it all works and I get an error,"Incorrect key file for table 'preference' try to repair it. What do I do? Did I not copy over everything?

For background: I installed the trial version on this machine, then copied the actual data in the sql/data/opendental folder to this machine and copied everything in the /bin/release folder over to the program files/open dental folder.

Before I copied the data I ran a maintenance on the data and it fixed 2 minor errors.
My last live version is v. 7.0.2.0

thanks,
rich

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

Re: Problems with VS 2010 and OD12.3 compiling

Post by jsalmon » Thu Nov 15, 2012 11:07 am

When you manually copy over a database you probably didn't stop the MySQL service first. Unless you use a tool to copy over the database like SQLyog or some other software that basically makes a copy via SQL commands it should be a good habit to stop the service first. I usually see that error with corrupt tables or with an innodb table that was physically copied to a new computer (which you cannot do).
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

richberman
Posts: 16
Joined: Wed Mar 03, 2010 8:33 am

Re: Problems with VS 2010 and OD12.3 compiling

Post by richberman » Thu Nov 15, 2012 12:28 pm

Do I need to stop it on the donor and receiving computers or just the receiving?

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

Re: Problems with VS 2010 and OD12.3 compiling

Post by jsalmon » Thu Nov 15, 2012 1:02 pm

Just the donor.
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

richberman
Posts: 16
Joined: Wed Mar 03, 2010 8:33 am

Re: Problems with VS 2010 and OD12.3 compiling

Post by richberman » Thu Nov 15, 2012 4:43 pm

great. using sqlyog solved that issue. Now I'd like to just debug the mixed mode sgen issue. I can get it to compile if I change the config to no on the build tab, but I wanted to use your other mod on the sgen.exe.config file. I changed the file to exactly what you listed (cut/pasted) and it still gives the same error. Am I missing something else?

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

Re: Problems with VS 2010 and OD12.3 compiling

Post by jsalmon » Fri Nov 16, 2012 12:05 am

You completely lost me... I'm not sure what "mod" you are referring to. Regardless, there have been several threads talking about the sgen issue people keep having, this thread might be most pertinent to you: viewtopic.php?f=3&t=3964
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

richberman
Posts: 16
Joined: Wed Mar 03, 2010 8:33 am

Re: Problems with VS 2010 and OD12.3 compiling

Post by richberman » Fri Nov 16, 2012 8:04 am

Jason,
Thanks for the link to the other thread. It turns out my problem (on XP machine) was that the sgen.exe.config file I created was not in the NETFX4.0 Tools folder, but rather in the parent BIN folder. Once I copied the config file into the correct folder all compiled without errors!

Now I'll have to go and work out my Win7 issues.

thanks again.
rich

deedplot
Posts: 8
Joined: Mon Jan 28, 2013 7:26 pm
Location: Hickory, NC

Re: Problems with VS 2010 and OD12.3 compiling

Post by deedplot » Fri Feb 15, 2013 1:05 pm

It "appears" to me that the ex is there for debug purposes. You can remove the ex and have "Catch(exception){}" and eliminate this warning. Otherwise the warning appears to be harmless.

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

Re: Problems with VS 2010 and OD12.3 compiling

Post by jsalmon » Tue Feb 19, 2013 9:24 am

It used to be try { } catch { } which was not catching exceptions as expected (blew my mind to be honest). You're probably right that the ex is unnecessary, but it's in a touchy part of the program which we try to never change historical code. Manually specifying catching Exception correctly caught the error we were trying to prevent in the first place so since it works as is, I think the warnings will stick around. So be careful when coding and using try { } catch { }, it might not always catch...
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

Post Reply