You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PS C:\Users\<removed>\.nuget\packages\r4mvc.tools\1.0.0-ci-00377\tools> .\R4Mvc.Tools.exe generate -p "<path\to\removed>.csproj"
R4Mvc Generator Tool v1.0.0-ci-00377
Using: Visual Studio Enterprise 2019 - 16.6.30320.27
Project: <path\to\removed>.csproj
Creating Workspace ...
Loading project ...
Compiling project ...
Detected MVC version: 3.1.0.0
Processing controller ControllerName
Unhandled Exception: System.UnauthorizedAccessException: Access to the path '<path\to\ControllerName>.cs' is denied.
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, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at R4Mvc.Tools.Services.FilePersistService.WriteFile(SyntaxNode fileTree, String filePath)
at R4Mvc.Tools.Services.ControllerRewriterService.RewriteControllers(CSharpCompilation compiler)
at R4Mvc.Tools.Commands.GenerateCommand.Runner.<Run>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at R4Mvc.Tools.Program.<Main>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at R4Mvc.Tools.Program.<Main>(String[] args)
It seems like the tool is trying to write to my controller's .cs file to mark it as partial, which fails because said file is read-only (we are sadly using TFS for version control, it checks out all files as read-only). FilePersistService should probably be updated to handle this read-only case.
The text was updated successfully, but these errors were encountered:
It seems like the tool is trying to write to my controller's .cs file to mark it as
partial
, which fails because said file is read-only (we are sadly using TFS for version control, it checks out all files as read-only).FilePersistService
should probably be updated to handle this read-only case.The text was updated successfully, but these errors were encountered: