MSDN Samples Gallery - Frequently asked questions

New Samples Experience

What is the Samples Gallery?

With the Samples Gallery we are providing Microsoft and the community with a great way to learn from code.

  • Share your Sample

    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.

  • Find Samples

    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.

  • Learn through code

    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.

  • Empower and Reward the Community

    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.

How is the Samples Gallery different from the old MSDN Code Gallery?

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 experience was not optimized for samples.
  • The site was used to share content other than samples.

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.

Migrating samples from the old MSDN Code Gallery

What will be migrated?

We have been working with Microsoft and community publishers to get their content migrated to the new MSDN Samples Gallery. Unfortunately, this is a manual process because we require the samples to be packaged in the correct granularly and we require additional data like the topic and technologies you are trying to teach through your sample. See the Contributing Samples section for more information on how to upload your sample.

What happens to content that is not migrated?

The content that is not migrated will still be available through its original URL but will redirect to We will not break any existing links

Can I migrate my sample to the Samples Gallery?

Yes, the migration process involves four simple steps:

  1. Open your original resource page on
  2. Browse to
    1. You might be asked to set up a MSDN profile account for your Windows Live ID. The new gallery uses the common MSDN profile where the old gallery did not.
  3. Upload your project. See the Contributing Samples section for more information on how to upload your sample.
  4. Go to your original resource page on The redirect banner on this page allows you to set up the redirect to your new sample page.

Contributing Samples

What is a good code description?

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:

upload image
upload code
Code Section
upload video
upload file
File Attachments

How do I prepare my source code?

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.

Can I upload my sample in different programming languages?

Yes, you simply need to package each programming language flavor of your sample in a different zip file and upload them to your sample page. For example, if you want to provide a VB alternative to your C# code, you need to create separate Visual Studio solutions for each. After you package them in separate zip files you can upload them and they will become available as separate downloads.

Can I combine different programming languages in a sample?

Yes, some samples require different programming languages. It is not uncommon to combine a language like C# with F#. Simply package them in a zip file as part of one Visual Studio solution and they will be available as one download.

Can I upload my sample in different Visual Studio versions?

No, you need to create a different sample page for a different Visual Studio version.

What do I enter as a technology?

Try to think about what technologies you are teaching with your sample. A technology can be one of the following:

  • A product (SQL Server 2000, SharePoint 2010)
  • A Framework or runtime (XNA, Windows 7 SDK, Silverlight 2.0, WPF)
  • A Library (Entity Framework, Unity)
  • A Programming Language (C#, VB.NET)

    Only enter the programming language if you are actually teaching a language feature. Examples: LINQ, Iterators, Error Handling, etc.

What do I enter as a topic?

Try to think about what technology-agnostic subject matter your sample is trying to teach.

Examples: Security, Performance, Threading

Will you unpublish non-code sample content published to the MSDN Samples Gallery?

Yes, the MSDN Samples gallery will only allow sample contributions.

How do I update my sample?

After you create your sample, the sample page will have an edit link that allows you to update the sample whether it is published or not. Any updates you save will overwrite the existing version.

Help to improve a Sample

Why should I rate a sample?

By rating a sample you give other users a quick indication on whether the sample is worth downloading. You also give the author recognition points by giving the sample a high rating.

Can I ask a question on a sample?

The author of the sample page can choose to enable the Q/A tab on his contribution page. If the Q/A tab is available, the author will most likely try and answer your questions. Anyone who answers a question correctly will be rewarded points in one of our upcoming releases.

Profile and Recognition

Recognition Beta?

The Beta of MSDN Samples Gallery is coupled with the beta of the MSDN recognition system. During the coming months we will continue to tweak the points that you receive for being part of the MSDN community.

What are recognition points?

Your recognition points give other users an indication of what you have accomplished on MSDN.

How can I get recognition points?

You get recognition points by publishing great quality samples pages on the MSDN Samples Gallery. You will get points based on:

  • The number of downloads of your samples

    As your project gets more downloads you get recognition points.

  • Ratings of your samples

    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.


What is abuse?

Anything that violates the MSDN Terms of Use is considered abuse. This may include offensive language, copyright violations, and spam.

How can I report abuse?

Each sample project has a Report Abuse to Microsoft link. Once you click the report abuse link we ask you to provide us with a short description on why the sample should be removed.