-
Notifications
You must be signed in to change notification settings - Fork 870
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add 3 CoreCLR projects: one executable for the worker, one library to…
… write the first code, one test project. There arewith scripts to build on Windows - look at README.md
- Loading branch information
Stan Iliev
committed
Jan 29, 2016
1 parent
837e27e
commit eecce37
Showing
16 changed files
with
231 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,12 @@ | ||
# You've added your first ReadMe file! | ||
A README.md file is intended to quickly orient readers to what your project can do. New to Markdown? [Learn more](http://go.microsoft.com/fwlink/p/?LinkId=524306&clcid=0x409) | ||
|
||
## Edit this ReadMe and commit your change to a topic branch | ||
In Git, branches are cheap. You should use them whenever you're making changes to your repository. Edit this file by clicking on the edit icon. | ||
install .NET core by following instructions on https://dotnet.github.io/getting-started/ | ||
|
||
Then make some changes to this ReadMe file. | ||
|
||
> Make some **edits** to _this_ blockquote | ||
"build.cmd" will sync all packages and build everything but the tests | ||
|
||
When you are done, click the dropdown arrow next to the save button - that will allow you to commit your changes to a new branch. | ||
"run.cmd" will run the vstsworker | ||
|
||
## Create a pull request to contribute your changes back into master | ||
Pull requests are the way to move changes from a topic branch back into the master branch. | ||
"test.cmd" will sync test packages, build and run the xunit tests. Run "build" before "test". | ||
the failed tests are printed, the full results are in src\tests\bin\Debug\dnxcore50\win7-x64\testResults.xml | ||
|
||
Click on the **Pull Requests** page in the **CODE** hub, then click "New Pull Request" to create a new pull request from your topic branch to the master branch. | ||
|
||
When you are done adding details, click "Create Pull request". Once a pull request is sent, reviewers can see your changes, recommend modifications, or even push follow-up commits. | ||
|
||
First time creating a pull request? [Learn more](http://go.microsoft.com/fwlink/?LinkId=533211&clcid=0x409) | ||
|
||
### Congratulations! You've completed the grand tour of the CODE hub! | ||
|
||
# Next steps | ||
|
||
If you haven't done so yet: | ||
* [Install Visual Studio](http://go.microsoft.com/fwlink/?LinkId=309297&clcid=0x409&slcid=0x409) | ||
* [Install Git](http://git-scm.com/downloads) | ||
|
||
Then clone this repo to your local machine to get started with your own project. | ||
|
||
Happy coding! | ||
"clean.cmd" will delete all temporary files -> should be run before commiting code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@echo off | ||
dotnet restore src/corelib | ||
dotnet restore src/vstsworker | ||
dotnet build src/vstsworker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
@echo off | ||
pushd src\vstsworker | ||
rmdir bin /s /q | ||
rmdir obj /s /q | ||
del project.lock.json | ||
popd | ||
|
||
pushd src\tests | ||
rmdir bin /s /q | ||
rmdir obj /s /q | ||
del project.lock.json | ||
popd | ||
|
||
pushd src\corelib | ||
rmdir bin /s /q | ||
rmdir obj /s /q | ||
del project.lock.json | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@echo off | ||
pushd src\vstsworker | ||
dotnet run | ||
popd | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<!--To inherit the global NuGet package sources remove the <clear/> line below --> | ||
<clear /> | ||
<add key="dotnet-core" value="https://www.myget.org/F/dotnet-core/api/v3/index.json" /> | ||
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" /> | ||
</packageSources> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
|
||
namespace coreagent.play | ||
{ | ||
public class SomeClass | ||
{ | ||
static public void Print() | ||
{ | ||
Console.WriteLine("Print something"); | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"version": "1.0.0-*", | ||
"compilationOptions": { | ||
"emitEntryPoint": false, | ||
"define": [ "DOTNET5_4" ] | ||
}, | ||
|
||
"dependencies": { | ||
"NETStandard.Library": "1.0.0-rc3-23727" | ||
}, | ||
|
||
"frameworks": { | ||
"dotnet54": { } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<!--To inherit the global NuGet package sources remove the <clear/> line below --> | ||
<clear /> | ||
<add key="dotnet-core" value="https://www.myget.org/F/dotnet-core/api/v3/index.json" /> | ||
<add key="dotnet-buildtools" value="https://www.myget.org/F/dotnet-buildtools/api/v3/index.json" /> | ||
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" /> | ||
</packageSources> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using Xunit; | ||
|
||
namespace MyFirstDnxUnitTests | ||
{ | ||
public class Class1 | ||
{ | ||
[Fact] | ||
public void PassingTest() | ||
{ | ||
Assert.Equal(4, Add(2, 2)); | ||
} | ||
|
||
[Fact] | ||
public void FailingTest() | ||
{ | ||
Assert.Equal(5, Add(2, 2)); | ||
} | ||
|
||
int Add(int x, int y) | ||
{ | ||
return x + y; | ||
} | ||
|
||
public static void Main() | ||
{ | ||
Console.WriteLine("Dummy Entrypoint."); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"version": "1.0.0-*", | ||
"compilationOptions": { | ||
"emitEntryPoint": false, | ||
"define": [ "DOTNET5_4" ] | ||
}, | ||
|
||
"dependencies": { | ||
"corelib": { "target": "project" }, | ||
"NETStandard.Library": "1.0.0-rc3-23727", | ||
|
||
"xunit": "2.1.0", | ||
"xunit.console.netcore": "1.0.2-prerelease-00101", | ||
"xunit.netcore.extensions": "1.0.0-prerelease-00153", | ||
"xunit.runner.utility": "2.1.0" | ||
}, | ||
"frameworks": { | ||
"dnxcore50": { | ||
"imports": "portable-net451+win8" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
run tests with: | ||
corerun "xunit.console.netcore.exe" "tests.dll" -xml "testResults.xml" -notrait category=failing | ||
|
||
{ | ||
"version": "1.0.0-*", | ||
|
||
"compilationOptions": { | ||
"emitEntryPoint": true | ||
}, | ||
|
||
"commands": { | ||
"test": "xunit.runner.dnx" | ||
}, | ||
|
||
"testRunner": "xunit", | ||
|
||
"dependencies": { | ||
"NETStandard.Library": "1.0.0-rc3-23727", | ||
|
||
"xunit.runner.visualstudio": "2.1.0", | ||
"xunit.runner.dnx": "2.1.0-rc1-build204", | ||
"xunit.runners": "2.0.0", | ||
|
||
"xunit": "2.1.0", | ||
"xunit.console.netcore": "1.0.2-prerelease-00101", | ||
"xunit.netcore.extensions": "1.0.0-prerelease-*", | ||
"xunit.runner.utility": "2.1.0" | ||
}, | ||
"frameworks": { | ||
"dnxcore50": { | ||
"imports": "portable-net451+win8" | ||
} | ||
} | ||
} | ||
|
||
|
||
"xunit": "2.1.0", | ||
"xunit.console.netcore": "1.0.2-prerelease-00101", | ||
"xunit.netcore.extensions": "1.0.0-prerelease-00153", | ||
"xunit.runner.utility": "2.1.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<!--To inherit the global NuGet package sources remove the <clear/> line below --> | ||
<clear /> | ||
<add key="dotnet-core" value="https://www.myget.org/F/dotnet-core/api/v3/index.json" /> | ||
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" /> | ||
</packageSources> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
using System.Collections.Generic; | ||
using System.Threading; | ||
|
||
namespace Microsoft.TeamFoundation.DistributedTask.Worker | ||
{ | ||
class Program | ||
{ | ||
static void Main() | ||
{ | ||
coreagent.play.SomeClass.Print(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"version": "1.0.0-*", | ||
"compilationOptions": { | ||
"emitEntryPoint": true, | ||
"define": [ "DOTNET5_4" ] | ||
}, | ||
|
||
"commands": { | ||
"vstsworker": "vstsworker" | ||
}, | ||
|
||
"dependencies": { | ||
"corelib": { "target": "project" }, | ||
"NETStandard.Library": "1.0.0-rc3-23727" | ||
}, | ||
|
||
"frameworks": { | ||
"dnxcore50": { } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@echo off | ||
pushd src\tests | ||
dotnet restore | ||
dotnet build | ||
dotnet publish | ||
pushd bin\Debug\dnxcore50\win7-x64 | ||
corerun "xunit.console.netcore.exe" "tests.dll" -xml "testResults.xml" -notrait category=failing | ||
popd | ||
popd |