Friday, December 28, 2012

Solved: "Prefix '..' does not map to a namespace" when binding to a custom dependency property

I quickly want to share some information about a strange error I got when binding to one of my dependency properties and how to solve it.

The error is a TypeNameParserException with the following additional information: Prefix 'dp' does not map to a namespace.

TypeNameParserException

I got this when binding to one of my dependency properties with namespace, like this:

<ContextMenu x:Key="contextMenu" Tag="{Binding PlacementTarget.(dp:MyClass.MyDependencyProperty), RelativeSource={RelativeSource Self}, Mode=OneWay}">

As you can see the element is a context menu (which is defined in a Resources section, don't know if this matters). And I am binding to the dependency property dp:MyClass.MyDependencyProperty of the context menu's PlacementTarget (PlacementTarget is the element the context menu is invoked for).

This binding caused the problem because as soon as I opened the context menu I got the TypeNameParserException. When I removed this binding the error went away.

So this lead to the error:
Binding PlacementTarget.(dp:MyClass.MyDependencyProperty)

(Note: there were no compiler warnings, no squiggly lines, everything seemed valid.)
After some fiddling and googling I found the solution.

This solved the error:
Binding Path=PlacementTarget.(dp:MyClass.MyDependencyProperty)

It's simple: you explicitly have to specify the Path part! See the difference? Let's highlight it a bit more:

Binding Path=PlacementTarget.(dp:MyClass.MyDependencyProperty)

Maybe this helps you when you get strange namespace-related errors.

Sunday, December 16, 2012

A Better ULS Log File Viewer

While analyzing SharePoint ULS logs I felt the need for a better ULS log viewer. With more capabilities than the existing ones 1, 2. I don't like them. They are either old, look ugly or don't provide the capabilities I need.

Time to create a better one. Time for Heu's ULS Viewer.

I will provide more information soon.
Update - Download Heu's ULS Viewer here.
Until then here are some teaser screenshots:

Main View
Main view of Heu's ULS Viewer

Features:
  1.  Support for multiple log files
    • file contents will be concatenated
    • Drag & Drop support
    • fast log file parsing
  2. Extended filtering capabilities
    • decide in which of the columns you want to filter
    • two different filter types; you can choose to include items matching your search term, or to exlude items matching it
  3. Grid view of all log entries
    • sort by clicking column header
    • fast sorting even for large data sets
    • select multiple rows and copy them to clipboard by pressing Ctrl+C (good for quickly pasting them to a mail or support ticket)
  4. Detailed display of selected log entry
    • multi-line log entries are merged to one
    • proper formatting of stack traces
Visualization

Visualization of message count over time

Visualizing SharePoint ULS log messages provides a general survey you don't easily get when looking at the raw log data. For now there are two series: one for the overall log message count (in blue) and one for the log messages with level "Unexpected" (in red).

The diagrams respect your current filters.

That's all for today. I hope you are as excited as I am. Stay tuned for more!

Saturday, December 15, 2012

Getting Shell Integration for TFS when using TFS Cloud Services and Visual Studio Express 2012

I recently started using Team Foundation Service 2012 in the cloud together with Visual Studio Express 2012 for Windows Desktop. The cloud service allows me to easily put my sources under version control and schedule automatic builds without having to set up any servers.

From TortoiseSVN I am used to access source control features from the context menu of files and folders. For instance I want to be able to add files to source control directly from the right-click menu.

This is possible. The short-named Microsoft Visual Studio Team Foundation Server 2012 Update 1 Power Tools contains a shell extension which does exactly that. Cool!

But my first attempt to install the Power Tools failed. It thought having Visual Studio Express installed would be enough. But apparently you first have to install Team Explorer for Microsoft Visual Studio 2012.

Having done this the Power Tools installation succeeds and you get the full context menu goodness:

TFS shell integration



Monday, November 5, 2012

Remember: How to delete a Crawled Property

Deleting a crawled property from SharePoint is easy but sometimes requires a little preparation.
Summary | This post shows how to delete a crawled property and how to prepare it.
Deleting a crawled property might be necessary if
  • you are developing a custom indexing connector and are still testing it; obsolete properties will accumulate over time
  • your BDC changes from time to time and every change leads to new crawled properties being created with the next full crawl
  • $otherReason 
The list of all crawled properties can be found at Central Administration -> Search Service Application -> Queries and Results -> Metadata Properties -> Crawled Properties.

Deleting unused crawled properties

In SharePoint 2010 deleting a single crawled property is not possible. But you can delete all unused crawled properties of a category.

Go to Metadata Properties and click Categories:

In the context menu of a category click Edit Category:
Check the option Delete all unmapped crawled properties and click OK:
All unused crawled properties should be gone after clicking OK. But if the one you want to delete is still present then the next chapter is for you to read.

Unmapping and unindexing 

You have to remove all mappings from the property and you also have to remove it from the search index.

Click Edit/Map Property in the context menu of a crawled property:
Edit crawled property
The Edit Crawled Property page opens.
Edit Crawled Property
Make sure you
  • remove all mappings for this property
  • do not include values for this property in the search index
Repeat this for all properties which should be deleted when deleting unused properties of its category.

Note: Some OOB SharePoint crawled properties cannot be deleted.

Wednesday, October 31, 2012

Translation of SharePoint Terms from English to German


When writing technical documentation for SharePoint I frequently need to switch between the English and German terms for SharePoint interior. The German translation tends to produce constructs which often are funny and very long - and hard to remember. So I decided to assemble some vocabulary for quick reference.
Summary | This blog post provides you with SharePoint terms in English and their German translation. The post will be extended over time.

General

EnglishDeutschVersion
SiteWebsite2007
Site CollectionWebsitesammlung 2007
FarmFarm2007
Web ApplicationWebanwendung 2007
PageSeite 2007
Site ActionsWebsiteaktionen 2007
Site SettingsWebsiteeinstellungen2007
People and GroupsBenutzer und Gruppen 2007
Site collection administratorsWebsitesammlungsadministratoren 2007
Advanced permissionsErweiterte Berechtigungen 2007
Look and FeelAussehen und Verhalten 2007
Save site as templateWebsite als Vorlage speichern 2007
Site featuresWebsitefeatures 2007
TemplateVorlage 2007

Permissions

EnglishDeutschVersion
Permission LevelsBerechtigungsstufen2007
Limited AccessBeschränkter Zugriff2007
ReadLesen2007
ContributeTeilnehmen2007
DesignEntwerfen2007
Full ControlVollzugriff2007
List PermissionsListenberechtigungen2007
Manage ListsListen verwalten2007
Override Check OutAuschecken außer Kraft setzen2007
Add ItemsElemente hinzufügen2007
Edit ItemsElemente bearbeiten2007
Delete ItemsElemente löschen2007
View ItemsElemente anzeigen2007
Approve ItemsElemente genehmigen2007
Open ItemsElemente öffnen2007
View VersionsVersionen anzeigen2007
Delete VersionsVersionen löschen2007
Create AlertsBenachrichtigungen erstellen2007
View Application PagesAnwendungsseiten anzeigen2007

Search

EnglishDeutschVersion
Enterprise Search CenterUnternehmenssuchcenter2010
Basic Search CenterBasissuchcenter2010
Search Results Action LinksLinks für Suchaktionen2010
Search Action LinksHyperlinks für Suchergebnisaktionen2010
Search Core ResultsKernergebnisse der Suche2010
Refinement PanelVerfeinerungsbereich2010
Refinement Panel CaptionÜberschrift des Einschränkungsbereichs2010
Result Query OptionsAbfrageoptionen für Ergebnisse2010
RefinementEinschränkung2010
Accuracy IndexGenauigkeitsindex2010
Number of Categories to DisplayAnzahl der anzuzeigenden Kategorien2010
Number of Characters to DisplayAnzahl der anzuzeigenden Zeichen2010

Search Alerts

EnglishDeutschVersion
New AlertNeue Benachrichtigung2010
Alert TitleBenachrichtigungstitel2010

Central Administration

EnglishDeutschVersion
Application ManagementAnwendungsverwaltung2010
Manage web applicationsWebanwendungen verwalten2010
Manage service applicationsDienstanwendungen verwalten2010
Manage content databasesInhaltsdatenbanken verwalten2010

Search Service Application

EnglishDeutschVersion
Queries and ResultsAbfragen und Ergebnisse2010
Authoritative PagesAutorisierende Seiten2010
Federated LocationsPartnerspeicherorte2010
Metadata PropertiesMetadateneigenschaften2010
ScopesBereiche2010
Search Result RemovalSuchergebnisse entfernen2010
Search FederationPartnersuche2010
New locationNeuer Speicherort2010
Federated LocationPartnerspeicherort2010


Sunday, October 28, 2012

Upgrade journey from Windows XP 32-bit to Windows 8 64-bit

Now is the time to upgrade to Windows 8! Microsoft offers it's new version of Windows for a price you can't say "No" to, but only until end of January 2013.

Summary | This blog post shows how to upgrade from 32-bit Windows XP to 64-bit Windows 8 with a purchased downloadable upgrade. This is possible without buying the physical DVD despite contrary reports.

While taking the option to download your new Windows 8 is the quickest and cheapest one it can have its pitfalls. Have a close look at the bitness of your systems! Especially if you are upgrading from 32-bit to 64-bit you have to take care of not getting the wrong upgrade version.

Upgrading to Windows 8 (32-bit and 64-bit) from Windows XP (32-bit)

Downloading installation files - easy

I chose to upgrade an old XP (32-bit) installation of mine. I thought 30 € for a download sounds like a good deal, so I chose this option. After purchasing you have to download and start the setup file Windows8-Setup.exe. It downloads about 3 GB of data (2,05 GB for the 32-bit version, 2,62 GB for the 64-bit version):

Then it asks you how to proceed. Among the available options should be the one to create a medium to install from. This would create an ISO file you can burn to DVD. The setup screen should look like this:

But it didn't.

So the lesson here is:
If you are running Windows XP 32-bit you will not get the option to create an installation medium and you will not be able to create an ISO file.
At least the option was missing for me.

Getting an ISO on Windows XP - not so easy

I want to have an ISO file I can burn, so what do I do now? I decided to try running the setup on another PC running Windows 7. So I needed to find the files downloaded by setup to copy them.

On Windows XP the Windows8-Setup.exe downloads files to a hidden directory ESD on the system disk, e.g. C:\ESD. I copied the folder to the Windows 7 (64-bit) machine (also to C:\ESD) and started the Windows8-Setup.exe there. That looked much better. It recognized the copied ESD folder and offered me the option to create an installation medium.

So I clicked "Install by creating media" and it did as told. It created an ISO file I could use to install Windows 8. 32-bit.

Oops. I got an installation medium for 32-bit Windows 8 but needed 64-bit!

Getting an 64-bit ISO - easy again. But remember those old preview versions!

So the second lesson was:
Starting Windows8-Setup.exe from a 32-bit system will provide you with a 32-bit version of Windows 8.
To get the 64-bit version I obviously had to start the Windows8-Setup.exe and the download on a 64-bit system. On my Windows 7 machine I deleted the ESD folder I previously copied and started the setup again. That worked. It started downloading and the amount of data now was more than before. I again chose "Install by creating media" and got an ISO bigger than before (2,05 GB x32 vs. 2.63 GB x64). This was it.
To get 64-bit Windows 8 run Windows8-Setup.exe on a 64-bit system.
I omitted one detail in the above description: I had to remove the folder C:\Users\<username>\AppData\Local\Microsoft\WebSetup as it still contained content from a previously installed Windows 8 Consumer Preview. I think this is why the Windows 8 setup once showed the wrong registration key (I assume this was the evaluation key for the consumer preview) and tried to read from the folder C:\WindowsESD which still contained the Consumer Preview installation files. Such errors looked like this:

Removing said directory solved these issues.

Third lession:
Remove old files from Windows 8 Consumer Preview setup.

I now have an ISO for 32-bit and 64-bit Windows 8. It took a bit longer than expected but finally it all worked out.

Bonus Lesson - match your licenses and ISO files

You are allowed to upgrade up to 5 old PCs of yours. As this is a nice way of getting rid of old machines I took this offer and bought two upgrades, both delivered digital. Because both upgrades were to Windows 8 64-bit I burned only one DVD. Windows 8 is Windows 8, right?

Wrong!

One license/product key is associated with one Windows8-Setup.exe which will install (or create an ISO for) a Windows 8 that can only be activated using this exact same product key.
Apparently some licensing information is already embedded in the downloaded files. I found this as I installed Windows 8 from the DVD burned after buying the first upgrade but tried to activate using the second product key. This didn't work. So I really had to create two media for two product keys. Out of curiosity I calculated CRC checksums of both ISO files and the result was indeed different.

To spare you the hassle you should burn one DVD per upgrade license.