Can Not Compile Latest XF Sample
Hello and thank you for all the amazing work on PRISM! I have been following the progress on XF especially as it relates to the new navigation scenarios with Master Detail and Navigation pages and am very excited about the direction taken!
Question:
Should I expect to be able to compile and run the latest XF sample from this repo? I have tried many attempts on different machines using both vs 2013/2015 and different builds of XF. I am able to restore the packages but on subsequent builds visual studio freezes.
Previously I did notice that some of the proj files were looking for multiple XF versions after restoring but that could of potentially been something on my end. I have pulled down versions at various points in time over the weekend and at one point almost was able to get it to run but couldn't figure out an issue with OnCreate() but it looks like some code has changed since then.
Should I expect the examples to build in the preview repo? If so I guess I need to take a closer look at what im doing!
Thank You, Bill
The XF samples located here are not built against the current code base: https://github.com/PrismLibrary/Prism-Samples-Forms
This sample is built against the current code base and is what I use for testing all the navigation scenarios: https://github.com/PrismLibrary/Prism/tree/master/Samples/Xamarin/HelloWorld
Make sure you have Android Marshmallow installed as the sample is built against that API and will not run without it.
Hi Brian,
Thank you for the response. I previously did not have android 23 installed but also was not building the android project. For the heck of it I installed 23 and re downloaded the prism repo in the provided link but unfortunately experienced the same result. It froze visual studio 2013 and 2015 on two different machines requiring me to kill the VS process with task manager.
are you sure those projects run?
thank you, bill
Date: Mon, 7 Dec 2015 10:14:47 -0800 From: [email protected] To: [email protected] CC: [email protected] Subject: Re: [Prism] Can Not Compile Latest XF Sample (#339)
The XF samples located here are not built against the current code base: https://github.com/PrismLibrary/Prism-Samples-Forms
This sample is built against the current code base and is what I use for testing all my the navigation scenarios: https://github.com/PrismLibrary/Prism/tree/master/Samples/Xamarin/HelloWorld
Make sure you have Android Marshmallow installed as the sample is built against that API and will not run without it.
— Reply to this email directly or view it on GitHub.
Yes, it works. I actively develop with it. If that doesn't want to work for you then just create a new project and start from scratch. Use the sample code to help you get started, but only use it as reference. No reason to spend so much time trying to get a throw away sample to work anyways :)
couldn't agree more! problem is I can not get the sample or source to compile. I'm sure I'm missing something somewhere but when attempting to compile this source https://github.com/PrismLibrary/Prism/tree/master/Source I receive a number of namespace errors related to 'Unity' no longer being in the 'Microsoft' namespace. are there any steps that need to be taken that I'm possibly missing? or does it perhaps sound like I have the wrong build of one of the libraries either XF/PRISM.Forms/Unity if anything comes to mind please do let me know. Its just hard to imagine that I'm missing something in this process of simply downloading a repo and compiling it! Thank You,Bill
Date: Mon, 7 Dec 2015 12:04:28 -0800 From: [email protected] To: [email protected] CC: [email protected] Subject: Re: [Prism] Can Not Compile Latest XF Sample (#339)
Yes, it works. I actively develop with it. If that doesn't want to work for you then just create a new project and start from scratch. Use the sample code to help you get started, but only use it as reference. No reason to spend so much time trying to get a throw away sample to work anyways :)
— Reply to this email directly or view it on GitHub.
I have no idea what your environment is missing or having issues with. The project compiles fine in other environments, such as our integrated build server (you can see the build status here https://github.com/PrismLibrary/Prism).
XF is just a NuGet, so that really shouldn't be your issue for compiling just the PrismLibrary_XF.sln solution. Of course, make sure you are compiling using the Debug build configuration, because you can't build using the Release-Signed build configuration.
What errors are you getting exactly?
Wait... are you unblocking the zip file before you unzip it?
if you mean properties > unblock prior to unzipping yes that is correct I am
then opening Prism-master\Prism-master\Samples\Xamarin\HelloWorld solution then I restore the packages and rebuild. I receive about 80 exceptions here are a few
Severity Code Description Project File Line Error CS0115 'App.OnInitialized()': no suitable method found to override HelloWorld C:\Users\bills\Downloads\Prism-master\Prism-master\Samples\Xamarin\HelloWorld\HelloWorld\HelloWorld\App.cs 8 Severity Code Description Project File Line Error CS0234 The type or namespace name 'App' does not exist in the namespace 'HelloWorld' (are you missing an assembly reference?) HelloWorld.WinPhone C:\Users\bills\Downloads\Prism-master\Prism-master\Samples\Xamarin\HelloWorld\HelloWorld\HelloWorld.WinPhone\MainPage.xaml.cs 23
Error CS0115 'App.RegisterTypes()': no suitable method found to override HelloWorld C:\Users\bills\Downloads\Prism-master\Prism-master\Samples\Xamarin\HelloWorld\HelloWorld\HelloWorld\App.cs 13Severity Code Description Project File Line
Severity Code Description Project File Line Error CS0234 The type or namespace name 'Navigation' does not exist in the namespace 'Prism' (are you missing an assembly reference?) HelloWorld C:\Users\bills\Downloads\Prism-master\Prism-master\Samples\Xamarin\HelloWorld\HelloWorld\HelloWorld\ViewModels\ViewBViewModel.cs 1
Error CS0234 The type or namespace name 'Navigation' does not exist in the namespace 'Prism' (are you missing an assembly reference?) HelloWorld C:\Users\bills\Downloads\Prism-master\Prism-master\Samples\Xamarin\HelloWorld\HelloWorld\HelloWorld\ViewModels\MainPageViewModel.cs 5Severity Code Description Project File Line
Error CS0246 The type or namespace name 'INavigationService' could not be found (are you missing a using directive or an assembly reference?) HelloWorld C:\Users\bills\Downloads\Prism-master\Prism-master\Samples\Xamarin\HelloWorld\HelloWorld\HelloWorld\ViewModels\MainPageViewModel.cs 12Severity Code Description Project File Line Date: Mon, 7 Dec 2015 17:15:31 -0800 From: [email protected] To: [email protected] CC: [email protected] Subject: Re: [Prism] Can Not Compile Latest XF Sample (#339)
Wait... are you unblocking the zip file before you unzip it?
— Reply to this email directly or view it on GitHub.
try opening just the PrismLibrary_XF solution and just build that.
managed to get a little further. down to 7 errors. initialize component for each view throws. .... if this rings a bell and you know what it is great! if not it must be on my end and ill figure it out. thank you very much for the time you have spent looking at this. Severity Code Description Project File Line Error CS0103 The name 'InitializeComponent' does not exist in the current context HelloWorld C:\Users\bills\Downloads\Prism-master\Prism-master\Samples\Xamarin\HelloWorld\HelloWorld\HelloWorld\Views\MyNavigationPage.xaml.cs 16
Severity Code Description Project File Line Error CS0103 The name 'InitializeComponent' does not exist in the current context HelloWorld C:\Users\bills\Downloads\Prism-master\Prism-master\Samples\Xamarin\HelloWorld\HelloWorld\HelloWorld\Views\MyTabbedPage.xaml.cs 17
Severity Code Description Project File Line Error CS0103 The name 'InitializeComponent' does not exist in the current context HelloWorld C:\Users\bills\Downloads\Prism-master\Prism-master\Samples\Xamarin\HelloWorld\HelloWorld\HelloWorld\Views\ViewA.xaml.cs 16 Severity Code Description Project File Line Error CS0103 The name 'InitializeComponent' does not exist in the current context HelloWorld C:\Users\bills\Downloads\Prism-master\Prism-master\Samples\Xamarin\HelloWorld\HelloWorld\HelloWorld\Views\MyMasterDetail.xaml.cs 15
Date: Mon, 7 Dec 2015 17:15:31 -0800 From: [email protected] To: [email protected] CC: [email protected] Subject: Re: [Prism] Can Not Compile Latest XF Sample (#339)
Wait... are you unblocking the zip file before you unzip it?
— Reply to this email directly or view it on GitHub.
yup that works! I assume this is all I really need. thanks again
Date: Mon, 7 Dec 2015 17:36:26 -0800 From: [email protected] To: [email protected] CC: [email protected] Subject: Re: [Prism] Can Not Compile Latest XF Sample (#339)
try opening just the PrismLibrary_XF solution and just build that.
— Reply to this email directly or view it on GitHub.
Yeah, all you need is the Prism assemblies, then you go create a new project. I will say though, those "errors" may not be Build errors, but initellisense errors. VS has a bug regarding XF projects. If you change the drop down in the Error tab to "Build Only" does it work? Those may just be intellisense errors and the app will run just fine.
Basically hit F5 and see what happens
ahh yeah that was it :-) they were just intelli sense errors runs ive used PRISM navigation in most projects over last 5 years but thought it might be a good idea to stick with the out-of-the-box navigation stack for XF. it seems to have some issues with memory leaks though and I'm wondering if you experienced the same or heard similar reports? that's the main issue I'm hoping to solve with using the new NAV scenarios. With Xamarin I can see the correct number of objects being released in the profiler when I pop a page off the stack but it still accumulates something after every push/pop even with a blank page with zero objects holding reference such as tooltip, event handler or binding context. Also I'm thinking that the dependency service you have will help with the static invokes for the various plugins which may also be part of my issues. any memory leak issues in XF that you are aware of or things to be mindful of id love to hear them. thank you very much for your time Bill
Date: Mon, 7 Dec 2015 17:44:34 -0800 From: [email protected] To: [email protected] CC: [email protected] Subject: Re: [Prism] Can Not Compile Latest XF Sample (#339)
Basically hit F5 and see what happens
— Reply to this email directly or view it on GitHub.
I don't know of any memory leak issues with XF. It's actually pretty aggressive with releasing objects. I had a weak reference bug because they are so aggressive with disposing objects. Be sure to provide your feedback both positive and negative with Prism for XF.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.