I have a project named Components which contains a resource dictionary name TestResourceDictionary.xaml . I am able to refer this Components library from my root startup project and access the resources (SolidColor brushes, Font Files & other static resources) defined within this resource dictionary without any issues.
Trying to "Go to definition" over the item used from TestResourceDictionary.xaml in Components project.
However after converting the Components project into a nuget package with the .pdb files included in it and then after referring to the resource dictionary items within the package generated and then trying to use "Go to definition" option for these resource items Visual Studio says "Resource definition not available" error.
"Go to Definition" works in below cases :
For the code behind .cs files either directly referring the Components project or it's nuget package generated with .pdb symbols.
For .xaml files only when its directly referring the Components library.
"Go to Definition" doesn't work in below cases : (Which I expect it should work)
For .xaml files when its referring to the nuget package generated instead of referring the project directly and removing the project from the solution after referring it as nuget.
So all I want now is "Go to definition" should work the resource item as well, the same way it works for .cs files for the nuget package generated.
For your reference:
- Have generated the batch build with .xml document generation enabled
- Used MSBuild CLI command as below to generate build binaries
MSBuild.exe "D:\POC\CommonLibPOC\NugetPOC\NewAppStructurePOC\Components\Components.csproj" -property:Configuration=Debug -property:Platform="x64" -t:restore -t:clean -t:rebuild /p:DebugSymbols=true /p:DebugType=full
- Finally used my .nuspec file to pack and generate the nuget file with .pdb files included.
nuget pack "D:\POC\CommonLibPOC\NugetPOC\NewAppStructurePOC\Components\Components.nuspec" -OutputDirectory D:\POC\CommonLibPOC\NugetPOC\NewAppStructurePOC\Components\bin\x64\Debug -properties "platform=x64;Configuration=Debug"
Feel free to check out the code and comment - https://github.com/ranaprathap2/Nuget-POC