Ask a questionAsk a question
 

Answerhow to self reference a project

  • Saturday, November 07, 2009 5:33 PMmarck68 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello

    I have a project that requires a reference to itself to bond some code in vb.net with some other code written in xaml.




    The problem that I am facing is that in the xaml code i have to put a reference to the assembly (project name MyDrawing") something like this



    <Controls:Shuttle x:Class="MyFile" x:Name="base"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="144" Height="146"
        xmlns:Controls="clr-namespace:MyDrawing;assembly=" >
     
       ...
    </Controls:Shuttle>



    Public Class Shuttle
        Inherits Grid
    ...

    End class






     xmlns:local="clr-namespace:MyDrawing;assembly=MyDrawing"


    where mydrawing is the name of the project/solution.


    The problem is that I can not compile the application because there is not a reference (in the references) to the application itself
    but i can not add a reference to the application because i can not compile the application. Is a catch 22

    how can I solve the problems?


    All happened because an antivirus deleted the assembly of the application and now i find myself with this annoying problem





    i get the following error

    Error    23    The tag 'Shuttle' does not exist in XML namespace 'clr-namespace:MyDrawing'.

Answers

  • Sunday, November 08, 2009 12:04 AMMariano O. Rodriguez Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     AnswerHas Code
    You have to omit the assembly in the definition of the namespace:

    <Controls:Shuttle x:Class="MyFile" x:Name="base"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="144" Height="146"
        xmlns:Controls="clr-namespace:MyDrawing;" >
    
    




    http://weblogs.asp.net/marianor/
    • Marked As Answer bymarck68 Thursday, November 12, 2009 1:40 PM
    •  

All Replies

  • Sunday, November 08, 2009 12:04 AMMariano O. Rodriguez Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     AnswerHas Code
    You have to omit the assembly in the definition of the namespace:

    <Controls:Shuttle x:Class="MyFile" x:Name="base"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="144" Height="146"
        xmlns:Controls="clr-namespace:MyDrawing;" >
    
    




    http://weblogs.asp.net/marianor/
    • Marked As Answer bymarck68 Thursday, November 12, 2009 1:40 PM
    •