2016-08-18 36 views
0

我有下面的代碼從YamlDotNet實況https://dotnetfiddle.net/QlqGDVYamlDotNet串行構造函數拋出異常

using System.Collections.Generic; 
using System.IO; 
using System; 
using YamlDotNet.Serialization; 

public class ALogger { 
    public function writeFile() { 
     using (var sw = new StreamWriter(_logFileCasesPath + @"\" + _logCaseName)) 
     { 
      var ser = new Serializer(); 
      ser.Serialize(sw, _logCase); 
     } 
    } 
} 

但新的串行拋出異常,我不知道爲什麼。我沒有找到任何提示異常信息。

Ein Ausnahmefehler des Typs "System.MissingMethodException" ist in InnoTest.exe aufgetreten. 

Zusätzliche Informationen: Methode nicht gefunden: "Void YamlDotNet.Serialization.Serializer..ctor(YamlDotNet.Serialization.SerializationOptions, YamlDotNet.Serialization.INamingConvention, YamlDotNet.Serialization.YamlAttributeOverrides)". 

回答

0

另一個用於框架有YamlDotNet它已經與3.8版本,但我用3.9所以有衝突,而不是由編譯器發現。只有在運行時纔有例外。

+0

同樣的問題在這裏。你是如何解決衝突的? – bovender

相關問題