yuxi-research / APSIM-EnKF

An Ensemble Kalman filter (EnKF) data assimilaiton framework for the Agricultural Production Systems sIMulator (APSIM) model.
Other
10 stars 7 forks source link

Error in building the solution #2

Open TinaGuo10 opened 2 years ago

TinaGuo10 commented 2 years ago

Hi Yuxi, Thanks for sharing the source code. I followed the guide you mentioned in #1. However, there are still some errors while building the solution. I think we use the same versions of NuGet packages and run the code on VS 2015. My question might be naive but thanks in advance. Tina

Errors are listed as follows: image Severity Code Description Project File Line Suppression State Error CS0246 The type or namespace name 'DocumentFormat' could not be found (are you missing a using directive or an assembly reference?) APSIM.Shared C:\Users\ui\source\APSIM-EnKF-main\APSIM.Shared\Utilities\ExcelUtilities.cs 17 Active Error CS0246 The type or namespace name 'DocumentFormat' could not be found (are you missing a using directive or an assembly reference?) APSIM.Shared C:\Users\ui\source\APSIM-EnKF-main\APSIM.Shared\Utilities\ExcelUtilities.cs 18 Active Error CS0006 Metadata file 'C:\Users\ui\source\APSIM-EnKF-main\APSIM.Shared\bin\Debug\APSIM.Shared.dll' could not be found Models C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\Models\CSC 1 Active Error CS0006 Metadata file 'C:\Users\ui\source\APSIM-EnKF-main\APSIM.Shared\bin\Debug\APSIM.Shared.dll' could not be found Importer C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\Models\Importer\CSC 1 Active Error CS0006 Metadata file 'C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\Bin\Models.exe' could not be found Importer C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\Models\Importer\CSC 1 Active Error CS0006 Metadata file 'C:\Users\ui\source\APSIM-EnKF-main\APSIM.Shared\bin\Debug\APSIM.Shared.dll' could not be found UserInterface C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\UserInterface\CSC 1 Active Error CS0006 Metadata file 'C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\Models\Bin\Importer.exe' could not be found UserInterface C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\UserInterface\CSC 1 Active Error CS0006 Metadata file 'C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\Bin\Models.exe' could not be found UserInterface C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\UserInterface\CSC 1 Active

yuxi-research commented 2 years ago

Hi Tina,

Thanks for your interest in my code and sorry for the late reply. I was away for an experiment these days and was unable to reply to your question. Unfortunately I've never seen such an error message before but I will try to help you out. Did you try to build the APSIM.DA solution? Can you send me the screenshot of the entire window rather than only the error messages so I can understand what happened?

Cheers, Yuxi

On Fri, Apr 1, 2022 at 5:53 PM TinaGuo10 @.***> wrote:

Hi Yuxi, Thanks for sharing the source code. I followed the guide you mentioned in

1 https://github.com/yuxi-research/APSIM-EnKF/issues/1. However, there

are still some errors while building the solution. I think we use the same versions of NuGet packages and run the code on VS 2015. My question might be naive but thanks in advance.

Errors are listed as follows: Severity Code Description Project File Line Suppression State Error CS0246 The type or namespace name 'DocumentFormat' could not be found (are you missing a using directive or an assembly reference?) APSIM.Shared C:\Users\ui\source\APSIM-EnKF-main\APSIM.Shared\Utilities\ExcelUtilities.cs 17 Active Error CS0246 The type or namespace name 'DocumentFormat' could not be found (are you missing a using directive or an assembly reference?) APSIM.Shared C:\Users\ui\source\APSIM-EnKF-main\APSIM.Shared\Utilities\ExcelUtilities.cs 18 Active Error CS0006 Metadata file 'C:\Users\ui\source\APSIM-EnKF-main\APSIM.Shared\bin\Debug\APSIM.Shared.dll' could not be found Models C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\Models\CSC 1 Active Error CS0006 Metadata file 'C:\Users\ui\source\APSIM-EnKF-main\APSIM.Shared\bin\Debug\APSIM.Shared.dll' could not be found Importer C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\Models\Importer\CSC 1 Active Error CS0006 Metadata file 'C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\Bin\Models.exe' could not be found Importer C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\Models\Importer\CSC 1 Active Error CS0006 Metadata file 'C:\Users\ui\source\APSIM-EnKF-main\APSIM.Shared\bin\Debug\APSIM.Shared.dll' could not be found UserInterface C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\UserInterface\CSC 1 Active Error CS0006 Metadata file 'C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\Models\Bin\Importer.exe' could not be found UserInterface C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\UserInterface\CSC 1 Active Error CS0006 Metadata file 'C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\Bin\Models.exe' could not be found UserInterface C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\UserInterface\CSC 1 Active Error CS0103 The name 'Gtk' does not exist in the current context ApsimNG C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\ApsimNG\Main.cs 18 Active Error CS0103 The name 'Gtk' does not exist in the current context ApsimNG C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\ApsimNG\Main.cs 35 Active Error CS0103 The name 'Gtk' does not exist in the current context ApsimNG C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\ApsimNG\Main.cs 36 Active Error CS0103 The name 'Gtk' does not exist in the current context ApsimNG C:\Users\ui\source\APSIM-EnKF-main\ApsimX.DA\ApsimNG\Main.cs 46 Active

— Reply to this email directly, view it on GitHub https://github.com/yuxi-research/APSIM-EnKF/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASQB75DJ476R2CXD7UA56JDVC2MM3ANCNFSM5SHW75XA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

TinaGuo10 commented 2 years ago

Thank you so much for your warm reply, Yuxi. Hope your experiment goes well. I am sorry I didn't express my question clearly. I opened mypath\APSIM-EnKF-main\ApsimX.DA\ApsimX.sln in VS2015 and clicked Build-Build Solution. There are three of those errors described as NuGet Package restore failed for project UserInterface: Unable to find version '2.0.0-unstable0960' of package 'OxyPlot.WindowsForms', NuGet Package restore failed for project ApsimNG: Unable to find version '2.0.0-unstable0960' of package 'OxyPlot.Core'., NuGet Package restore failed for project UserInterface: Unable to find version '2.0.0-unstable0960' of package 'OxyPlot.Core'.. So I changed versions of OxlPlot.Core and OxlPlot.WindowForms to "2.0.0", and modified packages.config as well.

Then some errors and warnings threw out as I listed below. image image

I don't know if it helps, but I uploaded the project file I am working with. As the error messages CS0006 show, some .dll or .exe files are not generated as expected.

I appreciate your help a lot! Thank you. Tina

yuxi-research commented 1 year ago

Hi Tina,

That is still the issue of missing NuGets. I uploaded all packages in the latest commit. Can you try compiling and see if this solves the issue?

Cheers, Yuxi

On Thu, Apr 7, 2022 at 5:28 PM TinaGuo10 @.***> wrote:

Thank you so much for your warm reply, Yuxi. Hope your experiment goes well. I am sorry I didn't express my question clearly. I opened mypath\APSIM-EnKF-main\ApsimX.DA\ApsimX.sln in VS2015 and clicked Build-Build Solution. There are three of those errors described as NuGet Package restore failed for project UserInterface: Unable to find version '2.0.0-unstable0960' of package 'OxyPlot.WindowsForms', NuGet Package restore failed for project ApsimNG: Unable to find version '2.0.0-unstable0960' of package 'OxyPlot.Core'., NuGet Package restore failed for project UserInterface: Unable to find version '2.0.0-unstable0960' of package 'OxyPlot.Core'.. So I changed versions of OxlPlot.Core and OxlPlot.WindowForms to "2.0.0", and modified packages.config as well.

Then some errors and warnings threw out as I listed below. [image: image] https://user-images.githubusercontent.com/93606953/162143695-e0f64790-2533-49a2-a349-f051cf7f70ce.png [image: image] https://user-images.githubusercontent.com/93606953/162143800-7a35e6bb-8896-488b-a3c6-d8fbff326911.png

I don't know if it helps, but I uploaded the project file https://drive.google.com/drive/folders/1GyhzbLwwqTV59D-MmWtYsbqu03MAtHcH?usp=sharing I am working with. As the error messages CS0006 show, some .dll or .exe files are not generated as expected.

I appreciate your help a lot! Thank you. Tina

— Reply to this email directly, view it on GitHub https://github.com/yuxi-research/APSIM-EnKF/issues/2#issuecomment-1091181110, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASQB75F6MXKZWMF6QTJLPSLVD2FBJANCNFSM5SHW75XA . You are receiving this because you commented.Message ID: @.***>