Skip to content

Rework .NET samples and snippets instructions - #394

Merged
5 commits merged into
MicrosoftDocs:masterfrom
BillWagner:new-samples-organization
May 11, 2020
Merged

5 commits merged into
MicrosoftDocs:masterfrom
BillWagner:new-samples-organization

Conversation

@BillWagner

@BillWagner Bill Wagner (BillWagner) commented May 7, 2020 •

Copy link
Copy Markdown
Member

Fixes dotnet/docs#17297

We've updated our samples and snippets structure. This PR describes the new structure, and migration guidelines for existing snippets. In addition, rework the samples section to include the metadata necessary for the samples browser experience.

/cc Andy De George (@Thraka)

@tdykstra Tom Dykstra (tdykstra) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, I noted just one typo and a couple suggestions

Comment thread Contribute/dotnet/dotnet-contribute.md Resolved
Comment thread Contribute/dotnet/dotnet-contribute.md Resolved
Comment thread Contribute/dotnet/dotnet-contribute.md Resolved
Comment thread Contribute/dotnet/dotnet-contribute.md Resolved
@BillWagner

Copy link
Copy Markdown
Member Author

Tom Dykstra (@tdykstra) Do you know who needs to approve this before merging? Or was there a issue with recording your review?

@BillWagner

Copy link
Copy Markdown
Member Author

#sign-off

/cc jim-parker


For images and other static resources, create a subfolder called **media** inside the folder that contains your article, if it doesn't already exist. Inside the **media** folder, create a subfolder with the article name (except for the index file).

For **code snippets**, create a subfolder called **snippets** inside the folder that contains your article, if it doesn't already exist. In most cases, you'll have code snippets for all three of the main .NET languages, C#, F#, and Visual Basic. In that case, create sub-folders named **csharp**, **fsharp**, and **vb** for each of the three projects. For simplicity, use the **snippets** folder for your project in the C# Guide, F# Guide, and Visual Basic Guide. Those areas typically have snippets for one language. Code snippets are small, focused examples of code that demonstrate the concepts covered in an article. Larger programs, intended for download and exploration should be located in the [dotnet/samples](https://github.com/dotnet/samples) repository. Full samples are covered in the section on [Contributing to samples](#contributing-to-samples).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it's easier to see, this suggestion changes the following:

For code snippets, create a subfolder called snippets inside the folder that contains your article, if it doesn't already exist. Inside the snippets folder, create a subfolder with the article name. In most cases, you'll have code snippets for all three of the main

Suggested change
For **code snippets**, create a subfolder called **snippets** inside the folder that contains your article, if it doesn't already exist. In most cases, you'll have code snippets for all three of the main .NET languages, C#, F#, and Visual Basic. In that case, create sub-folders named **csharp**, **fsharp**, and **vb** for each of the three projects. For simplicity, use the **snippets** folder for your project in the C# Guide, F# Guide, and Visual Basic Guide. Those areas typically have snippets for one language. Code snippets are small, focused examples of code that demonstrate the concepts covered in an article. Larger programs, intended for download and exploration should be located in the [dotnet/samples](https://github.com/dotnet/samples) repository. Full samples are covered in the section on [Contributing to samples](#contributing-to-samples).
For **code snippets**, create a subfolder called **snippets** inside the folder that contains your article, if it doesn't already exist. Inside the **snippets** folder, create a subfolder with the article name. In most cases, you'll have code snippets for all three of the main .NET languages, C#, F#, and Visual Basic. In that case, create sub-folders named **csharp**, **fsharp**, and **vb** for each of the three projects. For simplicity, use the **snippets** folder for your project in the C# Guide, F# Guide, and Visual Basic Guide. Those areas typically have snippets for one language. Code snippets are small, focused examples of code that demonstrate the concepts covered in an article. Larger programs, intended for download and exploration should be located in the [dotnet/samples](https://github.com/dotnet/samples) repository. Full samples are covered in the section on [Contributing to samples](#contributing-to-samples).

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move snippets into the docs

3 participants