ligershark / template-builder

This project will output a NuGet package which can be used to help create Visual Studio Item Templates and Project templates
Other
42 stars 28 forks source link

'GetItemTemplateNameFromVSTemplatePath' task failed unexpectedly #64

Open gwin003 opened 9 years ago

gwin003 commented 9 years ago

I just randomly started seeing this error while compiling my Template project. I have checked all my filenames and files for odd characters and everything is fine there, yet this error persists.

Error   1   The "GetItemTemplateNameFromVSTemplatePath" task failed unexpectedly.
System.ArgumentException: Illegal characters in path.
   at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
   at System.Security.Permissions.FileIOPermission.CheckIllegalCharacters(String[] str)
   at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
   at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
   at System.IO.FileInfo.Init(String fileName, Boolean checkHost)
   at System.IO.FileInfo..ctor(String fileName)
   at LigerShark.TemplateBuilder.Tasks.GetItemTemplateNameFromVSTemplatePath.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() Templates

What can I do to further debug this? What else could be causing this?

EDIT: It seems to be failing on GetItemTemplateNameFromVSTemplatePath - Line 62, which is:

System.IO.FileInfo vsTemplateFileInfo = new System.IO.FileInfo(VstemplateFilePath);

How can I see the current contents of the VstemplateFilePath?

luismts commented 3 years ago

Any solution on this?

sayedihashimi commented 3 years ago

I believe you can get this error if there is no .vstemplate file discovered.