Path manipulation projects

We have added two interesting projects to SymbolSource that make path manipulation much easier than when using System.IO.Path and allow some additional scenarios. This is how they are described by their authors:

FileDirectoryPath

NDepend.Helpers.FilePathDirectory is the library used by the tool NDepend to handle common path operations. Benefits of the NDepend.Helpers.FilePathDirectory over the .NET Framework class System.IO.Path include:

  • Strongly typed File/Directory path.
  • Relative / absolute path conversion.
  • Path normalization API
  • Path validity check API
  • Path comparison API
  • Path browsing API.
  • Path rebasing API

Read more at http://filedirectorypath.codeplex.com.

FluentPath

Since .NET v1, lots of good things happened to C#: lambda expressions, extension methods, optional parameters to name just a few. Outside of .NET, other interesting things happened as well. For example, you might have heard about this JavaScript library that had some success introducing a fluent API to handle the hierarchical structure of the HTML DOM. You know? jQuery.

Knowing all that, every time I need to use the stuff in System.IO, I cringe. So I thought I’d just build a more modern wrapper around it. I used a fluent API based on an essentially immutable Path type and an enumeration of such path objects. To achieve the fluent style, a healthy dose of lambda expressions is being used to act on the objects.

Read more at http://fluentpath.codeplex.com.

Posted by memfis on Monday, 28 June 2010  •  Comments (0)  • 

New Castle releases added

With a slight, unplanned delay we can now announce support for the latest releases of Castle projects:

  • Castle ActiveRecord Integration 1.1.0
  • Castle Automatic Transaction Management 2.0.0
  • Castle Scheduler 1.0
  • Castle Synchronize Facility 1.1
  • Castle Transaction Services 2.0.0

Posted by memfis on Tuesday, 25 May 2010  •  Comments (4)  • 

Updated look and feel

We updated the look and feel of pages displaying projects and their versions that we support and their contents. With this change we hope to soon make them more even informative.

We also noticed that a lot of our visitors are coming from search engines while looking for code fragments. Because of this, one of our focuses in the nearest future will be to provide more information about the binaries, symbols and sources that we host and to implement code navigation functionality directly on the website.

Posted by memfis on Wednesday, 19 May 2010  •  Comments (0)  • 

Potential source access issue

Due to a bug found recently, you might be unable to download source files when debugging some of the projects for which we provide symbols.

The problem has been resolved and appropriate PDB files have been corrected. However, because Visual Studio caches those files locally, you will need to delete them on your machine manually (or just clear the entire cache folder). Be aware that these files can also be stored in the current user's temp folder.

Affected symbol files exist under the following projects and versions:

  • AutoMapper 1.1
  • Castle Project Core 1.2.0
  • Json.NET 3.5 Release 6
  • Microsoft Enterprise Library 4.1 – October 2008
  • Microsoft Enterprise Library 5.0 - April 2010
  • Microsoft Enterprise Library 5.0 - Beta2
  • MVC Contrib 1.0.0.987
  • MVC Contrib 1.5.996.0 RC
  • MVC Contrib 2.0.34.0
  • MVC Contrib 2.0.36.0 for MVC2 (RTW)
  • Unity 1.2

If you are using any of these releases with SymbolSource, please make sure you delete their PDB files from your local environment. We apologize for the inconvenience.

Posted by memfis on Friday, 07 May 2010  •  Comments (0)  • 

Invitation to Google Groups

We have created a Google Group at http://groups.google.com/group/symbolsource for posting library suggestions or any other feedback on the SymbolSource project.

We hope that it will become the home for discussions on the project's current and future shape. We invite you all to join and take part.

Posted by memfis on Monday, 26 April 2010  •  Comments (0)  • 

Expanding project support

As you might have noticed, we are constantly working on expanding our base of supported projects. We are happy to inform that recently these project realeases where added to our symbol and source repository:

  • Autofac 2.1.13.813
  • AutoMapper 1.0 RTW
  • Unity 1.2
  • Unity 2.0 Beta2
  • WPF Extensions 1.0
  • WPF Toolkit June 2009
  • WPF Toolkit February 2010

We are also working on making our project and version listings more informative and user friendly.

Posted by memfis on Sunday, 11 April 2010  •  Comments (0)  • 

Registration problem resolved

There was a problem with the user registration process which caused errors when accessing the Visual Studio tab and the personalized symbol server link. This is now resolved and there is no need to register again. Everything should work fine with your existing accounts and any new accounts that will be created.

We kindly ask all people that registered with us to try again and apologize for the inconvenience.

Posted by memfis on Sunday, 14 March 2010  •  Comments (1)  • 

SymbolSource compatability

While adding projects to our repository we have come across two main issues that prevent us form adding a particular project:

  1. Official binaries are compiled with symbol generation disabled.
  2. Releases are made rarely, instead encouraging users to use nightly builds.
  3. Binary releases are published without corresponding source distributions and source repositories are not tagged with the release.

These could all be considered bad practises on their own, but in case of SymbolSource these are often dealbreakers preventing us from supporting symbols and sources for a particular release.

Let's take a look at each of these issues.

Symbol generation

To enable symbol generation during a release build it is necessary to use the switch /debug:pdbonly. For the debug configuration this will be enabled by default. Some people will fear that the usage of a /debug switch will lower performance of their code. In the .NET world this is not true, as the intermediate language code resulting from compilation will be exactly the same as with symbol generation disabled.

For a more detailed explanation take a look at this article:

http://www.wintellect.com/CS/blogs/jrobbins/archive/2009/06/19/do-pdb-files-affect-performance.aspx

Without symbol generation enabled for a particular library, Visual Studio will not attempt to load its PDB file from any source - including any symbol servers configured.

Rare releases

Making an official release, even when it is only an Alpha, Beta or Release Candidate version, always requires some level of confidence in the code and readiness to support it one way or another. Smaller projects sometimes encourage their users to use nightly build instead. Unfortunately we are not able to track these builds at SymbolSource, as it is both very time and space consuming.

Matching source

Getting the right source code to upload to SymbolSource can be difficult, especially when there is no official source distribution for a particular release to download, and the project repository is not tagged with the release. The only option then is to cross-reference using dates or check each revision to find matching source. There is no guarantee that we will be able to fing the exact set of sources used to compile the offical release.

Letting us know

The last but not least - we need to be aware of the project and/or release you are interested in. Let us know if you think something should be added to SymbolSource!

Posted by memfis on Wednesday, 03 March 2010  •  Comments (3)  • 

.NET library inspiration list

http://blog.webdistortion.com/2010/02/16/60-net-libraries-every-developer-should-know-about/

Posted by memfis on Wednesday, 24 February 2010  •  Comments (0)  • 

Configuring a symbol/source server

To configure Visual Studio for symbol/server use, follow these instructions:

  1. Go to Tools -> Options -> Debugging -> General.
  2. Uncheck “Enable Just My Code (Managed only)”.
  3. Uncheck “Enable .NET Framework source stepping”. Yes, it is misleading, but if you don't, then Visual Studio will ignore your custom server order (see further on).
  4. Check “Enable source server support”.
  5. Uncheck “Require source files to exactly match the original version”
  6. Go to Tools -> Options -> Debugging -> Symbols.
  7. Select a folder for the local symbol/source cache.
  8. Add symbol servers under “Symbol file (.pdb) locations”. Pay attention to the correct order, because some servers may contain symbols for the same binaries: with or without sources. We recommend the following setup:
    • http://referencesource.microsoft.com/symbols
    • (path from Visual Studio tab after you log in to this site)
    • (other symbol servers with sources)
    • http://msdl.microsoft.com/download/symbols
    • (other symbol servers without sources)

The reason we ask you to enter a personalized path to our symbol/source server is to be able to provide a better service through monitoring what symbols or sources we are missing, and what projects are mostly used.

Tips & Tricks

  1. When using a symbol server for some of your dependencies be sure not to have any other PDB files of those libraries present in the same directory as the DLL files. When debugging code using Library.dll, Visual Studio will always first load Library.pdb from the same directory, which will disable symbol and source server usage.

  2. To more effectively debug .NET Framework code it is useful to disable optimizations using the following command (environment variable): set COMPLUS_ZapDisable=1

Posted by memfis on Monday, 22 February 2010  •  Comments (0)  • 

Public symbol and source servers

As mentioned in our first blog post, there are official symbol servers for some software components and projects. Below is a short list of those that we could find.

  • Microsoft
    • http://referencesource.microsoft.com/symbols
    • http://msdl.microsoft.com/download/symbols
  • Mozilla
    • http://symbols.mozilla.org/firefox
    • http://symbols.mozilla.org/xulrunner

If you know about other, please let us know, so we can update this blog post.

Posted by memfis on Sunday, 21 February 2010  •  Comments (0)  • 

Introducing the symbol and source server project

What is the goal of this project?

The goal of this project is to provide a common debugging symbols and sources server for the most popular open source projects in the .NET ecosphere: NHibernate,  Castle, Log4Net, C5, NInject and many other. More projects will be added over time and we will try to keep up to date with official releases of these projects (including important Beta and Release Candidate distributions). Please feel free to submit your own suggestions of other projects.

What happens when I debug code in Visual Studio?

Whether you debug native code compiled from languages such as C++ or managed code that the CLR runtime compiles just-in-time during runtime, the key element of the process is a correct PDB file for the EXE or DLL you are working on. A PDB file contains metadata describing code as it was before compilation: what classes, methods or functions it consisted of before being transformed into much simpler machine-level concepts. It also provides reverse mappings between CPU registers and variables in high-level code and between machine instructions and programming language statements that generated them. Basically, it stores information lost during compilation that is essential for a debugger to allow step-by-step code execution and variable value monitoring. Of course, for managed code, much of this information is stores together with executable code in EXE or DLL assemblies, but a PDB file is still necessary because of code optimizations done by .NET language compilers.

Why haven’t I ever heard of PDB files?

Symbol files (i.e. PDB files, but historically these were also DBG files) are automatically generated during compilation, so there is no need to worry about them when working on projects for which you have all source code and the dependencies are mostly bug-free and well documented – projects that use only environment-provided libraries such as the C or C++ standard libraries or the .NET BCL (Base Class Library). However, once more dependencies are added to a project and issues arise that could be more easily solved by debugging the library code in its context of use, a need for symbol files arises.

Where can I get symbols for the libraries that I use?

We already mentioned one method of obtaining symbol files: compiling the source code. It has a few major disadvantages, however, even for source code that you own. Including library projects in a solution can increases compile times drastically, and almost always will lead to performance degradation when working with Visual Studio. It is also preferable to link binaries instead of including source code to reference official, versioned builds – for ease of dependency management, increased security and stability. There are two ways you can obtain symbol files in this scenario: with the official binary distribution (or as a separate package) or through a symbol server.

What is a symbol server?

A symbol server is an HTTP server that provides PDB files for any EXE or DLL requested. When using a symbol server you no longer have to manage symbol files for you dependencies (be it external libraries or internal “common” or “tools” projects) and keep them in sync with your binaries. When debugging, Visual Studio will query symbol servers for PDB files matching exactly the binary file you are debugging. A public symbol server is provided by Microsoft for most of the Windows libraries. When configured, this will give you meaningful stack traces, among other things. You can read more about it here: support.microsoft.com/kb/311503/

What is a source server?

Having appropriate symbol files is only half of the solution. To be able to debug code, you still need source files used for compiling the binary file. When working on your own projects, you already have the source and symbol files (be aware though that source file paths are hardcoded into PDB files as absolute paths, so sharing them is not straightforward). When stepping into external dependencies, you need a means of getting the right source file. This is where a source server comes into play. It is a complementary server to a symbol server mentioned earlier. When PDB files are uploaded to a symbol server, instructions are eimbedded into them, so that Visual Studio will be able download source files. Microsoft provides a source server for the .NET Framework. You can read about it here: referencesource.microsoft.com

Posted by memfis on Saturday, 20 February 2010  •  Comments (4)  •