locked
clr-namespase in any WPF window hides Activities RRS feed

  • Question

  • Short description: When I adding xmlns:custom="clr-namespase:..." to any WPF window, all activities are not visible any more (I got "The type or namespace name 'Activity1' does not exist in the namespace 'STR' (are you missing an assembly reference?)" for each activity usage).

    It's a bit weird - how a window XAML can affect another class in different namespace?

    Steps to reproduce:

    create a WPF project, add a Activity. Leave activity as is.

    MainWindow.xaml:

    <Window x:Class="STR.MainWindow"

          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

          xmlns:custom="clr-namespace:STR2" <--- adding this line breaks compilation

          Title="MainWindow" Height="195" Width="328"/>

    MainWindow.cs:

    using System;

    using System.Windows;

    namespace STR

    {

       public partial class MainWindow : Window

       {

          public MainWindow()

          { InitializeComponent(); }

       }

    }

    namespace STR1

    {

       public class Some

       {

          private void Test(object sender, RoutedEventArgs e)

          {STR.Activity1 a = new STR.Activity1(); }<--- compilation breaks here

       }

    }

    namespace STR2

    {}

     

    Info:

    Microsoft Visual Studio 2010 Version 10.0.30319.1 RTMRel

    Microsoft .NET Framework Version 4.0.30319 RTMRel

    Microsoft Visual C# 2010 01019-532-2002102-70100

    • Edited by Xystarcha Monday, June 14, 2010 9:14 PM
    Monday, June 14, 2010 8:33 PM

Answers

  • Xystarcha,

     

    Can you please file a bug on the connect site and attach your repro project?

     

    Thanks,

     

    matt


    Program Manager -- wf designer -- http://blogs.msdn.com/mwinkle
    • Marked as answer by Andrew_Zhu Thursday, June 17, 2010 7:54 AM
    • Unmarked as answer by Xystarcha Friday, August 31, 2012 10:24 AM
    • Marked as answer by Xystarcha Friday, August 31, 2012 10:24 AM
    Monday, June 14, 2010 9:06 PM

All replies

  • Xystarcha,

     

    Can you please file a bug on the connect site and attach your repro project?

     

    Thanks,

     

    matt


    Program Manager -- wf designer -- http://blogs.msdn.com/mwinkle
    • Marked as answer by Andrew_Zhu Thursday, June 17, 2010 7:54 AM
    • Unmarked as answer by Xystarcha Friday, August 31, 2012 10:24 AM
    • Marked as answer by Xystarcha Friday, August 31, 2012 10:24 AM
    Monday, June 14, 2010 9:06 PM
  • done https://connect.microsoft.com/wf/feedback/details/567348/clr-namespase-in-any-wpf-window-hides-activities
    Monday, June 14, 2010 9:31 PM