EgorBo / Xamarin.GradleBindings

VS add-in. Creates Xamarin.Android Binding Projects using gradle
https://visualstudiogallery.msdn.microsoft.com/3a3257c7-473a-4790-9610-9a561eed0b8c
MIT License
146 stars 19 forks source link

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

Open WhitePhoera opened 6 years ago

WhitePhoera commented 6 years ago

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.d5.MoveNext() --- Конец трассировка стека из предыдущего расположения, где возникло исключение --- в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) в System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) в GradleBindings.BindingProjectGenerator.d7.MoveNext()

looks like template path is outdated?

AshtonYoon commented 6 years ago

same problem

Niach commented 6 years ago

I face the same problem as well! VS 2017

cschwengler commented 6 years ago

Same problem with VS 2017!

ramvdixit commented 6 years ago

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

kenchan97 commented 6 years ago

same problem

AshtonYoon commented 6 years ago

Please tell me if you saw it

Destroy666 commented 6 years ago

same problem

jaceDeng commented 6 years ago

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.d5.MoveNext() --- 引发异常的上一位置中堆栈跟踪的末尾 --- 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 在 System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) 在 GradleBindings.BindingProjectGenerator.d7.MoveNext()`

contrix09 commented 6 years ago

Having this same problem too

ToluAgabi commented 6 years ago

same problem

Nalbornoz commented 6 years ago

Same problem, someone solution? please :'(

basiljohntme commented 6 years ago

Same problem with VS 2017.

waelbouchnak commented 6 years ago

Same here also vs 2017

arminrasoulian commented 6 years ago

Same problem Is there any workaround for this problem?

florisernst commented 6 years ago

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.d5.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.d7.MoveNext()`

jamesmcroft commented 6 years ago

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()

basiljohntme commented 6 years ago

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!!

MonkSoul commented 6 years ago

same problem

pipihu commented 6 years ago

Same problem with VS 2017.

dannykhreet commented 6 years ago

the same error

yurkinh commented 6 years ago

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.

ysmoradi commented 5 years ago

)-:

ysmoradi commented 5 years ago

@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 )-:

Axemasta commented 5 years ago

Same issue from a fresh install

thiagoparabas commented 5 years ago

some too.

pvhd commented 5 years ago

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

NinoStella commented 4 years ago

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