A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
Hi @RogerSchlueter-7899 ,
Thanks for reaching out.
In C#, the compiler does not use the folder structure to locate classes, it relies on the namespace declared inside each file. So even if your converters are inside a Converters folder, what matters is the namespace at the top of those files.
For example, your converter files should look like:
namespace PIM.Converters
{
public class MyConverter
{
// code
}
}
A few things to check:
- Namespace must match how you reference it:
If your files are declared under namespace PIM, then referencing PIM.Converters will not work. Make sure the declared namespace matches exactly what you’re using.
- WPF / XAML usage:
If you’re using these converters in XAML, ensure the namespace is mapped correctly:
xmlns:conv="clr-namespace:PIM.Converters"
Then used like:
<conv:MyConverter />
If the namespace here doesn’t match the C# file exactly, XAML won’t resolve it.
- Class accessibility:
Make sure your converter classes are marked as public. Otherwise, they won’t be accessible from XAML or other parts of the project.
- Spelling and exact matches:
C# is case-sensitive. Even small differences will cause resolution failures.
- Different project/assembly:
If your converters are in a different project/assembly, update the XAML namespace like this:
xmlns:conv="clr-namespace:PIM.Converters;assembly=YourAssemblyName"
- General checks:
- Rebuild the solution
- Ensure the files are included in the project
- Watch for duplicate or conflicting type names
Hope this helps! If my answer was helpful, I would greatly appreciate it if you could follow the instructions here so others with the same problem can benefit as well.