Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6021005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:39:00+00:00 2026-05-23T03:39:00+00:00

I have a bizarre problem that is causing us problems. We have a simple

  • 0

I have a bizarre problem that is causing us problems.

We have a simple C# Wpf UserControl. Its a progress bar – nothing fancy – just a border that changes size depending on bindings to Value and MaxValue. It works fine 99% of the time and we use it in a dozen or so places in out code – including the splash screen.

It always works fine in the splash screen – so it always loads and works in our app.

The problem is that sometimes (and we can’t predict or understand when) the InitializeComponent() call in the progress bar constructor throws a System.Exception. Looking into the progressbar.g.cs file created during compile (obj/Debug folder) I can see that the exception is thrown because the progressbar.xaml file is not found. I have not, of course, changed any code in the g.cs file and I haven’t done anything fancy in this UserControl at all.


System.Exception: The component 'MyProject.ControlLibrary.ProgressBar' does not have a resource identified by the URI '/MyProject.ControlLibrary;component/progressbar.xaml'.
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at MyProject.ControlLibrary.ProgressBar.InitializeComponent() in d:\Projectfolder\MyProject.ControlLibrary\ProgressBar.xaml:line 1
at MyProject.ControlLibrary.ProgressBar..ctor() in D:\projectfolder\MyProject.ControlLibrary\ProgressBar.xaml.cs:line 26
at ProjectName.UI.VideoViewer..ctor() in D:\projectfolder\UI\VideoViewer.xaml.cs:line 26
Source: PresentationFramework

I don’t understand why the progressbar.xaml resource would go missing sometimes, especially given that it always works fine at least once when the app is run.

The UserControl is contained in a project called MyProject.ControlLibrary.dll. This project seems to be configured correctly as it contains other usercontrols which don’t show any problems – except from one other similar UserControl which has identical problems.

I have run out of ideas on this – so any suggestions would be helpful. I am using VisualStudio 2008 and .net 3.5

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:39:00+00:00Added an answer on May 23, 2026 at 3:39 am

    I may have solved this – I’ll explain the problem here in case someone else runs into it.

    One section of our code dynamically loads plugins from a plugins folder. To do this, it does Assembly.LoadFile(filename) for all the .dll files in the plugins folder.

    It checks to see if the dll implements our plugins interface; if it does, it loads it, if not, it doesn’t. Our plugin interfaces are contained in a file called MyProject.Interfaces.dll and this file, along with MyProject.ControlLibrary.dll are also in the plugin’s folder.

    So, the code sometimes calls Assembly.LoadFile on MyProject.ControlLibrary.dll twice as it cycles through the dlls in the plugins folder. It seems that following this second LoadFile, the xaml resources become lost. When I prevent this second load, it seems to fix the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using Hibernate very successfully, but today I noticed a bizarre phenomenon
Have just started using Google Chrome , and noticed in parts of our site,
Have just started using Visual Studio Professional's built-in unit testing features, which as I
Have had to write my first proper multithreaded coded recently, and realised just how
I have encountered a slightly bizarre bug while using the ajax control toolkit TabPanel.
I have a TFS structure that looks something like this: $ -MainSoftwareBranch -Dev -Main
Scenario : What I have is an upload form that reports on the upload
Have you ever seen any of there error messages? -- SQL Server 2000 Could
Have you guys had any experiences (positive or negative) by placing your source code/solution
Have you used VS.NET Architect Edition's Application and System diagrams to start designing a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.