Skip to content

Commit

Permalink
Fixed coverage.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
BetimBeja committed May 8, 2021
1 parent 581f964 commit 85ee617
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<PackageReference Include="Microsoft.CrmSdk.CoreAssemblies" >
<Version>[5.0.17,6)</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\XrmEntitySerializer.5\XrmEntitySerializer.5.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<PackageReference Include="Microsoft.CrmSdk.CoreAssemblies">
<Version>[6,7)</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\XrmEntitySerializer.6\XrmEntitySerializer.6.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<PackageReference Include="Microsoft.CrmSdk.CoreAssemblies">
<Version>[7,8)</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\XrmEntitySerializer.7\XrmEntitySerializer.7.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<PackageReference Include="Microsoft.CrmSdk.CoreAssemblies">
<Version>[8,9)</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\XrmEntitySerializer.8\XrmEntitySerializer.8.csproj" />
</ItemGroup>
Expand Down
12 changes: 0 additions & 12 deletions XrmEntitySerializer.9.Tests/XrmEntitySerializer.9.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,12 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="6.0.1" />
<PackageReference Include="OpenCover" Version="4.7.922" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<PackageReference Include="Microsoft.CrmSdk.CoreAssemblies">
<Version>[9.0.0.5,9.0.2.5]</Version>
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="Microsoft.CrmSdk.CoreAssemblies">
<Version>[9.0.2.9,10)</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\XrmEntitySerializer.9\XrmEntitySerializer.9.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<PropertyGroup>
<DefineConstants>$(DefineConstants);NETCORE;</DefineConstants>
</PropertyGroup>
<ItemGroup>
Expand Down
6 changes: 0 additions & 6 deletions XrmEntitySerializer.Core/XrmEntitySerializer.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,9 @@
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Microsoft.PowerPlatform.Cds.Client">
<Version>[0.2.1-Alpha,1.0.0)</Version>
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Microsoft.PowerPlatform.Cds.Client">
<Version>[0.2.1-Alpha,1.0.0)</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<None Include="../Logo_80x80.png" Pack="true" PackagePath="\" />
Expand Down
14 changes: 11 additions & 3 deletions coverage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@ If(!(test-path $path -PathType Container ))
New-Item -ItemType Directory -Force -Path $path
}

$NuGets=(nuget locals global-packages -List).Substring(17)
IF(!(Test-Path .coverage\OpenCover* -PathType Container))
{
Install-Package -Name OpenCover -ProviderName NuGet -Scope CurrentUser -Destination $path -SkipDependencies -Force
}
IF(!(Test-Path .coverage\xunit.runner.console* -PathType Container))
{
Install-Package -Name xunit.runner.console -ProviderName NuGet -Scope CurrentUser -Destination $path -SkipDependencies -Force
}

$DotNet=(Get-Command dotnet).Source
$OpenCover=Get-ChildItem -Path $((Get-ChildItem -Path $($NuGets)OpenCover\* | Sort-Object -Descending | Select-Object -First 1).FullName)tools\OpenCover.Console.exe
$XUnitRunner=Get-ChildItem -Path $((Get-ChildItem -Path $($NuGets)xunit.runner.console\* | Sort-Object -Descending | Select-Object -First 1).FullName)tools\net46\xunit.console.exe
$OpenCover=Get-ChildItem -Path $((Get-ChildItem -Path .coverage\OpenCover* | Sort-Object -Descending | Select-Object -First 1).FullName)tools\OpenCover.Console.exe
$XUnitRunner=Get-ChildItem -Path $((Get-ChildItem -Path .coverage\xunit.runner.console* | Sort-Object -Descending | Select-Object -First 1).FullName)tools\net46\xunit.console.exe


If($OpenCover -eq ''){
Expand Down

0 comments on commit 85ee617

Please sign in to comment.