I recently built an MVC web project in .Net Core for which I now want to build an Android and iOS front end. I understand the differences between .Net Standard and .Net Core, but am having a problem figuring out what should go in which project. First I'll describe the current solution:
DataModel: As you would expect, DataModel contains all of my base models and DTOs. It is referenced by all other projects.
DataAccess: Performs all data storage/acquisition operations (repositories) and references only DataModel
HostService: RESTful service which serves up data and references DataModel and DataAccess
Display: Front end MVC code that contains ViewModels, Views, Controllers, etc and references DataModel and HostService
It is my understanding that some portions of the Display project really need to be in a .Net Standard project in order to reuse them in an Xamarin project targeting Adroid and iOS, but I am a bit confused as to what parts should move to the new .Net Standard project. Obviously the Views will need to stay in the Display project as they contain Razor code specific to the web front end. It would appear to me that the only things that need to be moved to the new project are ViewModels and Controllers (as well as anything they reference)? Does this sound right or am I over simplifying it? Am I missing something or are there any gotchas I should know about?
FWIW, I ran the .Net portability Analyzer and received these results:
It notated that these items were not compatible with .Net Standard:
How do I determine where these conflicts occur to resolve them? I looked for the target members (IE. Microsoft.AspNetCore.Razor.Hosting.RazorConfigurationNameAttribute) in the Display project but didn't find any matches, so I am uncertain on how to fix them. Any pointers would be greatly appreciated!