Renaming libraries and updating references in XAML files

Back when we were converting our libraries to Windows compatibility, we included _Windows on the library name to differentiate them from the Legacy libraries.

Now that Legacy is fully in the past, I would like to rename those libraries to take _Windows off the name.

I saw a post from a couple years ago about renaming libraries and avoiding the missing activities error. It mentioned updating the xmlns references in the first line of the XAML file but it wasn’t specific about what exactly to update.

I also want to rename them properly so the activities are properly organized in Studio - ie all groups under “FirstHorizon” then grouped by the part after the period ie

  • FirstHorizon
    – Utilities
    — Activity
    — Activity
    – Word
    — Activity
    — Activity

Considering this library:

  • Original name (in project.json): FirstHorizon Utilities_Windows
  • New name (in project.json): FirstHorizon.Utilities

What should this reference be updated to?

xmlns:f="clr-namespace:FirstHorizon_Utilities_Windows;assembly=FirstHorizon Utilities_Windows"

Should it be…

xmlns:f="clr-namespace:FirstHorizon_Utilities_Windows;assembly=FirstHorizon_Utilities"

I’m thinking that the clr-namespace is what’s used throughout the XAML to tell it where to look for the activities, and the assembly tells it the library name for that clr-namespace. Is that correct? It also looks like it converts spaces and periods to underscores so if the library name is “FirstHorizon.Utilities” I should use “FirstHorizon_Utilities” for the assembly.

So I finally figured this out.

With the library named “FirstHorizon Utilities_Windows” (name in project.json) and changing it to “FirstHorizon.Utilities”, after uninstalling the old dependency and installing the new one, the old reference on the first line of the XAML file is:

xmlns:f="clr-namespace:FirstHorizon_Utilities_Windows;assembly=FirstHorizon Utilities_Windows"

Change it to:

xmlns:f="clr-namespace:FirstHorizon_Utilities;assembly=FirstHorizon.Utilities"

For the namespace, it looks like you replace spaces and periods with underscore, but on the right you give the exact library name.

Now when I open the project, no more broken activities.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.