Open
Description
Many times when I try to build a project using SwaggerProvider, the build fails for a temporary dll being unable to access.
If I retry the second time, it works fine. Can this be because, for example, the design-time and the compile-time try to access the same dll at the same time?
- Could we use another dll instead?
- Or maybe open the file with different read/write rights? (Overwrite.)
- Or maybe use some synchronization concepts like MailBoxProcessor, or a simple one-time-retry of "wait 3 sec and retry"?
Or could these possibly cause the built dll be corrupted somehow?
This is a stack trace:
error FS3033: The type provider 'SwaggerProvider.SwaggerTypeProvider' reported an error: Could not open file for writing (binary mode): C:\Users\(user)\AppData\Local\Temp\tmp837A.dll
System.IO.IOException: The process cannot access the file 'C:\Users\(user)\AppData\Local\Temp\tmp837A.dll' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at ProviderImplementation.ProvidedTypes.BinaryWriter.writeBinaryAndReportMappings[a,b,c,d,e](String outfile, ILGlobals ilg, FSharpOption`1 pdbfile, a portablePDB, Boolean embeddedPDB, b embedAllSource, c embedSourceList, d sourceLink, Boolean emitTailcalls, Boolean deterministic, Boolean showTimes, e dumpDebugInfo, ILModuleDef modul)
Metadata
Metadata
Assignees
Labels
No labels