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
Microsoft.CodeAnalysis.Metrics tool will duplicate analysis of same csproj file if csproj has TargetFrameworks with more than one target framework. Resulting CodeMetricsReport xml file will contain duplicated entry of same csproj.
Steps To Reproduce
Open any recent Visual Studio, create solution and add new csproj with Microsoft.NET.Sdk style
Set replace it target framework with multi-target frameworks, i.e.: <TargetFrameworks>net48;net8.0</TargetFrameworks>
Use metrics.exe from Metrics folder of microsoft.codeanalysis.metrics package to produce CodeMetricsReport xml file. Example command: Metrics.exe /solution:"D:\Projects\msix\Calc\Calc.sln" /out:"D:\Projects\metrics\Metrics\out.xml"
Expected behavior
Resulting CodeMetricsReport xml file should not contain any duplicated target csproj entries or target csproj entries should somehow be distinguished based on target framework.
Actual behavior
Resulting CodeMetricsReport xml file contains duplicated Target csproj entries with exact same analysis values.
Additional context
Issue is not reproducible if problematic csproj is given as input to Metrics.exe using /solution argument.
The text was updated successfully, but these errors were encountered:
NuGet Package: microsoft.codeanalysis.metrics
Version: 4.0.0-beta1.24415.1
Description
Microsoft.CodeAnalysis.Metrics tool will duplicate analysis of same csproj file if csproj has TargetFrameworks with more than one target framework. Resulting CodeMetricsReport xml file will contain duplicated entry of same csproj.
Steps To Reproduce
<TargetFrameworks>net48;net8.0</TargetFrameworks>
Metrics.exe /solution:"D:\Projects\msix\Calc\Calc.sln" /out:"D:\Projects\metrics\Metrics\out.xml"
Expected behavior
Resulting CodeMetricsReport xml file should not contain any duplicated target csproj entries or target csproj entries should somehow be distinguished based on target framework.
Actual behavior
Resulting CodeMetricsReport xml file contains duplicated Target csproj entries with exact same analysis values.
Additional context
Issue is not reproducible if problematic csproj is given as input to Metrics.exe using
/solution
argument.The text was updated successfully, but these errors were encountered: