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

Doesn't work for brand new project #113

Closed
ffMathy opened this issue Jan 13, 2021 · 7 comments
Closed

Doesn't work for brand new project #113

ffMathy opened this issue Jan 13, 2021 · 7 comments
Labels

Comments

@ffMathy
Copy link
Contributor

ffMathy commented Jan 13, 2021

Repro steps:

  1. Make a C# Console application.
  2. Make a MsTest test project that references the application.
  3. Install AltCover on the test project.
  4. Run dotnet test with some more advanced arguments (haven't tested with just simple parameters).

Error:

C:\Users\mathi\.nuget\packages\altcover\7.4.807\build\netstandard2.0\AltCover.targets(133,5): error MSB4044: The "AltCover.ContingentCopy" task was not given a value for the required parameter "FileName". [C:\Users\mathi\source\repos\ConsoleApp14\UnitTestProject1\UnitTestProject1.csproj]
C:\Users\mathi\.nuget\packages\altcover\7.4.807\build\netstandard2.0\AltCover.targets(179,5): warning : A total of 0 visits recorded [C:\Users\mathi\source\repos\ConsoleApp14\UnitTestProject1\UnitTestProject1.csproj]

Attached is the project.

ConsoleApp14.zip

@SteveGilham
Copy link
Owner

Interesting. That would me a <None> entry with an empty file path. Doesn't repro for the case

 "C:\Program Files\dotnet\dotnet.EXE"  test /p:AltCover=true /p:AltCoverAssemblyFilter=xunit /p:AltCoverReportFormat=OpenCover /p:AltCoverShowStatic=- /p:AltCoverShowSummary=Green /p:AltCoverForce=true /p:AltCoverImportModule=true /p:AltCoverGetVersion=true --verbosity minimal "" --configuration Debug /nodeReuse:False /p:CheckEolTargetFramework=false

Easy enough to fix, though.

@ffMathy
Copy link
Contributor Author

ffMathy commented Jan 13, 2021

Did you try on the attached file that contains the source code? Note that it's an MsTest project too, not an XUnit project.

@SteveGilham
Copy link
Owner

Yes -- I expanded that .zip archive, removed all the dot-folders and the TestResults folder, and wired the solution + 2 projects into an existing operational test as-is, hence the futile exclusions -- not that those should matter, the point being "did it raise an MSBuild error or not".

@ffMathy
Copy link
Contributor Author

ffMathy commented Jan 13, 2021

Ah - gotcha. That makes sense 👍

@SteveGilham
Copy link
Owner

So, here's a build with a mitigation in -- allow the copy task argument to be unset, and handle that eventuality --
altcover.7.4.140-github-pre.nupkg.zip

@ffMathy
Copy link
Contributor Author

ffMathy commented Jan 13, 2021

That works! Thank you! 🙏

@SteveGilham
Copy link
Owner

Should be resolved in v7.4.808

@ffMathy ffMathy closed this as completed Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants