Skip to content
This repository was archived by the owner on Dec 27, 2023. It is now read-only.

[WIP] Portable Class Library Support#5

Closed
shiftkey wants to merge 8 commits intoCoder-Spirit:masterfrom
shiftkey:portable-support
Closed

[WIP] Portable Class Library Support#5
shiftkey wants to merge 8 commits intoCoder-Spirit:masterfrom
shiftkey:portable-support

Conversation

@shiftkey
Copy link

@shiftkey shiftkey commented Mar 2, 2015

Fixes #4

I've not had a chance to test this out thoroughly, but I believe this is the easiest approach to supporting multiple versions of the .NET Framework in your project - as you don't have to manage references to framework assemblies.

This requires the latest version of VS2013, but should work against the Community SKU.

  • switch main project over to Portable Class Library (targeting .NET 4, Windows 8, Silverlight 5, WP 8.1 and Windows Phone Silverlight 8.1 (?!?!)
  • update package generation to use new project
  • verify package outputs binary at portable-net40%2Bsl50%2Bwin%2Bwpa81%2Bwp80
  • test this against Community Edition of VS2013
  • fix up AppVeyor CI issue

Questions:

  • what sort of Mono support did you have in mind here? what should I be testing to confirm all is well?
  • how should I test this against the existing NUnit test suite? Will any test runner do?

Let me know if you have any questions or concerns on this.

@castarco
Copy link
Contributor

castarco commented Mar 2, 2015

Hi, I'll review this pull request in a few hours :) , thanks for your contribution.

I had problems with AppVeyor CI too. Maybe your problem it's my fault, I don't know.

@shiftkey
Copy link
Author

shiftkey commented Mar 2, 2015

@castarco Seems the script I added did enough to make it pass - let me know if there's anything else to add

@castarco
Copy link
Contributor

castarco commented Mar 3, 2015

Sorry for being slow, I haven't find time to check it. I've seen the changes and look good, but I didn't test it yet.

I have two doubts. Many months ago I tried to use PCLs, but I had problems on Linux :( . I suppose I can check if the problems persist with new Mono versions when I test it¹.

The other doubt is about other .NET versions support. I've also had problems trying to use a signed version of ColorSharp compiled for .NET 4.0 on a .NET 4.5 project . I'm not an expert, it's possible in theory to use signed 4.0 assemblies on 4.5 projects²?

About your questions:

  • I want to support Mono >= 3.12 , on Linux, Mac & Windows.
  • I don't know how to test the project on multiple .NET versions , I have to take a look on this problem. In the other hand, I have to improve the tests, now the coverage is pretty low. I hope this week I'll find time to do it.
  1. I'll be following this other issue too ( C# support, mono, and PCL Profile328 travis-ci/travis-ci#3036 ) , it seems that there are problems with PCLs on Linux.
  2. The PCL 328 is for .NET 4.0 and other mobile platforms, but the description says nothing about 4.5 .

@shiftkey
Copy link
Author

shiftkey commented Mar 3, 2015

I suppose I can check if the problems persist with new Mono versions when I test it

I think this depends on your setup. For example, Ubuntu 14.04 (Trusty Tahr) supports Mono 3.2.8, but you can grab Mono 3.12 direct from the project. And there's a big difference between them.

I want to support Mono >= 3.12 , on Linux, Mac & Windows.

I think this is a good benchmark to aim for. I've not tried wiring up Travis to do mono builds for each platform, maybe it's possible?

I've also had problems trying to use a signed version of ColorSharp compiled for .NET 4.0 on a .NET 4.5 project .

I could ramble on a lot about the actual value of signed assemblies and the scenarios where this is required (tl;dr: it's rather narrow). Unless you're dealing with scenarios were multiple instances of your assembly can exist in the same AppDomain (for example, Visual Studio extensions), I wouldn't stress too much about needing to sign your assemblies.

The PCL 328 is for .NET 4.0 and other mobile platforms, but the description says nothing about 4.5 .

4.5 is considered an in-place replacement for 4.0, so a 4.0 assembly should run without issue on a machine which has .NET 4.5 installed. There's a whole bunch of other details about how the Mono runtime works which I'd need to wrap my head around as well, but I'd love to hear more about the problem you had, and if you can recreate it again that'd be amazing!

@akoeplinger
Copy link

1.I'll be following this other issue too ( travis-ci/travis-ci#3036 ) , it seems that there are problems with PCLs on Linux.

The PCL reference assemblies package was installed on the Travis workers so it should just work. You can install it on your machine with sudo apt-get install referenceassemblies-pcl when you're using the Xamarin/Mono repository.

@shiftkey
Copy link
Author

Was able to clone and run the tests in Visual Studio Community Edition (after installing the NUnit test runner). Haven't had a chance to look into the Mono questions raised here...

@aloisdg
Copy link

aloisdg commented Sep 3, 2015

Hello,

Any news around the publication of a PCL?
Thank you,

Cheers!

@castarco
Copy link
Contributor

castarco commented Sep 3, 2015

Hello @aloisdg , I paused the development of ColorSharp because I was a little bit discouraged after many problems with Mono, but it seems that the liberation of the .NET source code improved the situation. This afternoon I'll revisit the problem and I'll try to release a PCL version of the library.

Thank you for your interest.

@aloisdg
Copy link

aloisdg commented Sep 3, 2015

Hi @castarco , thank you for your implication! :)

@shiftkey
Copy link
Author

shiftkey commented Mar 8, 2016

Closing this one out as it's totally neglected now (my fault) but I'll leave the branch open if someone wants to pick this up.

@shiftkey shiftkey closed this Mar 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Making the NuGet package to support multiple .NET versions

4 participants