For a couple of months I've been using Prism 6 with the following XAML namespace declaration:
xmlns:prism="http://www.codeplex.com/prism"
But I noticed this namespace URL (which redirects to GitHub) also exists:
xmlns:prism="http://prismlibrary.com/"
Please confirm which namespace is the correct one to use?
As you might know, Prism has been taken over by the community and effort has been made to bring a new release with Prism 6. The old namespace
xmlns:prism="http://www.codeplex.com/prism"
might have been in the first pre-release packages of Prism 6 that you tried. But the team decided on switching to the new namespace.
xmlns:prism="http://prismlibrary.com/"
This is also mentioned in the release notes for v 6.0.0.
Fix XAML namespace issue (http://www.codeplex.com/prism)
Created new xmlns namespace http://prismlibrary.com/
So you should only be using the new namespace after upgrading to the lastest version. If you happen to see the use of an old namespace, don't hesitate to report an issue on the GitHub repository.
Go with xmlns:prism="http://prismlibrary.com/". The codeplex.com namespace is a legacy namespace which, I suppose, could go away in the future. Code comments in the source on GitHub indicate it is legacy, too.
I use the prismlibrary.com namespace in all my Prism references. Works well.
Related
I have a solution with a main project that uses Prism 5 (WPF). This solution also contains many more projects that are Prism modules.
Now I have to create a new module, and I wonder if I can use Prism 6 only in that module, and it will be compatible with Prism 5 main project, or if I need to continue with Prism 5 in all the modules (or upgrade the entire solution to Prism 6, what is a really big work).
Thank you
You'll have to stick with Prism 5 or upgrade everything to Prism 6. There are some breaking changes between these versions:
Removed all types that were marked as "Obsolete" in Prism 5
Removed IView interface
Changed namespaces to remove Microsoft namespaces
Moved a number of types around to better organize and to get as much into a single Portable Class Library as possible
ViewModelLocator naming convention changes: [Name]View now requires [Name]ViewModel. No longer [Name]ViewViewModel
Source: https://github.com/PrismLibrary/Prism/blob/master/README.md
The namespace change alone is already enough to 'break' your application. You'll now have 2 different instances of e.g. EventAggregator (as they live in a different namespace).
I've seen examples that that indicate IApplicationBuilder has an extension method .UseJwtBearerAuthentication(Action<?> options).
This SO question and AspNet.Security.OpenIdConnect.Server
sample server startup file seem to say that there is such an extension. On the OpenIdConnect, I looked at the extensions folder and I don't see an extension named UseJwtBearerAuthentication. Even this blog says that it's supposed to be included with ASP.net 5. I also tried adding Microsoft.AspNet.Security.OAuthBearer, 1.0.0-beta3 to my project.json and reference it in Startup.cs. No help.
The only thing I have different is that I'm using -beta7, but I don't think that should matter.
It depends on your runtime version. In beta7 the package is called Microsoft.AspNet.Authentication.OAuthBearer, while in beta 8 the package is renamed to Microsoft.AspNet.Authentication.JwtBearer.
Since you are using beta7, add this to your project.json:
"Microsoft.AspNet.Authentication.OAuthBearer": "1.0.0-beta7"
Pro-tip: never mix beta versions like beta3 security packages and beta7 MVC packages.
In RC2, there are
Microsoft.AspNetCore.Authentication.JwtBearer
Microsoft.AspNetCore.Authentication.OAuth
I'm new to mac but not .Net. I'm playing around with Visual Studio Code. I installed Brew and used it to get yo, grunt-cli, generator-aspnet, dnvm, and everything the tutorials say to get. I created a project scaffold with yo and the first thing I want to do is add a Controller that inherits from ApiController but I can't seem to find a way to "Add a reference" like I would in Visual Studio proper.
It looks like I should open project.json and add something like this:
"System.Web.Http": "<some version number>"
under dependencies. I don't know what version number to use, so I tried "latest" but anytime I run dnu update it says System.Web.Http can't be found.
Where can I find information about adding references to Visual Studio Code? How to reference particular DLLs (specifically System.Web.Http for me) and what versions to reference?
The answer to your question has several parts.
ApiController
First of all, ASP.NET MVC 6 unifies WebAPI and MVC 5 controllers into one. You can still use ApiController if you want to, but you will need Microsoft.AspNet.Mvc.WebApiCompatShim.
There is no System.Web.Net
Second, Matt DeKrey is correct. System.Web.Http is not a .NET core library. Depending on what you are trying to do, you may be looking for System.Web.Http.Common.
Finding package version
When using VS Code, you should be seeing autocomplete that will recommend version numbers for you. In this case you could use:
"System.Web.Http.Common": "4.0.20216.16343"
I am working on a xamarin project where i use CouchBase Lite as my Local database. I also want to use MVVMCross library. Could anyone specify where should i include couchbase-Lite library, MVVMCross - hot tuna library(like class library or portable class library or platform specif project) such that view model gets notified about the changes in Couchdatabase.
Basically i want to change the view whenver there is a change in database i want to change the view with mvvmcross. Am using syncgateway to sync with server Couchbase bucket.
I am new to Xamarin, MVVM and CouchBaselite.
I couldnt find any concrete example for all this.
Thanks in advance.
I would perhaps just use the CouchBaseLite Xamarin Component. If you are wanting to access this in your PCL Core project you will probably have to create some sort of wrapper around the component and inject it properly into each platform. You can use the MvvmCross plugins wiki to get you started.
I know this is an old thread, but there's a new MvvmCross plugin for Couchbase, and basically does everything you want. It's in alpha, as of this writing on Nuget, and open source on Github. I was actually looking for the same, and happy to have found it! :)
https://www.nuget.org/packages/MvvX.Plugins.CouchBaseLite.ForestDB
https://github.com/mathieumack/MvvX.CouchBaseLite
A number of articles reference IMvcServiceLocator for customizing service location in MVC3.
I'm assuming they were using the preview, but I've just upgraded to the RC, and the type can't be found.
Is this something that's changed with the RC, or am I missing a reference (I've downloaded various complete examples and they're broken too).
Okay, so it changed with the Beta: http://bradwilson.typepad.com/blog/2010/10/service-location-pt5-idependencyresolver.html