简体   繁体   中英

Accessor errors building a VS2013 solution in VS2015 Enterprise

I have a VS2013 solution which includes unit test projects. When I open the solution and rebuild it in VS2015 Enterprise, I get numerous errors of the pattern

CS0246 The type or namespace XXXX_Accessor could not be found

Is this a VS2015 issue? Does VS2015 Enterprise no longer support Accessors? The solution builds perfectly well in VS2013 Pro, and I can't see any missing references in the project References lists in Solution Explorer

TIA

Doh! It turns out that accessors were deprecated in VS2010 (which we skipped when we upgraded from VS2008) but continued to work up to VS2013. In VS2015, which we are now trialling, they don't compile so have to be expunged from the test projects and (this is our way of resolving the subsequent visibility errors) the test code amended to use 'real' classes instead of the accessors and private members accessed by the tests changed to internal. Much simpler than using reflection, as suggested by others who have encountered this problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM