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

Debugging XUnit test cases fails critically #1620

Closed
fredrikhr opened this issue Feb 24, 2017 · 2 comments
Closed

Debugging XUnit test cases fails critically #1620

fredrikhr opened this issue Feb 24, 2017 · 2 comments

Comments

@fredrikhr
Copy link

Ref.: microsoft/VSProjectSystem#195
Originally issued in wrong repository

Here's my CSPROJ:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netcoreapp1.1</TargetFramework>
    <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
    <RuntimeFrameworkVersion>1.1.0</RuntimeFrameworkVersion>
  </PropertyGroup>
  <PropertyGroup Label="BasePath">
    <BaseOutputPath>$(SolutionDir)bin\</BaseOutputPath>
    <BaseIntermediateOutputPath>$(SolutionDir)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170222-09" />
    <PackageReference Include="xunit" Version="2.2.0" />
    <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
  </ItemGroup>
</Project>

Note the (as of writing this issue) the newest versions for the Test SDK and XUnit packages. I'm using the newest RC for Visual Studio 2017 (Version 15.0.0-RC4+26206.0)

Also note that I'm setting the BaseOutputPath and BaseIntermediateOutputPath to values different from their defaults.

Running test cases from the Test Explorer view in Visual Studio works fine. However, when I choose to debug one or more tests, Visual Studio goes over into debugging mode, and immediately displays a crtical error message window:

A fatal error has occurred and debugging needs to be terminated. For more details, please see the Microsoft Help and Support web site. HRESULT=0x8000ffff. ErrorCode=0x0.

@dmenoud
Copy link

dmenoud commented Feb 27, 2017

I have the same problem.
Running its ok, but debugging crash.

Microsoft Visual Studio Professional 2017 RC
Version 15.0.26206.0

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netcoreapp1.1</TargetFramework>
    <DebugType>portable</DebugType>
    <AssemblyName>BtimeServer.Engine.Tests</AssemblyName>
    <PackageId>BtimeServer.Engine.Tests</PackageId>
    <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
    <PackageTargetFallback>$(PackageTargetFallback);dotnet5.4;portable-net451+win8</PackageTargetFallback>
    <RuntimeFrameworkVersion>1.1.0</RuntimeFrameworkVersion>
  </PropertyGroup>

  <ItemGroup>
    <ProjectReference Include="..\..\src\BtimeServer.Common\BtimeServer.Common.csproj" />
    <ProjectReference Include="..\..\src\BtimeServer.Data\BtimeServer.Data.csproj" />
    <ProjectReference Include="..\..\src\BtimeServer.Engine\BtimeServer.Engine.csproj" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="1.1.0" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="1.1.0" />
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
    <PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
    <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
    <PackageReference Include="xunit" Version="2.2.0" />
    <PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
  </ItemGroup>

</Project>

image

@srivatsn
Copy link
Contributor

srivatsn commented Mar 1, 2017

This issue was moved to microsoft/vstest#558

@srivatsn srivatsn closed this as completed Mar 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants