7
votes

I'm trying to build out both the nuget packages and symbols for my library. I'm using TeamCity to build the packages, then pushing them to my internal SymbolSource repo.

Everything seems to be building/packaging/pushing fine, but when I go to debug into the my nuget package (using VS2012) the source code is not correct, better yet, I can't find the method names it's showing me anywhere in the library.

My Project Structure:

MyProject /
  Bin/
    release/
      MyProject.dll
  VariousFolders/
    CSFiles.cs
  VariousCSFiles.cs
  MyProject.csproj
  MyProject.nuspec

In my .nuspec file (Note, the v4.0 and v4.5 directories are handled on TeamCity side):

<?xml version="1.0"?>
<package >
  <metadata>
    <id>MyProject</id>
    <version>0.0</version>
    <title>MyProject</title>
    <authors>Me</authors>
    <owners>Possibly You</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>Sweet Description</description>
    <releaseNotes></releaseNotes>
    <copyright>Copyright 2013</copyright>
  </metadata>
  <files>
    <file src="MyProject\**\*.cs" target="src" />
    <file src="MyProject\bin\release\v4.0\*.dll" target="lib\net40" />
    <file src="MyProject\bin\release\v4.0\*.pdb" target="lib\net40" />
    <file src="MyProject\bin\release\v4.5\*.dll" target="lib\net45" />
    <file src="MyProject\bin\release\v4.5\*.pdb" target="lib\net45" />
  </files>
</package>

Inspecting the teamcity produced MyProject.0.0.nupkg

lib/
  net40/
    MyProject.dll
  net45/
    MyProject.dll

Inspecting the TeamCity produced MyProject.0.0.symbols.nupkg

lib/
  net40/
    MyProject.dll
    MyProject.pdb
  net45/
    MyProject.dll
    MyProject.pdb
src/
  VariousFolders/
    CSFiles.cs
  VariousCSFiles.cs

So the problem I assume is that when I push the package up to my internal symbol repo, I go look at the file structure, it's as follows:

Data/
  MyProject/
    0.0/
      Bianaries/
        MyProject/
          some_hash/
            MyProject.dll
            MyProject.pdb
            MyProject.txt
      Sources/
        [Empty]
      MyProject.0.0.nupkg

The Sources folder is empty, 100% empty, I can't seem to get any .cs file into that 'Sources' folder, but then again, I don't know what's really going on between the nuget push to my repo, the actual dumping into the data folder and VS2012 magically pulling in the debug symbols.

So, I'm at a complete loss for where to check next.

1

1 Answers

0
votes

Not sure if this will work. But have you tried resetting the VS2012 settings? You can do that by TOOLS -> Import and Export Settings and in the dialog box select Reset all settings option. You can save the current settings if you want to.