我正在尝试使用专有库读取一些专有文件。这个库附带了一个.exe文件,在这个过程的中间会调用这个文件。然而,这个文件抛出了下面的错误。
Unhandled Exception: System.Exception: HarvestCalibration Error: Expecting element 'root' from namespace ''.. Encountered 'None' with name '', namespace ''.
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'AgLeaderCalibration.dll' or one of its dependencies. The specified module could not be found.
at HarvestCalibration.Program.buildTable(CalibrationInput config)
at HarvestCalibration.Program.Main(String[] args)
at CNHVoyager2.HarvestCalibration.CalibrationShim.get_config()
at CNHVoyager2.HarvestCalibration.CalibrationShim.CalculateSampleFlow(UInt16 sensor_force, Double moisture_percent)
at CNHVoyager2.V2_RecordHarvestSummary.CalculateSampleFlow(UInt16 sensor_force, Double moisture_percent)
at CNHVoyager2.CNHV2DatasetSample.FillHarvestAttributeCollection()
at CNHVoyager2.CNHV2DatasetSample.get_AttributeCollection()
at test.Program.CreateProperties(ICNHV2DatasetSample sample) in C:\Users\Joao\leaf\test\Program.cs:line 84
at test.Program.Convert(String inputCN1) in C:\Users\Joao\leaf\test\Program.cs:line 61
at test.Program.Main(String[] args) in C:\Users\Joao\leaf\test\Program.cs:line 36快速搜索显示,读取缓冲区时Expecting element 'root' from namespace ''.. Encountered 'None' with name '', namespace ''是一个问题[1]。然而,我认为这个库试图在幕后使用我拥有的.dll的AgLeaderCalibration.dll。我已经以多种方式将其包含在项目中。引用、复制到输出目录等都没有成功。
我不太了解C#。也许这是构建过程中的一个非常简单的问题?版本控制?
提前谢谢。
发布于 2020-05-08 17:38:31
我一直在联系CNH的支持人员,结果发现你需要安装用于Visual Studio2012的Visual C++ Redistributable:https://www.microsoft.com/en-us/download/details.aspx?id=30679。确保获得32位版本( VSU_4\vcredist_x86.exe)
https://stackoverflow.com/questions/61014521
复制相似问题