Reputation: 245
I am using Visual Studio 15.3.5 and Microsoft.NET.Sdk.Functions 1.0.6.
I can run tests fine, but when I analyze the tests with Code Coverage the assembly which contains the Azure Functions is not analyzed. It is not listed in the Code Coverage assembly list. Other assemblies are listed, only the Azure Functions assembly is omitted.
Have anyone got it working?
Upvotes: 0
Views: 710
Reputation: 43183
The reason is that for new project types, the default <DebugType>
is portable, which means that the pdb's generated would not have required info needed for CodeCoverage.
Here is how you can change this: in your .csproj, add <DebugType>full</DebugType>
to the <PropertyGroup>
. e.g. you should have:
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<DebugType>full</DebugType>
</PropertyGroup>
Or you can change this from VS:
Upvotes: 3