File tree Expand file tree Collapse file tree 1 file changed +48
-1
lines changed Expand file tree Collapse file tree 1 file changed +48
-1
lines changed Original file line number Diff line number Diff line change @@ -9,4 +9,51 @@ If you wish to add a code sample:
99
1010 - We do not want Windows and Visual Studio to be a dependency for people building these on their own.
1111
12- We will eventually have a CI system in place to build these projects.
12+ We will eventually have a CI system in place to build these projects.
13+
14+ To create a sample:
15+
16+ 1 . File an [ issue] ( https://github.com/dotnet/core-docs/issues ) or add a comment to an existing one that your working on it
17+ 2 . For each set of samples that demonstrate a concept, add a project.json with your dependencies and target coreclr:
18+
19+ ```
20+ {
21+ "dependencies": {
22+ "System.Runtime":"4.0.0-rc1-*",
23+ "System.Linq":"4.0.0-rc1-*",
24+ "System.Console": "4.0.0-rc1-*"
25+ },
26+ "frameworks": {
27+ "dnxcore50":{}
28+ }
29+ }
30+ ```
31+
32+ 3 . Write your sample. ex. WhereClause-Sample1.cs
33+ 4 . Create a program.cs with a Main entry point that calls your samples. If there is already one there, add the call to your sample:
34+
35+ ```
36+ public class Program
37+ {
38+ public void Main(string[] args)
39+ {
40+ var sample = new WhereClause1();
41+ sample.QuerySyntaxExample();
42+ sample.MethodSyntaxExample();
43+ }
44+ }
45+ ```
46+ To to build and run your sample...
47+
48+ 5 . Grab the latest coreclr:
49+ ```
50+ dnvm upgrade latest -r coreclr -u
51+ ```
52+ 6 . Go to the sample forlder and Build to check for errors.
53+ ```
54+ dnu build
55+ ```
56+ 7 . Run!
57+ ```
58+ dnx run
59+ ```
You can’t perform that action at this time.
0 commit comments