Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin should support C# and VB.NET pointing to the same coverage report #2162

Merged
merged 3 commits into from
Dec 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.3.2" />
<PackageReference Include="MSTest.TestFramework" Version="1.3.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\CSharpConsoleApp\CSharpConsoleApp.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace CSharpConsoleApp.Test
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
Assert.AreEqual(10, Program.Passthrough(10));
}
}
}
6 changes: 6 additions & 0 deletions its/projects/CSharpVBNetCoverage/CSharpConsoleApp/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{2EC3A59D-240B-498F-BF1F-EB2A84092718}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>CSharpConsoleApp</RootNamespace>
<AssemblyName>CSharpConsoleApp</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
20 changes: 20 additions & 0 deletions its/projects/CSharpVBNetCoverage/CSharpConsoleApp/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CSharpConsoleApp
{
public class Program
{
static void Main(string[] args)
{
}

public static int Passthrough(int value)
{
return value;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CSharpConsoleApp")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CSharpConsoleApp")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("2ec3a59d-240b-498f-bf1f-eb2a84092718")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
43 changes: 43 additions & 0 deletions its/projects/CSharpVBNetCoverage/CSharpVBNetCoverage.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.168
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpConsoleApp", "CSharpConsoleApp\CSharpConsoleApp.csproj", "{2EC3A59D-240B-498F-BF1F-EB2A84092718}"
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VBNetConsoleApp", "VBNetConsoleApp\VBNetConsoleApp.vbproj", "{4745F19D-A6DB-4FBB-8A15-DDCA487A035E}"
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VBNetConsoleApp.Test", "VBNetConsoleApp.Test\VBNetConsoleApp.Test.vbproj", "{D9740BBA-6DF2-47A7-9FDD-B30437E1B962}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpConsoleApp.Test", "CSharpConsoleApp.Test\CSharpConsoleApp.Test.csproj", "{659DE634-7E60-43FD-B11D-1AA54A7D4BF4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2EC3A59D-240B-498F-BF1F-EB2A84092718}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2EC3A59D-240B-498F-BF1F-EB2A84092718}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2EC3A59D-240B-498F-BF1F-EB2A84092718}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2EC3A59D-240B-498F-BF1F-EB2A84092718}.Release|Any CPU.Build.0 = Release|Any CPU
{4745F19D-A6DB-4FBB-8A15-DDCA487A035E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4745F19D-A6DB-4FBB-8A15-DDCA487A035E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4745F19D-A6DB-4FBB-8A15-DDCA487A035E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4745F19D-A6DB-4FBB-8A15-DDCA487A035E}.Release|Any CPU.Build.0 = Release|Any CPU
{D9740BBA-6DF2-47A7-9FDD-B30437E1B962}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D9740BBA-6DF2-47A7-9FDD-B30437E1B962}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D9740BBA-6DF2-47A7-9FDD-B30437E1B962}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D9740BBA-6DF2-47A7-9FDD-B30437E1B962}.Release|Any CPU.Build.0 = Release|Any CPU
{659DE634-7E60-43FD-B11D-1AA54A7D4BF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{659DE634-7E60-43FD-B11D-1AA54A7D4BF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{659DE634-7E60-43FD-B11D-1AA54A7D4BF4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{659DE634-7E60-43FD-B11D-1AA54A7D4BF4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B5B6F371-611D-42A3-BC09-C2FDF13BA053}
EndGlobalSection
EndGlobal
12 changes: 12 additions & 0 deletions its/projects/CSharpVBNetCoverage/VBNetConsoleApp.Test/UnitTest1.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Imports Microsoft.VisualStudio.TestTools.UnitTesting

Namespace VBNetConsoleApp.Test
<TestClass>
Public Class UnitTest1
<TestMethod>
Sub TestSub()
Assert.AreEqual(10, Module1.Passthrough(10))
End Sub
End Class
End Namespace

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<RootNamespace>VBNetConsoleApp.Test</RootNamespace>
<TargetFramework>netcoreapp2.1</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.3.2" />
<PackageReference Include="MSTest.TestFramework" Version="1.3.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\VBNetConsoleApp\VBNetConsoleApp.vbproj" />
</ItemGroup>

</Project>
6 changes: 6 additions & 0 deletions its/projects/CSharpVBNetCoverage/VBNetConsoleApp/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>
11 changes: 11 additions & 0 deletions its/projects/CSharpVBNetCoverage/VBNetConsoleApp/Module1.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Public Module Module1

Sub Main()

End Sub

Public Function Passthrough(ByVal Value As Integer) As Integer
Return Value
End Function

End Module

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MySubMain>false</MySubMain>
<SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>
<AuthenticationMode>0</AuthenticationMode>
<ApplicationType>2</ApplicationType>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices

' General Information about an assembly is controlled through the following
' set of attributes. Change these attribute values to modify the information
' associated with an assembly.

' Review the values of the assembly attributes

<Assembly: AssemblyTitle("VBNetConsoleApp")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("VBNetConsoleApp")>
<Assembly: AssemblyCopyright("Copyright © 2018")>
<Assembly: AssemblyTrademark("")>

<Assembly: ComVisible(False)>

'The following GUID is for the ID of the typelib if this project is exposed to COM
<Assembly: Guid("6772d7ad-82f7-445c-a989-6cc80ed07ab2")>

' Version information for an assembly consists of the following four values:
'
' Major Version
' Minor Version
' Build Number
' Revision
'
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading