With Visual Studio 2012 to target the Windows Store, building assemblies that contain XAML elements creates a "hidden" file named XamlTypeInfo.g.cs that is stored in the ProjectName/obj/Release folder (for release builds). This file is included
in the project and the debug symbols (.pdb) file, however is not part of the project structure.
If you try to create a package using NuGet with the -Symbols argument then the generated MyProject.symbols.nuget file does not include the XamlTypeInfo.g.cs file. Since this is referenced in the .pdb file the upload to the symbol server fails with the following
The remote server returned an error: (506) Package submission failed: Source file c:\Users\Andrew\Documents\Visual Studio 2012\Projects\Okra\Okra.Core\obj\Release\XamlTypeInfo.g.cs not found in package. Source file is declared in Okra.Core.pdb.
Steps to reproduce project structure,
- Create a new Visual Studio 2012 Windows Store Class Library project (C#)
- Add a new UserControl to the project
- Build the project.
If you inspect the generated MyProject.pdb file (open in WordPad works!) then you see references to the XamlTypeInfo.g.cs file. Generating a NuGet package with symbols does not include this file.