Compiler errors in the latest code online.

This forum is for programmers who have questions about the source code.
Post Reply
CeylonSoft100
Posts: 4
Joined: Fri Dec 14, 2018 3:42 pm

Compiler errors in the latest code online.

Post by CeylonSoft100 » Fri Dec 14, 2018 3:46 pm

While compiling I get an error (60 of them) in lines like:

_onInitialize?.Invoke(this);

Please advise.

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

Re: Compiler errors in the latest code online.

Post by jsalmon » Fri Dec 14, 2018 4:24 pm

What's one of the errors (or several of them)?
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

CeylonSoft100
Posts: 4
Joined: Fri Dec 14, 2018 3:42 pm

Re: Compiler errors in the latest code online.

Post by CeylonSoft100 » Fri Dec 14, 2018 6:08 pm

Error 1 Invalid expression term '.' ..\OpenDental\OpenDental18_3_org\CodeBase\Utilities\ODThread.cs 97 18 UpdateFileCopier

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

Re: Compiler errors in the latest code online.

Post by jsalmon » Sun Dec 16, 2018 7:16 am

That error is due to the version of C# you are using which is not able to understand the null-conditional operator. You simply need to upgrade to at least C# version 6.0
https://docs.microsoft.com/en-us/dotnet ... l-operator

I'll make a note to myself to update our website to include the recommended version of C# that we use.
https://www.opendental.com/site/sourcecode.html
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

CeylonSoft100
Posts: 4
Joined: Fri Dec 14, 2018 3:42 pm

Re: Compiler errors in the latest code online.

Post by CeylonSoft100 » Mon Dec 17, 2018 12:51 pm

I upgraded to Visual Studion 2017.

These are the errors I am getting after Clean and Build:

Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'CodeBase' could not be found (are you missing a using directive or an assembly reference?) OpenDentalCloud X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentalCloud\Storage\Dropbox.cs 1 Active
Error CS0246 The type or namespace name 'CodeBase' could not be found (are you missing a using directive or an assembly reference?) OpenDentalCloud X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentalCloud\Storage\Sftp.cs 7 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentalCloud\bin\Debug\OpenDentalCloud.dll' could not be found OpenDentBusiness X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentBusiness\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentBusiness\bin\Debug\OpenDentBusiness.dll' could not be found OpenDentalGraph X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentalGraph\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentBusiness\bin\Debug\OpenDentBusiness.dll' could not be found ServiceManager X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\ServiceManager\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentBusiness\bin\Debug\OpenDentBusiness.dll' could not be found SparksToothChart X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\SparksToothChart\CSC 1 Active
Error CS0246 The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?) xDatabaseIntegrityCheck X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\DatabaseIntegrityCheck\FormDatabaseCheck.cs 8 Active
Error CS0246 The type or namespace name 'MySqlConnection' could not be found (are you missing a using directive or an assembly reference?) xDatabaseIntegrityCheck X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\DatabaseIntegrityCheck\FormDatabaseCheck.cs 15 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentBusiness\bin\Debug\OpenDentBusiness.dll' could not be found xODR X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\ODR\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\ODR\bin\Debug\ODR.dll' could not be found OpenDental X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDental\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentalCloud\bin\Debug\OpenDentalCloud.dll' could not be found OpenDental X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDental\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentalGraph\bin\Debug\OpenDentalGraph.dll' could not be found OpenDental X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDental\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentBusiness\bin\Debug\OpenDentBusiness.dll' could not be found OpenDental X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDental\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\ServiceManager\bin\Debug\ServiceManager.exe' could not be found OpenDental X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDental\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\SparksToothChart\bin\Debug\SparksToothChart.dll' could not be found OpenDental X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDental\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentBusiness\bin\Debug\OpenDentBusiness.dll' could not be found UnitTestsCore X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\UnitTestsCore\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentBusiness\bin\Debug\OpenDentBusiness.dll' could not be found xCrudGenerator X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\xCrudGenerator\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentalCloud\bin\Debug\OpenDentalCloud.dll' could not be found OpenDentHL7 X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentHL7\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentBusiness\bin\Debug\OpenDentBusiness.dll' could not be found OpenDentHL7 X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentHL7\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentBusiness\bin\Debug\OpenDentBusiness.dll' could not be found OpenDentalServer X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentalServer\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\xCrudGenerator\bin\Debug\CrudGenerator.exe' could not be found UnitTests X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\UnitTests\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDental\bin\Debug\OpenDental.exe' could not be found UnitTests X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\UnitTests\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentBusiness\bin\Debug\OpenDentBusiness.dll' could not be found UnitTests X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\UnitTests\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\UnitTestsCore\bin\Debug\UnitTestsCore.dll' could not be found UnitTests X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\UnitTests\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentBusiness\bin\Debug\OpenDentBusiness.dll' could not be found WebCamOD X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\WebCamOD\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\ODR\bin\Debug\ODR.dll' could not be found xCentralManager X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\CentralManager\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDental\bin\Debug\OpenDental.exe' could not be found xCentralManager X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\CentralManager\CSC 1 Active
Error CS0006 Metadata file 'X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentBusiness\bin\Debug\OpenDentBusiness.dll' could not be found xCentralManager X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\CentralManager\CSC 1 Active

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

Re: Compiler errors in the latest code online.

Post by jsalmon » Mon Dec 17, 2018 2:16 pm

CeylonSoft100 wrote:Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'CodeBase' could not be found (are you missing a using directive or an assembly reference?) OpenDentalCloud X:\ceysoft\CeysoftUI\OpenDental\OpenDental18_3_1\OpenDentalCloud\Storage\Dropbox.cs 1 Active
The CodeBase project is vital to everything we program and so your project(s) need to be able to find that project reference.
E.g. the following chunk of code should be present within the OpenDentalCloud project file and yours is acting like it cannot decipher the relative path correctly.

Code: Select all

<ItemGroup>
  <ProjectReference Include="..\CodeBase\xCodeBase.csproj">
    <Project>{18f7bc78-4b99-48d3-a1f1-0d13a63e3cf9}</Project>
    <Name>xCodeBase</Name>
  </ProjectReference>
</ItemGroup>
That or your CodeBase project cannot build which I would need to see those errors instead so you might try right clicking on the xCodeBase project within the solution and making sure it can build on its own. At the very least that will get rid of these erroneous errors and get us to the juicy stuff.
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

CeylonSoft100
Posts: 4
Joined: Fri Dec 14, 2018 3:42 pm

Re: Compiler errors in the latest code online.

Post by CeylonSoft100 » Tue Dec 18, 2018 12:46 pm

xCodebase does not build because it is missing NuGetPackages. What are the packages needed by OpenDental?

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

Re: Compiler errors in the latest code online.

Post by jsalmon » Tue Dec 18, 2018 2:53 pm

My NuGet Manager for the OpenDental solution says:

Code: Select all

MySql.Data by Oracle (v8.0.13)    <= I don't think this is necessary but doesn't hurt
Newtonsoft.Json by James Newton-King (v12.0.1)   <= this is a known requirement
^ However, the actual version of JSON installed is v9.0.1 so I don't know why the manager says v12.0.1... maybe it wants us to update the package...
Regardless, each of these dlls (and the exact version of which we use) can be found within our "Required dlls" folder so you don't technically need to fuss with NuGet if you don't want to, simply disable it and manually use these files:
...Required dlls\MySql.Data.dll
...Required dlls\Newtonsoft.Json.dll
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