Reputation: 1935
I have 1 project which may run as Winforms App(.NET 2) or as a Xamarin App or as WPF app. The business logic is the same and I would like to share the code between the Xamarin App and the Winforms App. In .NET 2.0 I don't have portable class libraries and in Xamarin I cannot add .NET 2.0 project.
I thought it would be a chance to use an API and use it as shared code(WCF not available in 2.0). Any other ideas? Thanks!
Upvotes: 0
Views: 70
Reputation: 7301
You have to extract the code that is used by mulitple project into a Shared Project
. In the other projects you have to reference this Shared Project
.
The last project is the Shared Project
Right click on References
and click Add Reference
and the select Shared Projects
tab and select the shared project you created
Upvotes: 2