Some issues with WPF and VS

We are working with Windows Presentation Foundation these days, using Visual Studio 2005 but the technology seems to be too new and the tools have some annoying bugs. The new XAML has some good things and some other scary problems you should be aware of. The goog point for me as a developer who has access to the MS tools is that you can design your application as a desktop one with a rich developer experience but giving the application a web appearance.
XAML is not surprising for me because Glade has been separating code and presentation layers using XML since long time ago, and the Stetic engine is wonderful but the integration of the desktop and the web under Windows environments with WPF is very attractive for developers.
Anyway this post is intended for showing some bugs at the Cider plugin for Visual Studio which are really annoying:

  1. When trying to build : Error 9 Unable to copy file
    to <./path/X.dll>. The process cannot access the file X it is being used by another process.
  2. Editing and building XAML: Could not find schema information for the attribute X
  3. Editing and building XAML: The element X has invalid child element Y in namespace Z. List of possible elements expected
  4. Again: The tag X does not exist in XML namespace X

The solution is to close all the files you have opened in your current solution, close VS and open it again, trying to rebuild
before open any file. Some times you may be using some wpf control that is in a different assembly than another control and the second one depends on the first. In that case you need to rebuild the dependent assembly first when you change it as you may know.
Anyway the VS XAML designer is not very cool, I find better the MS Expression Blend even though the Blend designer doesn't have intellisense for manual xml edition. A good solution cold be to edit the .xaml files at MS Blend and to edit the .xaml.cs files at VS, sharing the project solution file for both programs.
I dindn't know these issues were bugs but fortunately Alex told me that 😉
If this technology was open source we cold go through the code to find out the bugs and fix them but this time, we have to wait for MS to release a new version 🙁

Update: Arrrrrggghhhh!!!!!. MS Expression Blend and VS wpf designer are both awful !!!!!!! 

Enjoyed reading this post?
Subscribe to the RSS feed and have all new posts delivered straight to you.
  • DLL Files Guy

    Want say thank you, but why not newer one?

    Got better no?

    Biran Nailee

  • HHS

    I am having this problem (1) as you describe above, trying to get into the MS Expression Blend. Am surprised to see that this problems was recognized in VS already back in 2005!!(??) Just seems like an industry record to me – even for Microsoft.

    I have tested with an unlock utility, to see which process is locking, it is Blend.exe. It holds the two DLLs in the Bin-directory. Strangly enough my utility lists two “locks” to this file – one which I can easily eliminate with the utility and one which I cannot. For the problematic one the utility tells me to close down the program (in this case the Blend.exe).

    I also found out the following, which might help you:
    when I start Expression Blend, it offers me to open either an item in a list of Sample-Apps or an item in a Projects-list. (I have not been able to figure out how Blend qualifies a Sample-App from a Project, apart from what I read, that the Sample-Apps dont have a .Sln (“Solution-file”).)
    (Case A) Every Sample-App works fine. I am able to run it (F5).
    (Case B) Every time I open the same thing as a Project, I get the error described above, as I try to run/build it(F5).

    I have seen, through this unlocking-utility, that Blend works with different locks in the different cases.

    In Case B it tries to lock the files in the Bin-directory, which then leads to the locking-conflict described above.

    In Case B, when everything works fine, it sets the two locks on a file which carries the same name (a .dll-file), but is in a totally different directory.

    Would be great if somebody could carry on and help … I have problems to get any further right now … and it costs a lot of time (why is not somebody from Microsoft entering some of those blogs and tells us the facts!??. There is a lot of trial and error out there … )

    Good luck!

  • Carlos Ble

    Thanks HHS,
    I am no longer using WPF, I am more with Python nowdays but your comment might help others.