Closed alexeyzimarev closed 9 years ago
RefitStubs.cs is added as part of the NuGet package, did you remove it by-hand?
There are two possibilities. 1) Packages are not restored on a build server but loaded from VCS. 2) NCrunch build, no nuget restore but different output folder
Why was this closed?
@Cheesebaron Paul is right, when nuget restore is done, the file is created. It is a bit inconvenient since it does not work when packages are restored for a project, not for the whole solution, and this is a default for Visual Studio.
In version 2.2.1 the generator crashes with FileNotFoundException if target RefitStubs.cs (second parameter) does not exist.
Unhandled Exception: System.IO.FileNotFoundException: Could not find file 'C:\Te amCity\buildAgent\work\88ce84b2745369bc\TestProject\RefitStubs.cs'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, I nt32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions o ptions, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolea n useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detec tEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost) at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost) at System.IO.File.ReadAllText(String path, Encoding encoding) at Refit.Generator.Program.Main(String[] args)
When I create an empty RefitStubs.cs file, the build works. It worked fine in 2.1, started to fail after updating to 2.2.