diff --git a/NuGet/GitLink.exe b/NuGet/GitLink.exe
deleted file mode 100644
index 5570d50..0000000
Binary files a/NuGet/GitLink.exe and /dev/null differ
diff --git a/NuGet/NuGet.exe b/NuGet/NuGet.exe
deleted file mode 100644
index 3ffdd33..0000000
Binary files a/NuGet/NuGet.exe and /dev/null differ
diff --git a/NuGet/Stylet.Start.nuspec b/NuGet/Stylet.Start.nuspec
index 56e359f..79771df 100644
--- a/NuGet/Stylet.Start.nuspec
+++ b/NuGet/Stylet.Start.nuspec
@@ -6,7 +6,7 @@
Stylet.Start
Antony Male
Antony Male
- http://github.com/canton7/Stylet/blob/master/LICENSE.txt
+ MIT
http://github.com/canton7/Stylet
https://raw.githubusercontent.com/canton7/Stylet/master/StyletIcon.png
false
diff --git a/NuGet/Stylet.nuspec b/NuGet/Stylet.nuspec
index 4d4ad46..88074f1 100644
--- a/NuGet/Stylet.nuspec
+++ b/NuGet/Stylet.nuspec
@@ -6,7 +6,7 @@
Stylet
Antony Male
Antony Male
- http://github.com/canton7/Stylet/blob/master/LICENSE.txt
+ MIT
http://github.com/canton7/Stylet
https://raw.githubusercontent.com/canton7/Stylet/master/StyletIcon.png
false
@@ -16,10 +16,10 @@
-
-
-
-
+
+
+
+
diff --git a/Rakefile b/Rakefile
index 6e75173..543a410 100644
--- a/Rakefile
+++ b/Rakefile
@@ -10,100 +10,24 @@ NUSPEC_START = 'NuGet/Stylet.start.nuspec'
ASSEMBLY_INFO = 'Stylet/Properties/AssemblyInfo.cs'
CSPROJ = 'Stylet/Stylet.csproj'
-MSBUILD = %q{C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe}
+UNIT_TESTS = 'StyletUnitTests/StyletUnitTests.csproj'
directory COVERAGE_DIR
-desc "Build the project for release"
+desc "Build the project using the current CONFIG (or Debug)"
task :build do
- sh MSBUILD, CSPROJ, "/t:Clean;Rebuild", "/p:Configuration=Release", "/verbosity:normal"
-end
-
-task :test_environment => [:build] do
- NUNIT_TOOLS = 'packages/NUnit.Runners.*/tools'
- NUNIT_CONSOLE = Dir[File.join(NUNIT_TOOLS, 'nunit-console.exe')].first
- NUNIT_EXE = Dir[File.join(NUNIT_TOOLS, 'nunit.exe')].first
-
- OPENCOVER_CONSOLE = Dir['packages/OpenCover.*/tools/OpenCover.Console.exe'].first
- REPORT_GENERATOR = Dir['packages/ReportGenerator.*/tools/ReportGenerator.exe'].first
-
- UNIT_TESTS_DLL = "StyletUnitTests/bin/#{CONFIG}/StyletUnitTests.dll"
- INTEGRATION_TESTS_EXE = "StyletIntegrationTests/bin/#{CONFIG}/StyletIntegrationTests.exe"
-
- raise "NUnit.Runners not found. Restore NuGet packages" unless NUNIT_CONSOLE && NUNIT_EXE
- raise "OpenCover not found. Restore NuGet packages" unless OPENCOVER_CONSOLE
- raise "ReportGenerator not found. Restore NuGet packages" unless REPORT_GENERATOR
-end
-
-task :nunit_test_runner => [:test_environment] do
- sh NUNIT_CONSOLE, UNIT_TESTS_DLL
+ sh 'dotnet', 'build', '-c', CONFIG, CSPROJ
end
desc "Run unit tests using the current CONFIG (or Debug)"
-task :test => [:nunit_test_runner] do |t|
- rm 'TestResult.xml', :force => true
-end
-
-desc "Launch the NUnit gui pointing at the correct DLL for CONFIG (or Debug)"
-task :nunit => [:test_environment] do |t|
- sh NUNIT_EXE, UNIT_TESTS_DLL
-end
-
-
-namespace :cover do
-
- desc "Generate unit test code coverage reports for CONFIG (or Debug)"
- task :unit => [:test_environment, COVERAGE_DIR] do |t|
- coverage(instrument(:nunit, UNIT_TESTS_DLL))
- end
-
- desc "Create integration test code coverage reports for CONFIG (or Debug)"
- task :integration => [:test_environment, COVERAGE_DIR] do |t|
- coverage(instrument(:exe, INTEGRATION_TESTS_EXE))
- end
-
- desc "Create test code coverage for everything for CONFIG (or Debug)"
- task :all => [:test_environment, COVERAGE_DIR] do |t|
- coverage([instrument(:nunit, UNIT_TESTS_DLL), instrument(:exe, INTEGRATION_TESTS_EXE)])
- end
-
-end
-
-def instrument(runner, target)
- case runner
- when :nunit
- opttarget = NUNIT_CONSOLE
- opttargetargs = target
- when :exe
- opttarget = target
- opttargetargs = ''
- else
- raise "Unknown runner #{runner}"
- end
-
- coverage_file = File.join(COVERAGE_DIR, File.basename(target).ext('xml'))
- sh OPENCOVER_CONSOLE, '-register:user', "-target:#{opttarget}", "-filter:+[Stylet]* -[Stylet]XamlGeneratedNamespace.*", "-targetargs:#{opttargetargs} /noshadow", "-output:#{coverage_file}"
-
- rm('TestResult.xml', :force => true) if runner == :nunit
-
- coverage_file
-end
-
-def coverage(coverage_files)
- coverage_files = [*coverage_files]
- sh REPORT_GENERATOR, "-reports:#{coverage_files.join(';')}", "-targetdir:#{COVERAGE_DIR}"
+task :test do
+ sh 'dotnet', 'test', '-c', CONFIG, UNIT_TESTS
end
desc "Create NuGet package"
task :package do
- local_hash = `git rev-parse HEAD`.chomp
- sh "NuGet/GitLink.exe . -s #{local_hash} -u #{GITLINK_REMOTE} -f Stylet.sln -ignore StyletUnitTests,StyletIntegrationTests"
- Dir.chdir(File.dirname(NUSPEC)) do
- sh "nuget.exe pack #{File.basename(NUSPEC)}"
- end
- Dir.chdir(File.dirname(NUSPEC_START)) do
- sh "nuget.exe pack #{File.basename(NUSPEC_START)}"
- end
+ sh 'dotnet', 'pack', '-c', CONFIG, CSPROJ, "-p:NuSpecFile=../#{NUSPEC}"
+ sh 'dotnet', 'pack', '-c', CONFIG, CSPROJ, "-p:NuSpecFile=../#{NUSPEC_START}"
end
desc "Bump version number"
diff --git a/Stylet/Stylet.csproj b/Stylet/Stylet.csproj
index 3b2dc81..3ca981f 100644
--- a/Stylet/Stylet.csproj
+++ b/Stylet/Stylet.csproj
@@ -10,6 +10,7 @@
Stylet
false
+ bin\Stylet.xml