I know I'm late for the party ... but this is what just helped me. If you are in VisualStudio, you can: 1. Exclude all files that you want to link to the project. 2. Include only the .xaml file. For me, this included the .xaml.cs file as well as the code.
Note: Make sure the compilation is correct in the .csproj file. It should look like this:
<ItemGroup> <Compile Include="App.xaml.cs"> <DependentUpon>App.xaml</DependentUpon> </Compile>...
To see this text, you will need to unload the project, and then edit the .csproj file inside any text editor. VS 2015 also allows you to edit this file if you are right in an unloaded .csproj file.
Hope this helps someone.
Chris niemann
source share