拒绝访问路径x

时间:2019-06-07 15:51:28

标签: uwp windows-template-studio

我想用 windows-template-studio 扩展现有的 aspNetBoilerplate 应用,当我添加模板项目时出现此错误:

执行“ Microsoft.Templates.Core.PostActions.Catalog.SortNamespaces.SortUsingsPostAction”时出错。相关模板:无。

System.UnauthorizedAccessException: Access to the path 'F:\tfs\Guichet\V3.1\src\Guichet.Application\GuichetAppServiceBase.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, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding)
   at System.IO.File.WriteAllLines(String path, IEnumerable`1 contents, Encoding encoding)
   at Microsoft.Templates.Core.PostActions.Catalog.SortNamespaces.SortNamespacesPostAction.ExecuteInternal()
   at Microsoft.Templates.Core.PostActions.PostAction.Execute()
   --- End of inner exception stack trace ---
   at Microsoft.Templates.Core.PostActions.PostAction.Execute()
   at Microsoft.Templates.Core.Gen.GenController.ExecuteGlobalPostActions()
   at Microsoft.Templates.Core.Gen.GenController.<GenerateItemsAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Templates.Core.Gen.NewProjectGenController.<UnsafeGenerateProjectAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Templates.UI.Services.GenerationService.<GenerateProjectAsync>d__5.MoveNext()

我将指定文件的控件更改为FullControl,但是错误没有消失!
仅使用Windows Template Studio会发生这种情况,空白的uwp没问题。 有什么想法吗?

0 个答案:

没有答案