Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

App.xaml - StartupUri attribute error when pointing to another folder

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 07-25-2007   #1 (permalink)
Mark Moeykens
Guest


 

App.xaml - StartupUri attribute error when pointing to another folder

I'm new to WPF in .NET 3.0 so I decided to dive in and take a look. Didn't
get very far before running into a problem though.

---- Problem -----
I get an error from the StartupUri attribute in the App.xaml that says:
Value 'NewFolder1/Window1.xaml' cannot be assigned to property 'StartupUri'.

---- How to reproduce ----
1. Open up a WPF project in VS 2005 on XP.
2. Add a folder to the root directory with the default folder name
('NewFolder1').
3. Add a new Window (WPF) to the new folder with the default name
'Window1.xaml'.
4. Close all open documents.
5. Open App.xaml.
6. Change StartupUri attribute to 'NewFolder1/Window1.xaml'.
7. Press F5 to run application. You should see Window1.xaml appear with no
problems.
8. Now double-click 'NewFolder1/Window1.xaml' to open it up in Design view.
This is when the error gets generated in my Error List window. I also
cannot open up ANY form in Design mode anymore, just Xaml mode. When I try
to open a xaml window in Design mode I get a screen that says:
"Whoops! Visual Studio has encountered an error reading the designer file.
The errors are shown in the task list. Make appropriate changes to the
designer file and then click on the Design button to try again."

Here's the funny thing, I can drag and drop the App.xaml into the same
directory as the window I set as the StartupUri to fix the error.

But the reason I'm posting this is to see if this is a common error or if
perhaps I don't have the latest version of something.

Thanks,
Mark Moeykens

---- What I'm running -----
I'm using Visual Studio 2005 on Windows XP and I've installed the following:

Microsoft® .NET Framework 3.0 Redistributable Package (ver. 3.0 Publishes
11/21/2006)
Microsoft® Windows® Software Development Kit for Windows VistaT and .NET
Framework 3.0 Runtime Components (ver. 6.0.6000 Published 11/4/2006)
Visual Studio 2005 extensions for .NET Framework 3.0 (WCF & WPF), November
2006 CTP (Published 11/6/2006)







My System SpecsSystem Spec
Old 08-16-2007   #2 (permalink)
Mark Wilson-Thomas (MSFT)
Guest


 

RE: App.xaml - StartupUri attribute error when pointing to another fol

Hi Mark

The Designer version which you are using is a very old CTP of the WPF
designer for Visual Studio. We are no longer updating the Visual Studio
Extensions for Visual Studio 2005 which support WPF and WCF; instead you need
to get hold of a copy of Visual Studio 2008 Beta 2, which not only fixes the
bug you are seeing and many others, it introduces a wide range of new
features which we hope will assist you in building WPF applications.

You can download Beta 2 here:
http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx

The WPF designer is present in all the SKUs including the Express editions,

If you do choose to use it, we'd love to hear your feedback on the designer
- please post it to our Forums on MSDN here:

http://forums.microsoft.com/MSDN/Sho...D=169&SiteID=1

Thanks
Mark Wilson-Thomas
Program Manager, WPF Designer Team, Visual Studio


"Mark Moeykens" wrote:

> I'm new to WPF in .NET 3.0 so I decided to dive in and take a look. Didn't
> get very far before running into a problem though.
>
> ---- Problem -----
> I get an error from the StartupUri attribute in the App.xaml that says:
> Value 'NewFolder1/Window1.xaml' cannot be assigned to property 'StartupUri'.
>
> ---- How to reproduce ----
> 1. Open up a WPF project in VS 2005 on XP.
> 2. Add a folder to the root directory with the default folder name
> ('NewFolder1').
> 3. Add a new Window (WPF) to the new folder with the default name
> 'Window1.xaml'.
> 4. Close all open documents.
> 5. Open App.xaml.
> 6. Change StartupUri attribute to 'NewFolder1/Window1.xaml'.
> 7. Press F5 to run application. You should see Window1.xaml appear with no
> problems.
> 8. Now double-click 'NewFolder1/Window1.xaml' to open it up in Design view.
> This is when the error gets generated in my Error List window. I also
> cannot open up ANY form in Design mode anymore, just Xaml mode. When I try
> to open a xaml window in Design mode I get a screen that says:
> "Whoops! Visual Studio has encountered an error reading the designer file.
> The errors are shown in the task list. Make appropriate changes to the
> designer file and then click on the Design button to try again."
>
> Here's the funny thing, I can drag and drop the App.xaml into the same
> directory as the window I set as the StartupUri to fix the error.
>
> But the reason I'm posting this is to see if this is a common error or if
> perhaps I don't have the latest version of something.
>
> Thanks,
> Mark Moeykens
>
> ---- What I'm running -----
> I'm using Visual Studio 2005 on Windows XP and I've installed the following:
>
> Microsoft® .NET Framework 3.0 Redistributable Package (ver. 3.0 Publishes
> 11/21/2006)
> Microsoft® Windows® Software Development Kit for Windows VistaT and .NET
> Framework 3.0 Runtime Components (ver. 6.0.6000 Published 11/4/2006)
> Visual Studio 2005 extensions for .NET Framework 3.0 (WCF & WPF), November
> 2006 CTP (Published 11/6/2006)
>
>
>
>
>
>
>

My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Read-only File and Folder Attribute Brink Tutorials 9 02-10-2008 11:34 AM
Getting Attribute from XmlElement in XAML john Avalon 0 01-30-2008 01:43 PM
Temp Folder Attribute Problem Mark Buckles/Harlan Labs Vista file management 6 12-19-2007 03:43 PM
Cannot change attribute of a folder Jerry Vista file management 4 09-11-2007 03:07 AM
Can Xaml attach a custom attribute? John Melville, MD Avalon 0 05-13-2006 07:10 PM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51