MyGet & SymbolSource.org: VS2012 isn't finding the pdb - nuget

I've created a library on myget (part of ci), and I'm trying to push the symbol sources to symbolsource.org (this is a great service, and I love the idea). This is my first attempt. I've been using the instructions found on the myget site: http://docs.myget.org/docs/reference/symbolsource, but there are some gaps.
Here are the steps I go through. First, I create a nuspec file, and I use "nuget pack -symbol xxx" to create the X.symbols.nupkg and X.nupkg files. This works just fine. I then push them individually to myget and symbolsource. I used the nuget pkg explorer to examine the contents, and they look as I would expect (the src, pdb, and dll show up in the symbols). After doing the push, I can log into symbolsource and I see my packages up there using the instructions found on the myget page.
I used the following command to push to symbolsource:
nuget push X.symbols.nupkg $ApiKey -Source http://nuget.gw.SymbolSource.org/MyGet/rootdotnet/
I then configure visual studio as instructed: make sure to turn off "enable just my code" and also to turn on symbol servers. I then add to the list of symbol servers the following URL:
http://srv.SymbolSource.org/pdb/MyGet/gwatts/XXXXX
Where XXXX is a GUID I read off the sumbolsource "Your Account"/"Authentication" "Visual Studio" table entry (myget wasn't at all clear this is what I was supposed to do).
I then try to debug. When I hit something in that library, I get the "No Symbols Loaded" page in VS2012. Under details, there is a dump VS2012's attempt to find the pdb file. I see the following:
C:\Users\Gordon\Documents\Code\HVQCDCorrelationStudy\CalcSimpleCorrelationTestNumbers\bin\x86\Debug\LINQToTTreeLib.pdb: Cannot find or open the PDB file.
c:\TeamCity\buildAgent\work\44463130cd7383cb\LINQToTTree\LINQToTTreeLib\obj\x86\Release\LINQToTTreeLib.pdb: Cannot find or open the PDB file.
C:\WINDOWS\LINQToTTreeLib.pdb: Cannot find or open the PDB file.
C:\WINDOWS\symbols\dll\LINQToTTreeLib.pdb: Cannot find or open the PDB file.
C:\WINDOWS\dll\LINQToTTreeLib.pdb: Cannot find or open the PDB file.
C:\Users\Gordon\AppData\Local\Temp\SymbolCache\LINQToTTreeLib.pdb\9c883e0fa93245c99efd2b92dbfc6dfc1\LINQToTTreeLib.pdb: Cannot find or open the PDB file.
C:\Users\Gordon\AppData\Local\Temp\SymbolCache\MicrosoftPublicSymbols\LINQToTTreeLib.pdb\9c883e0fa93245c99efd2b92dbfc6dfc1\LINQToTTreeLib.pdb: Cannot find or open the PDB file.
C:\Users\Gordon\Documents\Code\HVQCDCorrelationStudy\LINQToTTreeLib.pdb: Cannot find or open the PDB file.
SYMSRV: C:\Users\Gordon\AppData\Local\Temp\SymbolCache\LINQToTTreeLib.pdb\9C883E0FA93245C99EFD2B92DBFC6DFC1\LINQToTTreeLib.pdb not found
SYMSRV: http://srv.SymbolSource.org/pdb/MyGet/gwatts/XXXXX/LINQToTTreeLib.pdb/9C883E0FA93245C99EFD2B92DBFC6DFC1/LINQToTTreeLib.pdb not found
http://srv.SymbolSource.org/pdb/MyGet/gwatts/XXXXX: Symbols not found on symbol server.
SYMSRV: C:\Users\Gordon\AppData\Local\Temp\SymbolCache\LINQToTTreeLib.pdb\9C883E0FA93245C99EFD2B92DBFC6DFC1\LINQToTTreeLib.pdb not found
SYMSRV: http://msdl.microsoft.com/download/symbols/LINQToTTreeLib.pdb/9C883E0FA93245C99EFD2B92DBFC6DFC1/LINQToTTreeLib.pdb not found
http://msdl.microsoft.com/download/symbols: Symbols not found on symbol server.
In short, it looks like it correctly contacts symbolssource.org. But something is failing up there. The 9C883E0FA93245C99EFD2B92DBFC6DFC1 is obviously a hash. I have no idea (??) what hash symbolssource assigned to that library - though I'd love to try to figure it out, as that might be a first step to understanding what is going on.
Basically. I don't know how to proceed with debugging at this point. Any help would be appreciated!
Update: As mentioned in the answers below, build something small that can be tested. I've done that, and it works just fine. In doing that I discovered there are some debugging tools up on SymbolSource.org - specifically, when you look at a package in your feed, you can find the "Compilations" link. Click on it. It should show a line for each build type you've uploaded. My packages have nothing associated with that - so I've messed up my nuspec file somehow for symbol generation.

Try to isolate a reproducible scenario (rule out as many other factors as you can). Sounds like your Visual Studio set up is correct, so I'm suspicious for package or compilation issues (e.g. symbols and sources out of sync). Feel free to contact MyGet support for further assistance.

The answer, it turns out, is a slice of humble pie. Turns out on my build server there was an environment variable conflict. The result was that local build scripts built a symbols file just fine and the build server built one without PDB's in it. Without pdb's, of course, the source server was not able do very much.
One thing I did learn on the way is the NuGet PackageExplorer (https://npe.codeplex.com/). Want you can do is use it to load up the nugget symbols package. Then use the plug-in manager to load in the SymbolesSource plug-in (you'll have to use the market place, but it is all free). This utility would have caught the problem in my packages had I submitted the proper ones to it (my local packages passed with flying colors).

Related

Doxygen failed to run html help compiler, hhc.exe error HHC5010 when running from folder that has a parent folder that starts with "."

I am using Conan package manager on Windows to create a package. The conan command to create the package copies files to a folder within %USERPROFILE%\.conan (or C:\Users\xxxxxxx\.conan). Then from this location it builds a Visual Studio project and ultimately calls doxygen.exe to create a .chm help file in a post-build command. The doxygen command fails with:
error : failed to run html help compiler on index.hhp
Further investigation reveals the hhc.exe command executed by doxygen is failing with:
C:\Users\xxxxxxx\.conan\data\Module\1.0.0\user\channel\build\524dc97e4a3dd1f774ea3897f9e4faf26c5457d2\Documentation>"C:/Program Files (x86)/HTML Help Workshop/hhc.exe" html\index.hhp
HHC5010: Error: Cannot open "C:\Users\xxxxxxx\data\Module\1.0.0\user\channel\build\524dc97e4a3dd1f774ea3897f9e4faf26c5457d2\Documentation\html\Module.chm". Compilation stopped.
Close inspection reveals that in the error message, the ".conan" folder is missing. Sure enough, I confirmed that hhc.exe fails when the index.hpp resides in a folder that has a parent folder that starts with a ".".
Attempts to resolve this:
changing the Doxyfile setting OUTPUT_DIRECTORY to "$(TMP)/DoxygenModule" resolves the error, but creates the .chm file in another location, which I do not prefer.
navigating to the 8DOT3 name of the ".conan" folder, which is "CONAN~1", to run the hhc.exe command, succeeds, but unfortunately I have no way of getting conan to use this 8DOT3 path for creating the package. E.g. C:\Users\xxxxxxx\CONAN~1\...
I can live with the using the %TMP% folder but would prefer generating the .chm in the current folder. Anyone have any ideas?
HTML Help Workshop v1.31 is installed on my machine at C:\Program Files (x86)\HTML Help Workshop, probably from a Visual Studio installation (not sure). I attempted using a version downloaded from Microsoft website (v1.30) as well, which made no difference.
Other info: Conan version 1.18.0, Doxygen version 1.8.14, Windows 10 Version 1809
Unfortunately not a solution, but this is a known limitation in the hhc.exe, see: https://social.msdn.microsoft.com/Forums/en-US/0681145c-223b-498c-b7bf-be83209cbf4e/issue-with-html-workshop-in-a-windows-container?forum=visualstudiogeneral
HTML Help 1.x command line compiler hhc.exe cannot compile CHM file to folder whose full path contains folder name starting with dot. If you have that problem, you probably specified output path with folder starting with dot, e.g. "d:\My files.NET\documentation". You can use dots in folder names but not at the beginning.
Edit 2019-11-15:
I've just pushed a proposed patch to github (pull request 7402, https://github.com/doxygen/doxygen/pull/7402).
This proposed patch changes inside doxygen from the current directory to the short named current directory, but just for the HTML Help compilation.
Edit 2019-11-16:
Code has been integrated in the master version on github.
This is not an answer either. Actually, you found the answer and workaround[s] yourself.
Use OUTPUT_DIRECTORY to specify a directory containing no folder names beginning with periods.
The error you described is a known issue of the MS HTML Help compiler. More general, the HTML Help compiler does not like some folder and file names. Try and stick with these characters _, a..z, A..Z, 0..9. Do not use these signs in particular ., -, # .
Please note that the proprietary CHM file format is about 20 years old (Windows 95, ...). HTML Help is in maintenance mode, which means no new features and bug fixes are expected for either the runtime or the compiler. All mainstream development on HH has stopped.
There is no way to avoid this error if a directory name above begins with a period. Not even if only the necessary files are written by Doxygen and compiling of the index.hhp is done by a third-party tool like FAR HTML using your path that contains .conan. This is because all applications are using the faulty HHA.dll.
The above applies of course to the entire workflow you have described. Maybe you can interrupt it.
Doxygen can be configured not to call the HTMLHelp compiler. Just uncheck the GENERATE_HTMLHELP option (DoxyWizard: Experts > Topics > HTML). You have all files generated by Doxygen in your preferred output directory - but of course without the CHM file. This can be imported later e.g. by HelpNDoc and compiled as a CHM file in another location.
If you can interrupt the workflow and can also make changes to Doxygen's settings, then a preference setting of OUTPUT_DIRECTORY to e.g. C:/CacheMenu/CONAN~1/DOXYGE~1 also works as expected (here used as test case).
No matter what you do, your workaround and copy and paste from another directory outside is a quick solution at this stage. Please note the EDIT in #albert's answer.

Nuget package missing .target file in build folder

I have build a nuget package at published it to a nuget.server site. But when I try to use the package form the server the .targets file from build folder is not in the file. But if I use the package from a local folder it works as it should. How do I get it to work ?
If i look in the package in the folder on the server it looks ok.
It's not clear to me if you mean using (referencing and restoring) a package, or building (packing) a package.
If the problem is with packing the nupkg, NuGet requires the props and targets files to have specific filenames in specific folders, but if you got it to work at least once, you probably already know that. If this is not the problem with packing, you need to give us more information because not using the correct filename convention is the most common problem and I can't guess what else the problem could be. In particular, if the package is being packed differently on your local machine compared to when it is packed on the server, it means there is something different between how you pack on the two computers, so we need more information about how the build and pack work with your project.
If the problem is with using (restoring) the package, there are a few possibilities. My best guess is that you once had a package without the targets file working correctly, and you restored the package on the server. By design, NuGet packages are immutable which means it's invalid for the contents of a package (same ID and version) to change. This allows NuGet to download the package from a remote feed once, save it in the global package folder (not a cache; they never expire) and the next time NuGet needs to restore the same package (id + version) it uses the one in the global package folder, it does not download again. This means if you once built a bad nupkg and restored it on a machine, then fix the nupkg and kept the same version number, that machine will never get the fixed nupkg. You need to delete it from the global packages folder. I'm not 100% sure, but I think if you have a local file feed and you restore a project that uses packages.config, the nupkg does not get saved in the global packages folder, so doesn't have the same problem. In short, I think the problem is that you changed the nupkg contents once without changing the version number, and one of the machines has the old copy in its global packages folder that it keeps using.
If that's not the problem, the next most likely cause is that the nupkg on the server feed has different contents to the nupkg in the local feed. I've never used NuGet.Server, but some nuget respositories (like nuget.org) do not allow overwriting nupkgs. So, if you pushed a nupkg to your server, fixed a problem in your nupkg without changing the version, then tried to push again, the second push might have failed.
In summary, your question doesn't provide enough information for us to help you, but I wrote about the most common issues above. If it doesn't help, you need to provide us with more information. An example of the problem is the best way to give us enough information to help you.

NuGet Server cannot find .nupkg package files

Okay this is a derivative of Could not load file or assembly 'NuGet.Server, Version=2.11.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies seeing as though I couldn't find a solution to that.
I am publishing my Nuget Server project to my Windows 2012 R2 server and pointing to the applicable directory where the files live. The package files exist, as shown below in the screenshot however I keep on getting the below error:
Severity Code Description Project File Line Suppression State
Error Copying file Packages\PackageName.1.0.0.nupkg to obj\Release\Package\PackageTmp\Packages\PackageNameJson.1.0.0.nupkg failed. Could not find file 'Packages\PackageName.1.0.0.nupkg'. nuget_server_02 0
I have NuGet Server v2.11.3 installed and my project targets .NET Framework 4.6. One thing to note is that the packages themselves are from an earlier version of .NET - most likely 3.5.
This is my web.config file:
<add key="packagesPath" value="D:\RootFolder\SubFolder\SolutionNameFolder\ProjectNameFolder\Packages"/>
Even after several Restore NuGet Packages attempts I am still faced with this dilemma. The one thing I am really struggling to understand is if I point the packagesPath to a local directory, it works and does retrieve the packages however, when I point to the very same project on my server I get this headache.
Previously, in the included link to the related SO question, I could publish but now I can't even get through that stage even though I never made any changes to the project since last working on it. I decided to revisit it today.
UPDATE:
I have deleted the bin folder and rebuilt my solution as per Could not load file or assembly 'someProject' or one of its dependencies. Access is denied But it still can't find the file.
You can run your nuget server and it will show an html file as output (Default.aspx). You can, of course, modify this file to make it look like anything you want and otherwise change it. You can't change the way the nuget server service behaves because that is run from a dll. You should be able to show your repository files using the output page of your nuget server.
I encountered a similar set of errors, and monitored the Event Viewer while I was trying to show the contents of my repository.
The Event Viewer showed that an error was being thrown every time my Nuget Server attempted to list the contents of the packages folder.
Keeping in mind that nuget packages are zip files, and to display the details on the information contained in the nuget packages, the nuget server must unzip them. If the file is corrupted, the server will throw an error and stop attempting to list the contents of any further files. This error results in a w3wp.exe crash. It will be recorded as an ASP.NET error in the Windows->Applications section of the event log.
The cure for me was to delete the contents of the packages folder on my nuget server, and re-up them.
This may be impractical if you have a lot of files in your repository, so any files that were uploaded near the first error shown in the event viewer should be chosen for upload first.
One of the files is likely corrupted.
I would recommend checking out the event viewer on your server, and making sure you have no corrupted files in your repository.
You can view (and edit, to a point) your repository contents with Nuget Package Explorer. If the file you want to view is corrupted, then it should show an error for that file. You can then re-up that file, and if the problem is a file problem, this will cure it.
You can also reinstall your nuget server if that fails. It is somewhat unlikely that the code has been corrupted, but worth a shot.
Good luck.

Upload a NuGet package that is not mine

I have found a dll that is provided via Google Code and I couldn't find it in NuGet. I want this package to be available via a NuGet install, because I want to reuse it in several packages and NuGet seems like the perfect way to do this.
https://code.google.com/p/protobuf-remote/downloads/list
Is it possible for me to generate a nupkg out of these dll's and publish it to NuGet.org? What are the legal limitations to this action?
There are a number of other users that have run into this issue. It seems like the common solution is to create an "Unofficial" package and reference that for the time being (until Google publishes their library as a NuGet). Just make sure to very clearly label the package as unofficial. See these examples.
As for the legal ramifications...
Please look through protobuf-remote license and review the distribution and derived works details. Currently the license is GNU Lesser GPL. Sorry, but you'll have to make your own call on if publishing the NuGet package would be permitted under this license. ;)
I would recommend you instead create a local NuGet package source by pointing to a file share. This can be local on your computer or on a network file share.
Also, if you don't want to update every workstation, you can update the NuGet.config file in your project to point to this source and commit that config file in your source control repository for all users to get automatically. Just note that any change to a NuGet.config file requires you to restart Visual Studio.
And FYI, take a look at how you can chain multiple NuGet.config files.

How to combine all the packages of the eclipse?

As I need to develop java, php, c++, I use several eclipse packages.
so I try to simple to copy several packages into one, and then I use these option to start the eclipse:
1. -clean
2. osgi.checkConfiguration=true
but it doesn't work, I only find the last copied packages after the IDE start.
Get one of the packages from their site and use the Install new software... feature under the help menu.
I think the most straightforward way to get the modules for all of the languages to play nicely together, though I admire your DIY spirit.
Try to use Yoxos for building your custom Eclipse distribution.
From luxsie:
How to merge several setup packages of Eclipse?
Whom this is for?
The ones that can not hold back their temper any longer when trying to install another Eclipse function package. Right the installation speed from some countries is too slow to bear, also the Equinox P2 always try to connect the Download.Eclipse.org. Much to damn.. when your Internet connection closed or reset all of a sudden and got all downloaded files broken. Also OSGi based Eclipse plugins is chaos -- always have some conflict errors.
Oh that is another problem..
Do the following steps:
1 Download the Install Packages that you need from www.eclipse.org. Also please remember verify to see if that is correct package. I choosed J2EE with C/C++.
2 Unpack one package with uncompress softwares, such as 7-zip and WinRAR. unzip all the files to a directory you wanna install to. for example "D:\Eclipse\".
3 open Configurations. Files "\configuration\org.eclipse.equinox.source\source.info" and "\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info" in the installation directory is the ones that need to be merged. also you need "\configuration\org.eclipse.update\platform.xml".
4 open the other packages and fetch their configuration files, and merge files.
to Bundles.info:
Open the bundle.info with any Functional Text Editor, copy all text begin from the line after "#version={Number}" and paste it to another. [{Number} means any Integer number.]
to Source.info:
Similiar with what you did with the bundle.info. If not modified, that line should be the 3rd line in the text file.
to Platform.xml:
Open the file, then find where "feature id=" starts just after the "site" node. Find the "/site" tag and copy all the text between them, paste to another file just before the "/site" tag.
[You can do the similiar also marked feature tags with artifacts.xml]
5 when merging i suggest you to make a new directory and when finished please remember copy the merged file to the one where should it be and overwrite. [I mean where it comes from]
Although not merge "platform.xml" will not cause any functional errors, it will make the About dialog with no button -- to ugly yeah?
[= =|||]Ugly is caused by the artifacts.xml in the installation directory...
6 Open all the package, find "plugins" and "features" directories.now extract!
first extract the one you want most. I extracted JEE package.
then extract the other ones. I don't see any problem whether Overwrite the ones or not.
7 do open a console window, and locale in the installation directory, and then execute "eclipse.exe".
Well, somebody ask me why i paid no attention to the Artifacts.xml in the installation directory. That's because Eclipse will never check the file. It seems to be when you want to update using zip files -- however this way is blocked for lacking site.xml file now.
Then guys, wait a several minutes for eclipse to do some sorting and cleaning job for the merged configurations.. and install your plugins!
INFO: if you face some problems after install a new plugin and restart.. that is because you haven't finish a complete artifacts.xml merging.
You may delete all the artifacts.xml 's header [document start to the "artifacts size = '{Number}'"] and its bottom [from "/artifacts" to document end]. just merge the left content. and make one file just contains the header and bottom, paste the merged one in.
Eh..maybe you can calculate the {Number}s' sum and correct the one in the final document.