-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow building a non-PCL and put PCL and non-PCL in nupkg. #19
Conversation
Passing /p:PCL=false to msbuild will build a non-PCL dll. This is necessary for C5 to run on versions of Mono earlier than 3.x. I'm not sure what effect the conditionals inserted into the .csproj have on Visual Studio. I am not able to open C5 in Visual Studio because I only have the Express edition. Changed nuspec to contain id, version, etc directly because the package will need to be built passing the .nuspec instead of the .csproj in order to build a package with multiple target frameworks (net40 and portable-win+net40+sl40+wp+Xbox40). Added a .bat script for building a package. It does a rebuild of C5 and copies the dll and xml file to package\lib\portable-win+net40+sl40+wp+Xbox40\ then does it again, passing PCL=false to msbuild and copying to package\lib\net40\ Finally it does a nuget pack.
Thanks :) |
Allow building a non-PCL and put PCL and non-PCL in nupkg.
Hi Greg, |
When you say "reference" do you mean the plain old "add reference" reference or a nuget package install reference? VS Express doesn't support building PCLs so I'm not able to try to reproduce it. I'm surprised it doesn't work because Json.NET, a very popular JSON library, includes portable-net45+wp80+win8, portable-net40+sl4+wp7+win8, netcore45, net45, net40, net35, and net20 versions in its package. I guess I'll just bundle a non-PCL build of C5 in the MyMediaLite package instead of declaring a package dependency on C5. Thanks for looking into this. |
Hi Greg, |
Awesome, thanks! I'll take a look this weekend. |
Works great on Mono 2.10.8.1. :) |
Awesome :) |
Manually edited the .csproj to allow building C5 as a PCL and a non-PCL and wrote a .bat script to build a nuget package containing both the PCL version and a net40 version. PCLs do not work on versions of Mono earlier than 3.x. Even the latest version of Ubuntu is not on 3.x yet.
I'm not sure how Visual Studio treats the changes in the .csproj or if it will even open the project. I only have the express edition which does not open PCL projects. Command line builds do work though.