If I understand correctly Xamarin shared project allows us to share code between Xamarin mobile projects (Android, iOS, Windows Phone).
What are the options if I need to share source files between Xamarin projects and some other project types (like WPF or GTK)? I do not use Eto Forms because it does not support all required for my project platforms.
Is "Add as Link" single available option in this case?
Just now I have tried all available for me project types.
Probably I can claim that Shared Project is supported by at least the following project types:
1) Xamarin (obvious).
2) WPF application.
3) Regular .Net class library.
4) Portable library.
5) Bridge.NET project.
And not supported for:
1) .Net Core projects. We have to use project.json to include files:
"buildOptions": {
"compile": {
"include": [
"../../SharedProject1/**/*.cs"
]
}
}
Alternatively we have to wait VS 2017 which works.
And I recommend to check MonoDevelop and Xamarin Studio.
As some temporary trick we can include Shared Project into regular .Net library and that library into .Net Core project.
2) Another Shared project. They cannot be nested.. so hierarchy of projects like it is for regular projects is not possible. But it makes sense when abstraction is distributed on several projects.