You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 17, 2020. It is now read-only.
I'm facing below error when I run command "dotnet test.\SampleAPITest.csproj /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput="./TestResults/Coverage/" to run test cases.
D:\Projects\VSTS\SampleAPI\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props(31,5): error MSB4801: The task factory "CodeTaskFactory" is not supported on the .NET Core version of MSBuild. [D:\Projects\VSTS\SampleAPI\SampleAPI\SampleAPI.csproj]
D:\Projects\VSTS\SampleAPI\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props(31,5): error MSB4175: The task factory "CodeTaskFactory" could not be loaded from the assembly "C:\Program Files\dotnet\sdk\3.1.300\Microsoft.Build.Tasks.Core.dll". The task factory must return a value for the "TaskType" property. [D:\Projects\VSTS\SampleAPI\SampleAPI\SampleAPI.csproj]
Below are the project details:
Projects are based on .Net Framework 4.7.2
SampleAPI (WebAPI)
SampleAPI.Test (Test Project)
Project contains reference of "SampleAPI" - to write the test cases of Controller.
Other details:
To generate code coverage and reports, I've added reference of Coverlet in the test project.
Added MSBuild.Microsoft.VisualStudio.Web.targets in WebAPI project.
Already added "RoslynCodeTaskFactory" 2.0.7
Could you please guide me how to resolve the error?
Hi Guys,
I'm facing below error when I run command "dotnet test.\SampleAPITest.csproj /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput="./TestResults/Coverage/" to run test cases.
D:\Projects\VSTS\SampleAPI\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props(31,5): error MSB4801: The task factory "CodeTaskFactory" is not supported on the .NET Core version of MSBuild. [D:\Projects\VSTS\SampleAPI\SampleAPI\SampleAPI.csproj]
D:\Projects\VSTS\SampleAPI\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props(31,5): error MSB4175: The task factory "CodeTaskFactory" could not be loaded from the assembly "C:\Program Files\dotnet\sdk\3.1.300\Microsoft.Build.Tasks.Core.dll". The task factory must return a value for the "TaskType" property. [D:\Projects\VSTS\SampleAPI\SampleAPI\SampleAPI.csproj]
Below are the project details:
Projects are based on .Net Framework 4.7.2
Project contains reference of "SampleAPI" - to write the test cases of Controller.
Other details:
Could you please guide me how to resolve the error?
Thanks,
Niyati