Reputation: 1226
So, I'm writing a universal Windows app and have a referencing problem. When I put all my business logic code in the Shared project, but my views in their respective projects (windows and windows phone), I can't reference the view-folders (I get the c# "the type or namespace could not be found" error). I've checked all namespaces and names, it's all as it should be. And the weird thing is, that sometimes I can reference some of the subfolders (I have three subfolders in my views folder and right now I can reference two of them and yesterday I could reference only one and before that I couldn't even see the Views namespace). Even when I put the Views folder in the shared project, it isn't all fixed - again I see different folders at different times. So, have I done something wrong, or is the problem somewhere else ?
P.S. I know that paths in windows are case-insensitive, but I've noticed that my windows-phone project (according to VS) is at ~/visual studio 2013/... and the windows project is at ~/Visual Studio 2013/... . In Explorer they are at the same place, but could this mean something ?
Upvotes: 1
Views: 334
Reputation: 144
Sounds like bad layering, to begin with. Your (platform-specific) views should hold a reference to your (platform-independent) business logic. The business logic shouldn't need to be accessing the platform-specific code in the view.
If it really, really has to, you'd need to build a plug-in-like model where there's a platform-independent interface that both platform-specific pieces provide implementations of.
Upvotes: 1