Skip to content
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

Added WinRT (Windows 8) compatible library, sharing code where possible #66

Merged
merged 10 commits into from
Apr 21, 2015

Conversation

michaelklishin
Copy link
Member

This is #65 by @ngbrown, re-submitted to follow our branch naming convention. I intend to push a few build system fixes to disable building WinRT client on Mono and make it possible to disable it on Windows, e.g. versions prior to 8.

effort-high because this is a substantial contribution (my contribution is effort-tiny).

ngbrown added 3 commits April 19, 2015 14:39
…patibility with future .NET framework changes (all non-desktop frameworks).
Includes NUnit driven tests.
Also includes Windows Store example application.
Addresses GitHub issue #16
@michaelklishin
Copy link
Member Author

@ngbrown I'm now getting

Build action 'Page' is not supported by the specific combination of the project's targets

What do I have to configure to get rid of it?

@ngbrown
Copy link
Contributor

ngbrown commented Apr 20, 2015

@michaelklishin, I get the same errors with your changes. Bisecting back to a7f371b, the merge, it doesn't have the problem.

@michaelklishin
Copy link
Member Author

@ngbrown yes, it was a confusing error message, the problem was unrelated to the target. However, I still could not make the solution build without re-targeting. I have Windows 8 SDK installed, tried rebooting, inspecting project files manually, and so on.

We'll go with VS 2013 CE and Windows 8.1 as a requirement for now. RabbitMQ 3.6.0 will ship in September-October. If Windows 8 support is a big enough deal, we can revisit this decision later.

@michaelklishin
Copy link
Member Author

Building on Mono works now. Windows 7 doesn't seem to be an option for building Windows Store apps, so I'll have to test that WinRT is properly disabled in the build system there.

Otherwise this seems to be ready to merge.

@ngbrown
Copy link
Contributor

ngbrown commented Apr 20, 2015

@michaelklishin With the most recent changes you've pushed, RabbitMQ.Client.Examples.WinRT.Subscriber still has the Page errors. Something about the way the .csproj files was changed is making the Visual Studio designer think it is a WPF project.

More seriously, even though it compiles, RabbitMQ.Client.Examples.WinRT.Subscriber no longer deploys and launches. It is not building the AppX container.

Is there any way that the build process can specify the target projects to include or exclude instead of these conditionals in the individual .csproj files?

@michaelklishin
Copy link
Member Author

We can look into adding some Make targets that perform platform-specific builds a bit later. I'll investigate what's up with the project files.

@michaelklishin michaelklishin force-pushed the rabbitmq-dotnet-client-65 branch from f120364 to 2c0308d Compare April 20, 2015 05:23
@michaelklishin
Copy link
Member Author

@ngbrown I've started from your revision. Re-targeted for 8.1, getting

Named resource 'Files\..\..\..\client\RabbitMQ.Client.WinRT\build\bin\RabbitMQ.Client.pri' is outside project root! Only resource containers are allowed outside the project root.

when I try to deploy the WinRT example project.

My goal is to make sure Windows stuff work first, then add condtions for Mono.

@ngbrown
Copy link
Contributor

ngbrown commented Apr 20, 2015

@michaelklishin I see that you changed RabbitMQ.Client.Unit.WinRT.csproj to link to the non-winrt client. See 3489419 for the minimum changes for a re-target to win 8.1.

@ngbrown
Copy link
Contributor

ngbrown commented Apr 20, 2015

@michaelklishin, you mentioned the Windows 8 SDK, did you install it with the maintenance screen from the Visual Studio 2013 ISO/Installer?

This is all I have to enable this on my Windows 8.1 computer: "Tools for Maintaining Store Apps for Windows 8". I don't have Visual Studio 2012.

Another possibility would be to close the solution (and make sure the example client .exe is killed) and run git clean -d -x wipe all the temporary files and then load in Visual Studio again.

@michaelklishin
Copy link
Member Author

I have both Tools for Maintaining Store Apps for Windows 8 and Windows Phone 8.0 SDK installed.

@michaelklishin
Copy link
Member Author

Uninstalling Windows Phone 8.0 SDK didn't help. I ended up symlinking v12.0 in WindowsXaml to v11.0 and now things build.

Attempts to deploy the example app now fail with

Error : DEP0700 : Registration of the app failed. error 0x80070005: Failed to set access rights to \\?\C:\cygwin64\home\admin\git\umbrella.git\rabbitmq-dotnet-client\projects\examples\WinRT\Subscriber\build\bin\Debug\AppX. (0x80070005)

@ngbrown
Copy link
Contributor

ngbrown commented Apr 20, 2015

See the comments to the answer here: http://stackoverflow.com/a/13163076/25182 This is a known cygwin issue.

@michaelklishin
Copy link
Member Author

Changing build output directory to a random directory outside of Cygin's home indeed helps. The app deploys successfully. I'm not sure how to run it in the emulator but looks like Windows is good and we can move on to Mono.

@michaelklishin michaelklishin force-pushed the rabbitmq-dotnet-client-65 branch from 2c0308d to a3f8b74 Compare April 20, 2015 06:09
@michaelklishin
Copy link
Member Author

After an IRC discussion and multiple resets we have retained Windows 8.0 compatibility. Excluding Mono is also done, need to investigate why msbuild.exe fails to build from scratch while VS doesn't.

@michaelklishin
Copy link
Member Author

RabbitMQ.Client.Unit.WinRT fails to build with msbuild.exe (cannot find RabbitMQ client classes, suggests a missing assembly reference).

@michaelklishin
Copy link
Member Author

@ngbrown OK, now things build in VS, with msbuild.exe and xbuild on Mono. Unit.WinRT passes all tests.

I'm ready to merge as soon as you confirm that things work for you just as well and the example app deploys and runs.

michaelklishin added a commit that referenced this pull request Apr 21, 2015
Added WinRT (Windows 8) compatible library, sharing code where possible
@michaelklishin michaelklishin merged commit 4bd911e into master Apr 21, 2015
@michaelklishin
Copy link
Member Author

I felt confident (and excited) enough to merge.

ngbrown added a commit to ngbrown/rabbitmq-dotnet-client that referenced this pull request Apr 22, 2015
Change Build,Rebuild,Clean Target behavior through changing DependsOn properties instead of replacing Targets.
ngbrown added a commit to ngbrown/rabbitmq-dotnet-client that referenced this pull request Apr 22, 2015
Change Build,Rebuild,Clean Target behavior through changing DependsOn properties instead of replacing Targets.
michaelklishin added a commit that referenced this pull request Apr 22, 2015
@ngbrown ngbrown deleted the rabbitmq-dotnet-client-65 branch March 11, 2016 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants