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

Temp path can not be found #1

Open
b-straub opened this issue Jun 10, 2020 · 12 comments
Open

Temp path can not be found #1

b-straub opened this issue Jun 10, 2020 · 12 comments

Comments

@b-straub
Copy link

After runnig the tool the following error will be displayed:

Could not find file TempPath-GUID-\coverage.cubertura.xml

The given location exist, but contains an empty folder name "coverageReport".

@b-straub
Copy link
Author

After digging a bit more, I found the issue related to the MSBuild integration.
Unfortunately my project only generates coverage with "coverlet.collector" but not with "coverlet.msbuild". With the MSBuild version I get 0% coverage always.

May be you can make your extension also working with the collector. The project I'm using can be found here ObservableTests.

@the-dext
Copy link
Owner

I’ll look into it as soon as I can. Once I figure out how to build a settings page for the extension I should be able to do some things to improve usability.
I use coverlet collector in all of my projects.

@robertlarkins
Copy link

I'm also having the same issue.

@danielpalme
Copy link

Same here.
Temp directory exists, but no file in directory is generated.

image

@the-dext
Copy link
Owner

Hi All,
I've been looking at this today and it's been a bit of a pain to figure out, but I've got something that is working for me.
Unfortunately I couldn't get the repo provided by @b-straub to compile for me even after installing the preview .net 5 SDKs so I've created my own test solutions, one with coverlet.collector only and one with coverlet.msbuild only.

Would a few of you be kind enough to try a version of the extension out for me and see if it fixes your problem ?

I've created a fix branch and uploaded a preview version of the vsix extension installer.
This adds a new option to visual studio that I need you to make sure is set right for your project where you can specify if you're using coverlet.msbuild or not (if not then it assumes you're using coverlet.collector).

Coverlet.collector doesn't offer the same functionality as Coverlet.msbuild does so the Exclude Assemblies File Pattern setting won't apply and I also couldn't use coverlet to merge the results file into one, which I need to be able to show code highlighting.

Thankfully @danielpalme supports this in Report Generator, so I've switched to using the merged results instead.
One thing I've noticed in my test solution is that any project which is not reference by any test project at all seems to be completely excluded from the report and cobertura file. I'm not sure why that is and it's possible that my test solution isn't realistic enough (for example that missing project isn't referenced by any other in the solution)

If someone could run the vsix from this branch and give me some feedback that'd be great.
https://github.com/the-dext/RunCoverletReport/blob/fix/coverlet-collector-without-msbuild/RunCoverletReport.vsix

@danielpalme
Copy link

I tried to install the VSIX. But the installation failed:

28.06.2020 19:00:54 - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
   bei VSIXInstaller.App.InitializeInstall(Boolean isRepairSupported)
   bei VSIXInstaller.App.InitializeInstall()
   bei System.Threading.Tasks.Task.InnerInvoke()
   bei System.Threading.Tasks.Task.Execute()

Same issue with current release in MarketPlace. Installation only works when triggered in VS.

@the-dext
Copy link
Owner

the-dext commented Jun 28, 2020 via email

@danielpalme
Copy link

Ok, got it working with a private feed (see https://devblogs.microsoft.com/visualstudio/create-a-private-gallery-for-self-hosted-visual-studio-extensions/).

But problem does still exist. No coverage file is available after test execution.
My dependencies:

  • Microsoft.NET.Test.Sdk 16.6.1
  • xunit 2.4.1
  • xunit.runner.visualstudio 2.4.2
  • coverlet.collector 1.3.0

@the-dext
Copy link
Owner

the-dext commented Jun 28, 2020 via email

@danielpalme
Copy link

Disabling MSBuild in the settings did the trick. Now it's working.
Is it possible to add some auto detection?
And maybe output a warning if neither collector or MSBuild package is referenced.

@the-dext
Copy link
Owner

the-dext commented Jun 28, 2020 via email

@Jsparham777
Copy link

I had the same error. The installation/fix was as follows:

  • Install the .vsix quote here: Temp path can not be found #1 (comment)
  • Install ReportGenerator as a global tool
  • Reference coverlet.collector NuGet package in my test project
  • Within Visual Studio, select Tools/Options... from the main menu
  • Select the 'Run Coverlet Report' tree node and set 'Use coverlet.MSBuild Intergration' to false
  • Run the analysis via Tools/Run Code Coverage

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

5 participants