Note that there are some explanatory texts on larger screens.

plurals
  1. POLinked Files within a Folder Structure
    primarykey
    data
    text
    <p>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).</p> <p>Error:</p> <p>Message="'pack://application:,,,/projectName ;component/ResourceDictionary .xaml' value cannot be assigned to property 'Source' of object 'System.Windows.SharedResourceDictionary'.</p> <p>Example:</p> <pre><code>Project1.Resources | |--&gt; MergedResourceDictionary.xaml |--&gt; ProjectResourceDictionary.xaml |--&gt; Folder | |--&gt; SharedResourceDictionary.xaml Project2.Resources | |--&gt; MergedResourceDictionary.xaml |--&gt; ProjectResourceDictionary.xaml |--&gt; Folder | |--&gt; SharedResourceDictionary.xaml **LINKED** </code></pre> <p>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.</p> <p>**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.</p> <p><strong>Steps to recreate</strong> This happens at runtime. Steps are as follows (using files listed in original post).</p> <p>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.</p> <p>I appreciate any assistance,</p> <p>Chris </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload