AutoMapper测试在构建期间失败,但在visual studio 2013中通过了本地测试

本文关键字:测试 2013 studio visual 通过了 构建 AutoMapper 失败 但在 | 更新日期: 2023-09-27 18:10:04

它显示了一些未映射的属性,但它在本地工作得很好,我也尝试了[deployentiten]属性,但问题仍然存在。

AutoMapper测试在构建期间失败,但在visual studio 2013中通过了本地测试

I got the solution for it .Use Mapper.Reset() before every mapper.createMap() because without of reset it's work locally if your mapping is correct but when tests run on build server that time one copy went to the server.and mapper class is static so its taking old reference or cache the classes that's why its shoing unmapped members were found. for remove that problem is better to use mapper.reset() before mapper.createmap() its always free the all reference from the mapper class