Failed to tokenize expression "String.IsNullOrEmpty($P) ? Visibility.Collapsed : Visibility.Visible". Did you forget a '$'?

Nov 3, 2014 at 6:16 AM
Hi. After restructuring my solution, i get the above error. It is because now the App.xaml is located in the main project, but the XAML view that is using QuickConverter is in UserControl in a class library that is then referenced by the main project. Because the following code is in App.cs:
        // Add the System namespace so we can use primitive types (i.e. int, etc.).
        // Add the System.Windows namespace so we can use Visibility.Collapsed, etc.
The above namespaces are then not available to QuickConverter when it tries to parse the expression, which means it generates the above error. This would be fine if the application would run, because the namespaces would be added before the XAML is executed, but it causes an error at compile time, rather than a warning.
Nov 3, 2014 at 6:18 AM
Just discovered it does actually run (there was another error preventing it from running which led me to a false conclusion), so obviously QuickConverter must be flagging the parse problem as an error but it does not stop the application from compiling. I still thinks this should be a warning however, as i cannot think of a good way to otherwise solve this dependency issue.