最近、プロジェクトをフレームワーク 2.0 からフレームワーク 4.5 に移行しました。Deserlize していくつかの操作を行う xml ファイルがあります。フレームワーク 2.0 が正常に動作していれば、xml の逆アセアライゼーションは問題ありません。しかし、コードを変更せずに同じ xml ファイルを使用すると、非シリアル化されない xml ファイルは「ルート レベルのデータが無効です。31 行目、27 番目の位置」というエラーが表示されます。私はこれのために30分を無駄にしました。ここに私のXMLファイルがあります
<SpreadResultData>
<SpreadToList>
<Spread>
<GroupName>A</GroupName>
<CellPos>B</CellPos>
<CellValue>0~</CellValue>
<Color>Green</Color>
<CellLinePos>3</CellLinePos>
<IsSetColor>true</IsSetColor>
<IsClear>false</IsClear>
</Spread>
<Spread>
<GroupName>B</GroupName>
<CellPos>C</CellPos>
<CellValue>0~</CellValue>
<Color>Yellow</Color>
<CellLinePos>3</CellLinePos>
<IsSetColor>true</IsSetColor>
<IsClear>false</IsClear>
</Spread>
<Spread>
<GroupName>C</GroupName>
<CellPos>D</CellPos>
<CellValue>0~</CellValue>
<Color>Red</Color>
<CellLinePos>3</CellLinePos>
<IsSetColor>true</IsSetColor>
<IsClear>false</IsClear>
</Spread>
</SpreadToList>
</SpreadResultData>