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

Getting System.IO.FileNotFoundException for .pdb #167

Open
64J0 opened this issue Aug 7, 2023 · 1 comment
Open

Getting System.IO.FileNotFoundException for .pdb #167

64J0 opened this issue Aug 7, 2023 · 1 comment

Comments

@64J0
Copy link

64J0 commented Aug 7, 2023

Description:

Hello, hope you're good. I'm opening this issue to ask for guidance on how to deal with this error:

# the command I used:
dotnet minicover instrument --workdir ./ --sources "source/**/*.fs" --exclude-sources "source/Tests/*.fs" --tests "source/Tests/*.fs"

#...
# logs checking assembly files, and assembly instrumented in the end
# ...
Unhandled exception. System.IO.FileNotFoundException: Could not find file '/tmp/minicover/fff1ada6-53fe-4c90-866c-b19e821421b3.pdb'.
File name: '/tmp/minicover/fff1ada6-53fe-4c90-866c-b19e821421b3.pdb'
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite)
   at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite)
   at System.IO.Abstractions.FileWrapper.Copy(String sourceFileName, String destFileName, Boolean overwrite)
   at MiniCover.Core.Instrumentation.Instrumenter.VisitAssemblyGroup(IInstrumentationContext context, InstrumentationResult result, IReadOnlyCollection`1 assemblyFiles) in /home/vsts/work/1/s/src/MiniCover.Core/Instrumentation/Instrumenter.cs:line 125
   at MiniCover.Core.Instrumentation.Instrumenter.Instrument(IInstrumentationContext context) in /home/vsts/work/1/s/src/MiniCover.Core/Instrumentation/Instrumenter.cs:line 58
   at MiniCover.Commands.InstrumentCommand.Execute() in /home/vsts/work/1/s/src/MiniCover/CommandLine/Commands/InstrumentCommand.cs:line 100
   at MiniCover.Program.<>c__DisplayClass0_2.<Main>b__3() in /home/vsts/work/1/s/src/MiniCover/Program.cs:line 51
   at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass79_0.<OnExecute>b__0()
   at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
   at MiniCover.Program.Main(String[] args) in /home/vsts/work/1/s/src/MiniCover/Program.cs:line 73

And when I check what is inside the /tmp/minicover/ folder, I get:

ls /tmp/minicover/

abe3cbba-b9af-4155-a154-3679166f6d9f.dll  
fff1ada6-53fe-4c90-866c-b19e821421b3.dll

So, no .pdb was generated.

Also, I'm using minicover version 3.6.1.

@64J0
Copy link
Author

64J0 commented Aug 8, 2023

It worked after removing the --exclude-sources "source/Tests/*.fs"

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

1 participant