Reputation: 9240
Usually it is recommended to have two projects for both wp7 and wp8 platforms. Wp7 project contains .cs and .xaml files, and WP8 project contains links to that files.
I think that there is no reason to compile non-platform specific business logic code twice, since it can be referenced to WP8 project.
I'm thinking about following solution structure:
Such application can be compiled and I can deploy it to device/emulator.
The question is: will this app pass certification in Windows phone store? Or it is necessary to recompile shared dll?
UPD: My crazy idea was born after this steps:
Upvotes: 0
Views: 241
Reputation: 9240
Thanks to Claus, I made some research, and it looks like the answer is - you can use such solution.
I didn't find related information in documentation, but here is a proof from one of MSFT tech. evangelists from Netherlands: link to blogpost
The basic idea is to move all our code that can be used from both our existing Windows Phone 7 app as well as the Windows Phone 8 build, which we will add soon, to a Common project in the solution. The bad thing about this approach is that we have to create the Common project as a Windows Phone 7 class library, which will be used in our Windows Phone 8 build. I haven’t really noticed any negative impact of this decision in my existing apps, but note that you will be referencing a Windows Phone 7 library in your Windows Phone 8 build.
So it is a possible, but not the best solution.
Upvotes: 1
Reputation: 26344
Unless you use a Portable Class Library, you'll need to have separate project files, and compile separately for WP7 and WP8.
Upvotes: 3