- Working with variables and parameters
- Functional features
After configuring a new Windows 10 machine, I loaded my first solution to start fixing some bugs. However the web project in my solution failed to load with the following error message:
C:\projects\SampleApp/WebUI.csproj : error : The Web Application Project SampleApp.WebUI is configured to use IIS. Could not find the server 'https://localhost/SampleApp' on the local machine. Make sure the local IIS server has been configured to support secure communications.
Whoops! Seems that I forgot to configure something in IIS. I didn’t enable the SSL binding on my local IIS instance.
Let’s fix this!
Now I can reload the web project in Visual Studio without any error…
I continued my journey on using Caliburn.Micro in Windows 10 UWP apps. The next thing I tried was to add a device specific view. In UWP apps this can easily be done by adding a second XAML file with the same name and a device family added to it.
For example: a device specific version of ShellView.xaml can be ShellView.DeviceFamily-Mobile.xaml.
Remark: This is not the only way to specify a device specific version. More information here: http://igrali.com/2015/08/02/three-ways-to-set-specific-devicefamily-xaml-views-in-uwp/
However after doing that, my Caliburn application started to fail with the following exception:
AmbiguousMatchException: Ambiguous match found
It seems that I’m not the first one with this problem as an issue(and a fix) had already been created on Github: https://github.com/Caliburn-Micro/Caliburn.Micro/pull/227
Unfortunately the fix is , at the moment of writing, not yet released so you have to download the source code and compile the code yourself.
Before decommissioning a Sharepoint server, I needed a list of all users on the different team sites. Time for some Powershell magic!
On the Technet site I found a script that promised to do exactly what I needed:
This script enumerates SharePoint 2010 or 2013 permissions across the entire farm down to the site (SPWeb) level. It also recursively expands the membership of any AD group and lists the assignment role binding on the permission. The output is an XML format.
So I copied the script over, logged in on the Sharepoint server and opened up a Powershell command prompt. However when I tried to execute the script it failed with the following error message:
Exception has been thrown by the target of an invocation
+ CategoryInfo : NotSpecified: (:) , TargetInvocationExcept
+ FullyQualifiedErrorId : System.Reflection.TargetInvocationException
So I opened up the script to find the root cause of the error and saw that it failed on the call to AllWebs:
On StackExchange I found some information telling me that the issue was probably related to security. The following solution was mentioned:
All permissions required:
get-spcontentdatabase | add-spshelladmin domain\username
And indeed, after adding the user, I was able to run the script successfully!
As a big fan of Caliburn.Micro, I’m happy to see that the team is working on extending their platform support to Windows 10, Xamarin, Xamarin.Forms and so on… An official release is not available yet, but I couldn’t wait to try the UWP support.
So I created a Blank Universal Windows app:
I added the Caliburn.Micro package through NuGet(don’t forget to check the Include prerelease checkbox):
And then replaced the default App.xaml file with the following code:
The only thing missing is a View and a corresponding ViewModel. As Caliburn prefers convention over configuration, we can create a Views folder and put a ShellView.xaml there, the corresponding viewmodel is placed in the ViewModels folder:
That’s all we need to get started!
Last week I was giving training at a customer. To speed up the exercises, I created each exercise on a different branch in Git and used every commit as a step in the exercise. This made it very easy to walk through the exercise step by step and see how the solution is created. The problem was that inside Visual Studio 2013, people only saw the master branch, but couldn’t see any of the other branches I created(note: in other tools, the branches showed up fine):
I discovered that the branch dropdown in Visual Studio 2013 only shows local branches, remote branches are not shown. To see the remote branch, you first have to create a new local branch to start tracking a remote branch. Click on New Branch and select the remote branch from the list. Once you’ve done that, the remote branch will appear in the branch list and you should be able to pull it.
Once you've done that, this will appear as a "published branch" allowing you to push and pull to it.