mono / monodevelop

MonoDevelop is a cross platform .NET IDE
http://www.monodevelop.com
2.84k stars 1.02k forks source link

Unable to load project templates. Directory non vuota #8669

Open MiLattanzio opened 5 years ago

MiLattanzio commented 5 years ago

Unable to load project templates. Directory non vuota

I got this error message whenever I try to create a new solution. I don't see the templates.

decriptor commented 5 years ago

Directory non vuota is Directory not empty. I'm guessing you are trying to create something new in a directory that already exists and has stuff in it.

Not sure why only part of that string is translated? I'm assuming you are running this in Italian?

MiLattanzio commented 5 years ago

I am running in Italian.This will appear before I choose the destination of the project, right at the start of the procedure, after the click on "New solution".

Monodevelop can't find Net Core templates

mrward commented 5 years ago

Can you attach the full error from the IDE log? Help - Open Log Directory Thanks.

decriptor commented 5 years ago

I created on internal issue to track the possible missing translation https://devdiv.visualstudio.com/DevDiv/_workitems/edit/980606/

MiLattanzio commented 5 years ago

Can you attach the full error from the IDE log? Help - Open Log Directory Thanks.

That's what i've found

WARNING [2019-09-10 22:22:20Z]: Welcome Page news feed was not found.
INFO [2019-09-10 22:22:54Z]: Add-in loaded: MonoDevelop.ILAsmBinding
INFO [2019-09-10 22:22:54Z]: Add-in loaded: MonoDevelop.VBBinding
INFO [2019-09-10 22:22:54Z]: Add-in loaded: MonoDevelop.UnitTesting.NUnit
INFO [2019-09-10 22:22:54Z]: Unable to parse version from directory. '/usr/share/dotnet/sdk/NuGetFallbackFolder'
ERROR [2019-09-10 22:22:54Z]: Unable to load templates from provider: MonoDevelop.Ide.Templates.MicrosoftTemplateEngineProjectTemplatingProvider
System.IO.IOException: Directory non vuota
  at System.IO.FileSystem.RemoveDirectoryInternal (System.IO.DirectoryInfo directory, System.Boolean recursive, System.Boolean throwOnTopLevelDirectoryNotFound) [0x00114] in <7b90a8780ac4414295b539b19eea7eea>:0 
  at System.IO.FileSystem.RemoveDirectory (System.String fullPath, System.Boolean recursive) [0x0000c] in <7b90a8780ac4414295b539b19eea7eea>:0 
  at System.IO.Directory.Delete (System.String path, System.Boolean recursive) [0x00006] in <7b90a8780ac4414295b539b19eea7eea>:0 
  at Microsoft.TemplateEngine.Utils.PhysicalFileSystem.DirectoryDelete (System.String path, System.Boolean recursive) [0x00000] in <941bdffa5650416c96ea742e30feb715>:0 
  at Microsoft.TemplateEngine.Edge.Paths.DeleteDirectory (System.String path) [0x00028] in <07815336520e4c9ab949f916eb3ed982>:0 
  at MonoDevelop.Ide.Templates.MicrosoftTemplateEngine.UpdateCache () [0x0005d] in <0d5fa71f3b5e459095de129b1f163448>:0 
  at MonoDevelop.Ide.Templates.MicrosoftTemplateEngine.EnsureInitialized () [0x00046] in <0d5fa71f3b5e459095de129b1f163448>:0 
  at MonoDevelop.Ide.Templates.MicrosoftTemplateEngine.GetProjectTemplates () [0x00001] in <0d5fa71f3b5e459095de129b1f163448>:0 
  at MonoDevelop.Ide.Templates.MicrosoftTemplateEngineProjectTemplatingProvider.GetTemplates () [0x00001] in <0d5fa71f3b5e459095de129b1f163448>:0 
  at MonoDevelop.Ide.Templates.TemplatingService.GetProjectTemplateCategories (System.Predicate`1[T] match) [0x00029] in <0d5fa71f3b5e459095de129b1f163448>:0 
ERROR [2019-09-10 22:22:54Z]: Unable to load project templates.
Directory non vuota
MiLattanzio commented 5 years ago

i just delete the everything inside /.templateengine. it worked. Should i keep open as a bug or i need to close?

decriptor commented 5 years ago

@mrward @nosami

mrward commented 5 years ago

Might be a problem with the dotnet templating engine. MonoDevelop here is just using that library to clear the template engine cache.

https://github.com/mono/monodevelop/blob/1f192022eadadc5f21039759ec947b940fd6cc66/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/MicrosoftTemplateEngine.cs#L78