Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

user control as a dll in Blend?

14 views
Skip to first unread message

LT

unread,
Nov 11, 2007, 5:30:01 PM11/11/07
to
Hi,

I've created a user control as a dll in Expresion Blend following the steps
provided in the help file. I then add that dll to a new Blend project as a
reference and build the project. The user control shows up in my Asset
Library and I'm able to drag it onto the art board with no problems. The
problem is when I build the new project to test it I get an error:

"Build Error: The Project could not be built. Check the results pane for
more details.

The tag 'UserControl1 does ot exist in XML namespace
'clr-namespace:;assembly=ReleasedControlTest'. Line 10 Position 4."

If I try creating the user control directly in the project as a new xaml
file, build the project, it shows up in the Asset Library. I can drag it
onto the art board, hit f5 and it works fine. I've gone over the help files
again and creating a dll seems pretty straight forward. Is there something
I'm missing? I really need this user control as a dll.

Any help or tips would be greatly appreciated.

Kindest regards,
-LT

Corrado Cavalli [MVP]

unread,
Nov 11, 2007, 5:41:30 PM11/11/07
to
That's sound weird...
From the error you've posted it looks like the namespace where the control
resides (probably ReleasedControlTest is missing
Could you try editing the Xaml manually and fix the (sort of)
xmlns:[prefix]='clr-namespace:;assembly=ReleasedControlTest'
With
xmlns:[prefix]='clr-namespace:ReleasedControlTest;assembly=ReleasedControlTest'

Of course adjust prefix and namespace as appropriate.


--
Corrado Cavalli [Microsoft .NET MVP-MCP]
UGIdotNET - http://www.ugidotnet.org
Weblog: http://blogs.ugidotnet.org/corrado/


LT

unread,
Nov 11, 2007, 6:21:00 PM11/11/07
to
Hi,
Thanks for the quick response. That's not working. It give the same error,
just adjusts the namespace portion to
'clr-namespace:ReleasedControlTest;assembly=ReleasedControlTest'.

It's doing this in the released version of Blend and the September Preview.

LT

unread,
Nov 12, 2007, 9:33:58 AM11/12/07
to
Narrowing down the problem, this issue only occurs when trying to create a
new user control with the language set to Visual Basic.

Steps to reproduce:
1. Open Expression Blend.
2. Select New Project.
3. Select WPF Control Library.
4. Set the language to Visual Basic.
5. Click OK.
6. Create a control.
7. Build the project, the user control is created as a .dll in the bin\debug
directory for the project.
8. Create a new WPF application.
9. Add a reference to the .dll you just created.
10. Build the project (not really necessary when using a dll, the user
control shows up in the Asset Library before building the project).
11. From your Asset Library select the Custom Controls tab.
12. Select your user control and drag it out on the art board.
13. Build the project and the following error occurs:

Build Error: The Project could not be built. Check the results pane for
more details.

The tag 'UserControl1 does not exist in XML namespace

'clr-namespace:;assembly=ReleasedControlTest'. Line 10 Position 4."

The error does not occur if you set the language to C# in step 4 above when
building your user control.

This is a bug in Expression Blend.


Unni Ravindranathan (MS)

unread,
Nov 13, 2007, 9:11:15 PM11/13/07
to
If you are seeing this bug only with Visual Basic projects, this is a bug in
Blend.

The only workaround I can think of is to to modify your project file to
include a RootNamespace attribute to the project file:
<RootNamespace>UntitledProject1</RootNamespace>

Hope this helps! Our apologies for the inconvenience .

Thanks,
-Unni

<UserControl>
"LT" <L...@discussions.microsoft.com> wrote in message
news:188F4FB8-9006-4ED7...@microsoft.com...

marcroussel

unread,
Oct 2, 2009, 6:39:21 AM10/2/09
to
Don't worry I have the very same problem and believe me I'm in contact with a Microsoft tech about it and he doesn't even know what's going on.

I tried all imaginable things and there's definitely a problem in Blend 3 Also, if I do a Rebuild, it says I'm missing some references which is completetely false. the project build very perfectly in VS 2008

Really the problem is very easy to reproduce. The problem is when we do a UserControl that we add on a page and do build. Blend 3 seems not able to find the TAG that is really there in fact. Everything is done normally.


Unni Ravindranathan \(MS\) wrote:

Re: user control as a dll in Blend?
13-Nov-07

If you are seeing this bug only with Visual Basic projects, this is a bug in
Blend.

The only workaround I can think of is to to modify your project file to
include a RootNamespace attribute to the project file:
<RootNamespace>UntitledProject1</RootNamespace>

Hope this helps! Our apologies for the inconvenience .

Thanks,
-Unni

<UserControl>
"LT" <L...@discussions.microsoft.com> wrote in message
news:188F4FB8-9006-4ED7...@microsoft.com...

EggHeadCafe - Software Developer Portal of Choice
Add Windows GridView control in WPF dynamically in C#.
http://www.eggheadcafe.com/tutorials/aspnet/ab67a9fa-7fe1-4995-a6e1-bf33de76bd69/add-windows-gridview-cont.aspx

0 new messages