Xamarin.GradleBindings icon indicating copy to clipboard operation
Xamarin.GradleBindings copied to clipboard

System.IO.FileNotFoundException with latest(At current moment) VS2017

Open WhitePhoera opened this issue 7 years ago • 27 comments

i am trying to add binding to com.arasthel:spannedgridlayoutmanager:2.0.2. and i then got:

System.IO.FileNotFoundException: Не удается найти указанный файл. (Исключение из HRESULT: 0x80070002) в EnvDTE80.Solution2.GetProjectTemplate(String TemplateName, String Language) в EgorBo.GradleBindings_VisualStudio.GradleBindings_VisualStudioPackage.CreateProjectAndAddReferenceToIt(VSProject sourceProject, Solution2 solution, String newProjectTemplate, String newProjectName, String newProjectDirectory) в EgorBo.GradleBindings_VisualStudio.GradleBindings_VisualStudioPackage.CreateBindingProject(VSProject sourceProject, Solution2 solution, String bindingProjectName, IEnumerable1 aarFiles, IEnumerable1 jarFiles, IEnumerable`1 referencedJarFiles, String infoFile) в EgorBo.GradleBindings_VisualStudio.GradleBindings_VisualStudioPackage.<GenerateAsync>d__5.MoveNext() --- Конец трассировка стека из предыдущего расположения, где возникло исключение --- в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) в System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) в GradleBindings.BindingProjectGenerator.<Generate>d__7.MoveNext()

looks like template path is outdated?

WhitePhoera avatar May 24 '18 21:05 WhitePhoera

same problem

AshtonYoon avatar May 30 '18 06:05 AshtonYoon

I face the same problem as well! VS 2017

Niach avatar May 30 '18 08:05 Niach

Same problem with VS 2017!

cschwengler avatar May 30 '18 08:05 cschwengler

Same problem here too. It would be great if this error on VS2017 is fixed!

ramvdixit avatar May 31 '18 16:05 ramvdixit

same problem

kenchan97 avatar Jun 04 '18 04:06 kenchan97

Please tell me if you saw it

AshtonYoon avatar Jun 13 '18 12:06 AshtonYoon

same problem

Destroy666 avatar Jun 14 '18 13:06 Destroy666

same problem System.IO.FileNotFoundException: 系统找不到指定的文件。 (异常来自 HRESULT:0x80070002) 在 EnvDTE80.Solution2.GetProjectTemplate(String TemplateName, String Language) 在 EgorBo.GradleBindings_VisualStudio.GradleBindings_VisualStudioPackage.CreateProjectAndAddReferenceToIt(VSProject sourceProject, Solution2 solution, String newProjectTemplate, String newProjectName, String newProjectDirectory) 在 EgorBo.GradleBindings_VisualStudio.GradleBindings_VisualStudioPackage.CreateBindingProject(VSProject sourceProject, Solution2 solution, String bindingProjectName, IEnumerable1 aarFiles, IEnumerable1 jarFiles, IEnumerable1 referencedJarFiles, String infoFile) 在 EgorBo.GradleBindings_VisualStudio.GradleBindings_VisualStudioPackage.<GenerateAsync>d__5.MoveNext() --- 引发异常的上一位置中堆栈跟踪的末尾 --- 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 在 System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) 在 GradleBindings.BindingProjectGenerator.<Generate>d__7.MoveNext()`

jaceDeng avatar Jun 22 '18 03:06 jaceDeng

Having this same problem too

contrix09 avatar Jun 24 '18 00:06 contrix09

same problem

ToluAgabi avatar Jul 02 '18 10:07 ToluAgabi

Same problem, someone solution? please :'(

Nalbornoz avatar Jul 04 '18 19:07 Nalbornoz

Same problem with VS 2017.

basiljohntme avatar Jul 10 '18 23:07 basiljohntme

Same here also vs 2017

waelbouchnak avatar Aug 10 '18 16:08 waelbouchnak

Same problem Is there any workaround for this problem?

arminrasoulian avatar Aug 28 '18 08:08 arminrasoulian

It seems the bindings library template is not called "BindingsLibrary.zip" anymore, it now is "XamarinAndroidBindings.zip". I changed this in the source code, only to have it crash on the next line where the new project is supposed to be created & added. This now fails … So, no workaround, but at least a first idea what might be wrong. My error now:

System.Exception: Das Element kann nicht hinzugefügt werden, da das Element, dem es hinzugefügt werden soll, kein Projektmappenordner und keine Projektmappe ist. bei Microsoft.VisualStudio.TemplateWizard.Wizard.AddToValidUIHierarchyItem(UIHierarchyItem item, String rootPath, Boolean isSilent, XmlNode projCollectionNode, Int32& numberOfSuccessfullyExecutedTemplates) bei Microsoft.VisualStudio.TemplateWizard.Wizard.Execute(Object application, Int32 hwndOwner, Object[]& ContextParams, Object[]& CustomParams, wizardResult& retval) bei EnvDTE80.Solution2.AddFromTemplate(String FileName, String Destination, String ProjectName, Boolean Exclusive) bei EgorBo.GradleBindings_VisualStudio.GradleBindings_VisualStudioPackage.CreateProjectAndAddReferenceToIt(VSProject sourceProject, Solution2 solution, String newProjectTemplate, String newProjectName, String newProjectDirectory) bei EgorBo.GradleBindings_VisualStudio.GradleBindings_VisualStudioPackage.CreateBindingProject(VSProject sourceProject, Solution2 solution, String bindingProjectName, IEnumerable1 aarFiles, IEnumerable1 jarFiles, IEnumerable1 referencedJarFiles, String infoFile) bei EgorBo.GradleBindings_VisualStudio.GradleBindings_VisualStudioPackage.<GenerateAsync>d__5.MoveNext() --- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde --- bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) bei System.Runtime.CompilerServices.TaskAwaiter.GetResult() bei GradleBindings.BindingProjectGenerator.<Generate>d__7.MoveNext()`

florisernst avatar Sep 02 '18 20:09 florisernst

As others, also facing this same problem with VS 15.8.5.

System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002) at EnvDTE80.Solution2.GetProjectTemplate(String TemplateName, String Language) at EgorBo.GradleBindings_VisualStudio.GradleBindings_VisualStudioPackage.CreateProjectAndAddReferenceToIt(VSProject sourceProject, Solution2 solution, String newProjectTemplate, String newProjectName, String newProjectDirectory) at EgorBo.GradleBindings_VisualStudio.GradleBindings_VisualStudioPackage.CreateBindingProject(VSProject sourceProject, Solution2 solution, String bindingProjectName, IEnumerable'1 aarFiles, IEnumerable'1 jarFiles, IEnumerable'1 referencedJarFiles, String infoFile) at EgorBo.GradleBindings_VisualStudio.GradleBindings_VisualStudioPackage.<GenerateAsync>d__5.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 System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at GradleBindings.BindingProjectGenerator.<Generate>d__7.MoveNext()

jamesmcroft avatar Sep 22 '18 10:09 jamesmcroft

The issue still exists. So I have uninstalled VS 2017 and installed VS 2017 version 15.0 then downloaded the SDK I required, later update the VS to the latest. Happy!!

basiljohntme avatar Oct 19 '18 02:10 basiljohntme

same problem

monksoul avatar Oct 24 '18 12:10 monksoul

Same problem with VS 2017.

pipihu avatar Oct 27 '18 18:10 pipihu

the same error

dannykhreet avatar Oct 30 '18 09:10 dannykhreet

As florisernst has mentioned problem was in incorrect name of templates. Now it should be "XamarinAndroidBindings.zip". After changing it I got new error "Cannot add the item because the item to add it to is not a solution folder or the solution." from solution.AddFromTemplate(csTemplatePath, bindingProjectDir, newProjectName); If I will add "bool Exclusive = true" 4-th param to previous method it will create separate project with bindings and crash a bit later cause now it's external project.

yurkinh avatar Nov 08 '18 09:11 yurkinh

)-:

ysmoradi avatar Jan 12 '19 14:01 ysmoradi

@yurkinh @florisernst Yes, Binding library is renamed to 'XamarinAndroidBindings.zip' I changed the code, to configure an existing Android binding project instead of creating a new one. I added a new Android Binding project manually, then I changed the extension code from

var newProject = CreateProjectAndAddReferenceToIt(sourceProject, solution, "BindingsProject.zip", bindingProjectName, "AndroidBindings");

To

var destProject = solution.Projects.OfType<Project>().First(p => string.Equals(p.Name, bindingProjectName /*The name of manually added project*/));

Now it configures Android Binding Project without any error. But the project itself is not compilable due C# errors of generated files )-:

ysmoradi avatar Jan 12 '19 16:01 ysmoradi

Same issue from a fresh install

Axemasta avatar Apr 02 '19 19:04 Axemasta

some too.

thiagoparabas avatar Apr 11 '19 12:04 thiagoparabas

I have the same issue too. Is there any updates on this one?

pvhd avatar May 15 '19 15:05 pvhd

Any update on this issue? @EgorBo are you still supporting the code?

NinoStella avatar Mar 30 '20 14:03 NinoStella