With the Samples Gallery we are providing Microsoft and the community with a great way to learn from code.
You can upload your sample and publish it within minutes. Just package your Visual Studio solution in a .zip file, provide it with title, description, summary, platform, topic and technology information, and you can share your sample with the MSDN community.
You can do a text search and refine your search results by selecting a platform, Visual Studio version, programming language, topic, or technology at any time.
The sample page provides you with a rich html description, online code browsing, and an optional Q/A section where you can ask questions about the sample. You can directly copy and paste the code from the browse code tab or download the sample and open it inside Visual Studio.
When you find a great sample you can help the contributor to improve his reputation by giving it a high rating. You can also help the contributor and other users by voting down low quality samples.
When we originally released the old MSDN Code Gallery we wanted to provide Microsoft and the community with a great location to share samples. Unfortunately this site has two main drawbacks:
The MSDN Samples Gallery tries to address both of these issues by only allowing samples and providing more features that enable you to learn from the code more quickly.
Yes, the migration process involves four simple steps:
A good sample description is at least 1000 characters long (not including whitespace) and contains a rich html description that explains what you are teaching with your sample. Users should be able to understand what you are teaching without the need to download the sample.
You can add the following elements to your description through our editor:
The sample needs to compile and if the sample is an application it needs to run correctly. Before packaging your sample remove the output folders created by your build. You can additionally use FxCop to run static code analysis on your sample.
You will need to package your sample in a zip file. The zip file can only have one Visual Studio solution file in the root directory of your package.
Try to think about what technologies you are teaching with your sample. A technology can be one of the following:
Only enter the programming language if you are actually teaching a language feature. Examples: LINQ, Iterators, Error Handling, etc.
Try to think about what technology-agnostic subject matter your sample is trying to teach.
Examples: Security, Performance, Threading
You get recognition points by publishing great quality samples pages on the MSDN Samples Gallery. You will get points based on:
As your project gets more downloads you get recognition points.
Each time your project receives a rating we will award you points on that rating. HIgh ratings get you more recognition points, low ratings will encourage you to improve your sample by decreasing your recognition points.