@@ -32,9 +32,10 @@ public void DotnetTool()
3232 using ClonedTemplateProject clonedTemplateProject = CloneTemplateProject ( ) ;
3333 UpdateNugetConfigWithLocalPackageFolder ( clonedTemplateProject . ProjectRootPath ! ) ;
3434 string coverletToolCommandPath = InstallTool ( clonedTemplateProject . ProjectRootPath ! ) ;
35+ string outputPath = $ "{ clonedTemplateProject . ProjectRootPath } { Path . DirectorySeparatorChar } coverage.json";
3536 DotnetCli ( $ "build -f { _buildTargetFramework } { clonedTemplateProject . ProjectRootPath } ", out string standardOutput , out string standardError ) ;
3637 string publishedTestFile = clonedTemplateProject . GetFiles ( "*" + ClonedTemplateProject . AssemblyName + ".dll" ) . Single ( f => ! f . Contains ( "obj" ) && ! f . Contains ( "ref" ) ) ;
37- RunCommand ( coverletToolCommandPath , $ "\" { publishedTestFile } \" --target \" dotnet\" --targetargs \" test { Path . Combine ( clonedTemplateProject . ProjectRootPath , ClonedTemplateProject . ProjectFileName ) } --no-build\" --include-test-assembly --output \" { clonedTemplateProject . ProjectRootPath } \" { Path . DirectorySeparatorChar } ", out standardOutput , out standardError ) ;
38+ RunCommand ( coverletToolCommandPath , $ "\" { publishedTestFile } \" --target \" dotnet\" --targetargs \" test { Path . Combine ( clonedTemplateProject . ProjectRootPath , ClonedTemplateProject . ProjectFileName ) } --no-build\" --include-test-assembly --output \" { outputPath } \" ", out standardOutput , out standardError ) ;
3839 if ( ! string . IsNullOrEmpty ( standardError ) )
3940 {
4041 _output . WriteLine ( standardError ) ;
@@ -49,9 +50,10 @@ public void StandAlone()
4950 using ClonedTemplateProject clonedTemplateProject = CloneTemplateProject ( ) ;
5051 UpdateNugetConfigWithLocalPackageFolder ( clonedTemplateProject . ProjectRootPath ! ) ;
5152 string coverletToolCommandPath = InstallTool ( clonedTemplateProject . ProjectRootPath ! ) ;
53+ string outputPath = $ "{ clonedTemplateProject . ProjectRootPath } { Path . DirectorySeparatorChar } coverage.json";
5254 DotnetCli ( $ "build -f { _buildTargetFramework } { clonedTemplateProject . ProjectRootPath } ", out string standardOutput , out string standardError ) ;
5355 string publishedTestFile = clonedTemplateProject . GetFiles ( "*" + ClonedTemplateProject . AssemblyName + ".dll" ) . Single ( f => ! f . Contains ( "obj" ) && ! f . Contains ( "ref" ) ) ;
54- RunCommand ( coverletToolCommandPath , $ "\" { Path . GetDirectoryName ( publishedTestFile ) } \" --target \" dotnet\" --targetargs \" { publishedTestFile } \" --output \" { clonedTemplateProject . ProjectRootPath } \" { Path . DirectorySeparatorChar } ", out standardOutput , out standardError ) ;
56+ RunCommand ( coverletToolCommandPath , $ "\" { Path . GetDirectoryName ( publishedTestFile ) } \" --target \" dotnet\" --targetargs \" { publishedTestFile } \" --output \" { outputPath } \" ", out standardOutput , out standardError ) ;
5557 if ( ! string . IsNullOrEmpty ( standardError ) )
5658 {
5759 _output . WriteLine ( standardError ) ;
0 commit comments