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

  • SEARCH
  • Home
  • 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 524025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:31:28+00:00 2026-05-13T08:31:28+00:00

In Visual Studio when I linked a file from one project to the next,

  • 0

In Visual Studio when I linked a file from one project to the next, I get the following error when an attempt is made to load the linked resource. This only happens when the linked file is within a folder(s).

Error:

Message=”‘pack://application:,,,/projectName ;component/ResourceDictionary .xaml’ value cannot be assigned to property ‘Source’ of object ‘System.Windows.SharedResourceDictionary’.

Example:

Project1.Resources
           |
           |--> MergedResourceDictionary.xaml
           |--> ProjectResourceDictionary.xaml
           |--> Folder
                     |
                     |--> SharedResourceDictionary.xaml           


Project2.Resources
           |
           |--> MergedResourceDictionary.xaml
           |--> ProjectResourceDictionary.xaml
           |--> Folder
                     |
                     |--> SharedResourceDictionary.xaml  **LINKED**

If in the MergedResourceDictionary.xaml we merged these dictionaries, then the “SharedResourceDictionary.xaml in Project2 will not be found. However, if the SharedResourceDictionary.xaml is linked at the root of the project then the resource is found at runtime.

**NOTE: In the “obj/debug” of project2, all linked resources are at the root directory, whereas in project1 resources remain within the folder structure assigned in the project.

Steps to recreate
This happens at runtime. Steps are as follows (using files listed in original post).

1) Create SharedResourceDictionary in Project1, within “Folder”
2) Create “Folder” in Project2, then add “as link” SharedResourceDictionary within the folder
3) Build and run app
4) App will not be able to find the SharedResourceDictionary.xaml, due to it residing within the Folder. Removing the file from the folder structure will work fine as a linked file.

I appreciate any assistance,

Chris

  • 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-13T08:31:28+00:00Added an answer on May 13, 2026 at 8:31 am

    I spent sometime working with Microsoft support on this problem. It is a bug with MsBuild and doubtful to be something they fix in the future.

    I have found a workaround for anyone that is interested:

    Create a PostBuild event that runs LocBaml and creates the folder structure that you require and places the files in the correct folder.

    Hope this helps.

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

Sidebar

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.