Skip to content

Commit ce52ada

Browse files
authored
Update ci build for ubuntu (dotnet#891)
* update self-contained builds to build on ubuntu We use that runtime on the CI build server. * whitespace change to force a build * whitespace changes. * update for CI Build * Ready for a CI build test. * Move LINQ samples. * update references to LINQ samples. * move the getting started with Core on Mac OS tutorial * move the console-linq sample and references. * move the console teleprompter sample * move the console webapiclient sample. * move the weather microservice sample. * move the delegates-and-events sample. * move the event samples. * move the expression trees sample. * mv the indexers samples. * move the iterators sample * move the unit testing sample. * mv the console apps core sample * update console-apps links * move the migration samples. * move new-library back under core. And fix links * Update contributing to match sample locations
1 parent bb15293 commit ce52ada

File tree

354 files changed

+56
-54
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

354 files changed

+56
-54
lines changed

Diff for: .gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ samples/AngularSample/src/AngularSample/wwwroot/lib
205205
project.lock.json
206206
samples/WebApplication1/src/WebApplication1/wwwroot/lib/
207207

208-
/samples/linq/csharp/aggregate/*.xproj
209-
/samples/linq/csharp/aggregate/*.sln
208+
/samples/core/linq/csharp/aggregate/*.xproj
209+
/samples/core/linq/csharp/aggregate/*.sln
210210

211211
_site/
212212
api_ref/

Diff for: CONTRIBUTING.md

+8-12
Original file line numberDiff line numberDiff line change
@@ -110,25 +110,21 @@ All samples should be complete applications or libraries. Where the sample creat
110110
it should include unit tests or an application that lets readers run the code.
111111

112112
The samples are organized in directories that match the directories under
113-
docs in this repo:
113+
docs in this repo.
114114

115-
- `getting-started` contains getting started samples.
115+
- `core` contains .NET Core samples. These are referenced by topics under `/docs/core`.
116116

117-
* Each top-level section of our documentation contains a "getting-started" or "tutorials" section. These topics and their associated samples represent the first look(s) at a topic area. If your sample's goal is to help beginners get started with the platform or the technology, place your sample under `samples/getting-started`. There should be a directory that matches the section for your tutorial (such as `samples/getting-started/csharp`), but if not, simply create a new folder.
117+
* The `core` directory contains samples that highlight .NET Core. The purpose of your sample should be to teach developers something about .NET Core. This includes the framework packaging, the new tooling, or the cross-platform experience. Our CI buid server builds these samples on multiple supported platforms. Therefore, every sample must be configured to build on Linux, Mac, and Windows.
118118

119-
- `core-projects` contains .NET Core samples. These are referenced by topics under `/docs/core`.
119+
- `csharp` contains C# language samples. These are referenced by topics under `docs/csharp`.
120120

121-
* The `core-projects` directory contains samples that highlight .NET Core. The purpose of your sample should be to teach developers something about .NET Core. This includes the framework packaging, the new tooling, or the cross-platform experience.
121+
* The `csharp` directory contains samples where the purpose is to explain the C# language. While these samples will use frameworks and libraries, their focus is on the C# language. Our CI buid server builds these samples on multiple supported platforms. Therefore, every sample must be configured to build on Linux, Mac, and Windows.
122122

123-
- `csharp-language` contains C# language samples. These are referenced by topics under `docs/csharp`.
123+
- `framework` contains .NET Framework samples. These are referenced by topics under many different locations in the documentation. However, what is significant about these samples is that they buid only on Windows where the .NET framework, and Visual Studio are installed.
124124

125-
* The `csharp-language` directory contains samples where the purpose is to explain the C# language. While these samples will use frameworks and libraries, their focus is on the C# language.
125+
* The `framework` directory contains samples that highlight .NET with platform dependencies. These may include migration samples, platform specific samples, or other samples that require the framework or the Windows based tools. Our CI buid server builds these samples on Windows only. Do not place any samples here that should be checked for cross-platform builds.
126126

127-
- `linq` contains all the 101 LINQ samples that were originally created when LINQ was developed. These don't have topics associated with them yet.
128-
129-
* The `linq` directory contains samples that are specific to understanding the concepts and implementation behind Language Integrated Query (LINQ). These samples should be focused on the language support and library methods that are specific to LINQ. Other samples my use the LINQ libraries, but unless they are focused on explaining LINQ concepts, they should be in one of the other directories.
130-
131-
We will expand these directories as the core-docs repository adds new content.
127+
We will expand these directories as the core-docs repository adds new content. For example, we will add Xamarin directories, like `xamarin-ios` and `xamarin-android` directories.
132128

133129
Sample code may fit more than one of these areas. In those cases, place the sample so it matches
134130
the topics you are covering in your documents. Ask yourself what readers will learn from reading

Diff for: docs/core/porting/project-structure.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,18 @@ Please see [.NET Core porting documentation][porting-doc] for more guidance on m
100100

101101
[porting-doc]: index.md
102102
[example-initial-project]: media/project-structure/project.png "Existing project"
103-
[example-initial-project-code]: https://github.com/dotnet/core-docs/tree/master/samples/core-projects/libraries/migrate-library/
103+
[example-initial-project-code]: https://github.com/dotnet/core-docs/tree/master/samples/framework/libraries/migrate-library/
104104

105105
[example-xproj]: media/project-structure/project.xproj.png "Create an xproj that targets multiple frameworks"
106-
[example-xproj-code]: https://github.com/dotnet/core-docs/tree/master/samples/core-projects/libraries/migrate-library-xproj/
107-
[example-xproj-projectjson]: https://github.com/dotnet/core-docs/tree/master/samples/core-projects/libraries/migrate-library-xproj/src/Car/project.json
108-
[example-xproj-projectjson-test]: https://github.com/dotnet/core-docs/tree/master/samples/core-projects/libraries/migrate-library-xproj/tests/Car.Tests/project.json
106+
[example-xproj-code]: https://github.com/dotnet/core-docs/tree/master/samples/framework/libraries/migrate-library-xproj/
107+
[example-xproj-projectjson]: https://github.com/dotnet/core-docs/tree/master/samples/framework/libraries/migrate-library-xproj/src/Car/project.json
108+
[example-xproj-projectjson-test]: https://github.com/dotnet/core-docs/tree/master/samples/framework/libraries/migrate-library-xproj/tests/Car.Tests/project.json
109109

110110
[example-xproj-different-folder]: media/project-structure/project.xproj.different.png ".NET Core project with existing PCL in different folder"
111-
[example-xproj-different-code]: https://github.com/dotnet/core-docs/tree/master/samples/core-projects/libraries/migrate-library-xproj-keep-csproj/
111+
[example-xproj-different-code]: https://github.com/dotnet/core-docs/tree/master/samples/framework/libraries/migrate-library-xproj-keep-csproj/
112112

113113
[example-pcl]: media/project-structure/project.pcl.png "PCL Targeting .NET Core"
114-
[example-pcl-code]: https://github.com/dotnet/core-docs/tree/master/samples/core-projects/libraries/migrate-library-pcl
114+
[example-pcl-code]: https://github.com/dotnet/core-docs/tree/master/samples/framework/libraries/migrate-library-pcl
115115

116116
[option-xproj]: #replace-existing-projects-with-a-multi-targeted-net-core-project-xproj
117117
[option-pcl]: #create-a-portable-class-library-pcl-to-target-net-core

Diff for: docs/core/testing/unit-testing-with-dotnet-test.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.assetid: bdcdb812-6f13-4f20-9e90-0c0977937142
1616

1717
By [Steve Smith](http://ardalis.com) and [Bill Wagner](https://github.com/BillWagner)
1818

19-
[View or download sample code](https://github.com/dotnet/core-docs/tree/master/samples/core-projects/unit-testing/using-dotnet-test)
19+
[View or download sample code](https://github.com/dotnet/core-docs/tree/master/samples/core/getting-started/unit-testing-using-dotnet-test)
2020

2121
## Creating the Projects
2222

@@ -138,7 +138,7 @@ not in the NuGet feed. Without this key, you might download
138138
a package with the same name as your internal library.
139139

140140
You can see the entire file in the
141-
[samples repository](https://github.com/dotnet/core-docs/blob/master/samples/core-projects/unit-testing/using-dotnet-test/test/PrimeService.Tests/project.json)
141+
[samples repository](https://github.com/dotnet/core-docs/blob/master/samples/core/getting-started/unit-testing-using-dotnet-test/test/PrimeService.Tests/project.json)
142142
on GitHub.
143143

144144
After this initial structure is in place, you can write your first test.
@@ -242,9 +242,9 @@ Now, these tests all pass.
242242
You continue to iterate by adding more tests, more theories,
243243
and more code in the main library. You'll quickly end up
244244
with the
245-
[finished version of the tests](https://github.com/dotnet/core-docs/blob/master/samples/core-projects/unit-testing/using-dotnet-test/test/PrimeService.Tests/PrimeServie_IsPrimeShould.cs)
245+
[finished version of the tests](https://github.com/dotnet/core-docs/blob/master/samples/core/getting-started/unit-testing-using-dotnet-test/test/PrimeService.Tests/PrimeServie_IsPrimeShould.cs)
246246
and the
247-
[complete implementation of the library](https://github.com/dotnet/core-docs/blob/master/samples/core-projects/unit-testing/using-dotnet-test/src/PrimeService/PrimeService.cs).
247+
[complete implementation of the library](https://github.com/dotnet/core-docs/blob/master/samples/core/getting-started/unit-testing-using-dotnet-test/src/PrimeService/PrimeService.cs).
248248
249249
You've built a small library and a set of unit tests for that library.
250250
You've structured this solution so that adding new packages and tests

Diff for: docs/core/tutorials/using-on-macos.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ You can find the links to all of these at the [.NET home page](http://dot.net).
4242
## Getting Started
4343

4444
The source for this tutorial is available on
45-
[GitHub](https://github.com/dotnet/core-docs/tree/master/samples/getting-started/golden).
45+
[GitHub](https://github.com/dotnet/core-docs/tree/master/samples/core/getting-started/golden).
4646

4747
Start Visual Studio Code. Press Ctrl + '\`' (the back-quote character) to open
4848
an embedded terminal in VS Code. (Alternatively, you can use a separate

Diff for: docs/core/tutorials/using-with-xplat-cli.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Before you begin, ensure you have the [latest .NET Core CLI tooling](https://www
2424

2525
## Hello, Console App!
2626

27-
First, navigate to or create a new folder with a name you like. "Hello" is the name chosen for the sample code, which can be found [here](https://github.com/dotnet/core-docs/tree/master/samples/core-projects/console-apps/Hello).
27+
First, navigate to or create a new folder with a name you like. "Hello" is the name chosen for the sample code, which can be found [here](https://github.com/dotnet/core-docs/tree/master/samples/core/console-apps/Hello).
2828

2929
Open up a command prompt and type the following:
3030

@@ -99,7 +99,7 @@ Let's try compiling a self-contained application instead of a portable applicati
9999

100100
You need to make some changes to your `project.json`
101101
file to direct the tools to build a self-contained application. You can see these in the
102-
[HelloNative](https://github.com/dotnet/core-docs/tree/master/samples/core-projects/console-apps/HelloNative)
102+
[HelloNative](https://github.com/dotnet/core-docs/tree/master/samples/core/console-apps/HelloNative)
103103
project in the samples directory.
104104

105105
The first change is to remove the `"type": "platform"` element from all dependencies.
@@ -258,7 +258,7 @@ Now the fun part: making the new file do something!
258258

259259
### Example: A Fibonacci Sequence Generator
260260

261-
Let's say you want to build off of the previous [Fibonacci example](https://github.com/dotnet/core-docs/tree/master/samples/core-projects/console-apps/Fibonacci) by caching some Fibonacci values and add some recursive flair. Your code for a [better Fibonacci example](https://github.com/dotnet/core-docs/tree/master/samples/core-projects/console-apps/FibonacciBetter) might look something like this:
261+
Let's say you want to build off of the previous [Fibonacci example](https://github.com/dotnet/core-docs/tree/master/samples/core/console-apps/Fibonacci) by caching some Fibonacci values and add some recursive flair. Your code for a [better Fibonacci example](https://github.com/dotnet/core-docs/tree/master/samples/core/console-apps/FibonacciBetter) might look something like this:
262262

263263
```csharp
264264
using System;
@@ -373,7 +373,7 @@ Say you wanted to introduce some new types to do work on. You can do this by ad
373373
|__project.json
374374
```
375375

376-
This works great when the size of your project is relatively small. However, if you have a larger app with many different data types and potentially multiple layers, you may wish to organize things logically. This is where folders come into play. You can either follow along with [the NewTypes sample project](https://github.com/dotnet/core-docs/tree/master/samples/core-projects/console-apps/NewTypes) that this guide covers, or create your own files and folders.
376+
This works great when the size of your project is relatively small. However, if you have a larger app with many different data types and potentially multiple layers, you may wish to organize things logically. This is where folders come into play. You can either follow along with [the NewTypes sample project](https://github.com/dotnet/core-docs/tree/master/samples/core/console-apps/NewTypes) that this guide covers, or create your own files and folders.
377377

378378
To begin, create a new folder under the root of your project. `/Model` is chosen here.
379379

@@ -552,7 +552,7 @@ You'll probably be wanting to test your projects at some point. Here's a good w
552552

553553
### Example: Extending the NewTypes project
554554

555-
Now that the project system is in place, you can create your test project and start writing tests! From here on out, this guide will use and extend [the sample Types project](https://github.com/dotnet/core-docs/tree/master/samples/core-projects/console-apps/NewTypes). Additionally, it will use the [Xunit](https://xunit.github.io/) test framework. Feel free to follow along or create your own multi-project system with tests.
555+
Now that the project system is in place, you can create your test project and start writing tests! From here on out, this guide will use and extend [the sample Types project](https://github.com/dotnet/core-docs/tree/master/samples/core/console-apps/NewTypes). Additionally, it will use the [Xunit](https://xunit.github.io/) test framework. Feel free to follow along or create your own multi-project system with tests.
556556

557557

558558
The whole project structure should look like this:

Diff for: docs/csharp/expression-trees-building.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ we'd like to avoid in our everyday coding tasks.
203203

204204
For this section, I've also updated the visitor code to visit every node in this expression
205205
tree and write out information about the nodes that are created in this sample. You can see
206-
the code in [the samples section](https://github.com/dotnet/core-docs/tree/master/samples/csharp-language/expression-trees).
206+
the code in [the samples section](https://github.com/dotnet/core-docs/tree/master/samples/csharp/expression-trees).
207207
You can experiment for yourself: build it and run the samples.
208208

209209
## Examining the APIs

Diff for: docs/csharp/indexers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Let's walk through some of the common scenarios for using *indexers*.
7676
The code for all the samples is available at the core-docs [GitHub
7777
repository](https://github.com/dotnet/core-docs). Or, you can
7878
access the
79-
[sample folder](https://github.com/dotnet/core-docs/tree/master/samples/csharp-language/indexers)
79+
[sample folder](https://github.com/dotnet/core-docs/tree/master/samples/csharp/indexers)
8080
directly.
8181

8282
### Arrays and Vectors

Diff for: docs/csharp/tutorials/console-teleprompter.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ namespace TeleprompterConsole
8080
## Reading and Echoing the File
8181
The first feature to add is to read a text file, and display all that text
8282
to the console. First, lets add a text file. Copy the
83-
[sampleQuotes.txt](https://github.com/dotnet/core-docs/blob/master/samples/getting-started/csharp/console-teleprompter/sampleQuotes.txt)
84-
file from the GitHub repository for this [sample](https://github.com/dotnet/core-docs/tree/master/samples/getting-started/csharp/console-teleprompter) into your project directory.
83+
[sampleQuotes.txt](https://github.com/dotnet/core-docs/blob/master/samples/csharp/getting-started/console-teleprompter/sampleQuotes.txt)
84+
file from the GitHub repository for this [sample](https://github.com/dotnet/core-docs/tree/master/samples/csharp/csharp/console-tconsole-teleprompter) into your project directory.
8585
This will serve as the script for your
8686
application.
8787

Diff for: docs/csharp/tutorials/console-webapiclient.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ Console.WriteLine(repo.LastPush);
485485
```
486486

487487
Your version should now match the finished version located
488-
[here](https://github.com/dotnet/core-docs/tree/master/samples/getting-started/csharp/console-webapiclient).
488+
[here](https://github.com/dotnet/core-docs/tree/master/samples/csharp/getting-started/console-webapiclient).
489489

490490
## Conclusion
491491

Diff for: docs/csharp/tutorials/microservices.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Along the way, you'll also see some C# language features:
3232
* How to process incoming HTTP Requests and generate the HTTP Response
3333
* How to work with nullable value types
3434

35-
You can retrieve the code from our [GitHub repository.](https://github.com/dotnet/core-docs/tree/master/samples/getting-started/csharp/WeatherMicroservice)
35+
You can retrieve the code from our [GitHub repository.](https://github.com/dotnet/core-docs/tree/master/samples/csharp/getting-started/WeatherMicroservice)
3636

3737
### Why Docker?
3838

Diff for: docs/csharp/tutorials/working-with-linq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ You'll also compare the updated order to the original order.
3838

3939
This tutorial has multiple steps. After each step, you can run the
4040
application and see the progress. You can also see the completed
41-
sample in our [GitHub repository.](https://github.com/dotnet/core-docs/blob/master/samples/getting-started/csharp/console-linq)
41+
sample in our [GitHub repository.](https://github.com/dotnet/core-docs/blob/master/samples/csharp/getting-started/console-linq)
4242

4343

4444
## Prerequisites

0 commit comments

Comments
 (0)