mcintyre321 / FormFactory

MVC5, Core or standalone - Generate rich HTML5 forms from your ViewModels, or build them programatically
http://formfactoryaspmvc.azurewebsites.net/
MIT License
304 stars 102 forks source link

Asp Net Core 3.0 AggregateException The partial view 'FormFactory/Form.Property' was not found. #89

Open AspDotNetCP opened 4 years ago

AspDotNetCP commented 4 years ago

Asp Net Core 3.0 AggregateException

@FF.PropertiesFor(Model).Render(Html)

14:23:14 [Error] () An unhandled exception has occurred while executing the request. System.AggregateException: One or more errors occurred. (The partial view 'FormFactory/Form.Property' was not found. The following locations were searched: /Views/Assignment/FormFactory/Form.Property.cshtml /Views/Shared/FormFactory/Form.Property.cshtml /Pages/Shared/FormFactory/Form.Property.cshtml /Views/Shared/FormFactory/Form.Property.cshtml) ---> System.InvalidOperationException: The partial view 'FormFactory/Form.Property' was not found. The following locations were searched: /Views/Assignment/FormFactory/Form.Property.cshtml /Views/Shared/FormFactory/Form.Property.cshtml /Pages/Shared/FormFactory/Form.Property.cshtml /Views/Shared/FormFactory/Form.Property.cshtml at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.RenderPartialCoreAsync(String partialViewName, Object model, ViewDataDictionary viewData, TextWriter writer) at Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.PartialAsync(String partialViewName, Object model, ViewDataDictionary viewData) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at FormFactory.RenderExtension.Render(IEnumerable1 properties, IHtmlHelper html) at AspNetCore.Views_Assignment_AddAssignments.<>c__DisplayClass26_0.<b__4>d.MoveNext() in C:\AddAssignments.cshtml:line 72 --- End of stack trace from previous location where exception was thrown ---

talk2urfi commented 4 years ago

Did you fix the issue, I am facing same problem.

AspDotNetCP commented 4 years ago

No , I end up with change my code back to form taghelper for some reason ^.^

mcintyre321 commented 4 years ago

It sounds like the embedded file system provider in a asp.net 3 doesn't work with FormFactory, which is compiled against 2.0

At some point, when I get the time, I'll upgrade it

On Mon, 30 Dec 2019, 16:59 AspDotNetCP, notifications@github.com wrote:

No , I end up with change my code back to form taghelper for some reason ^.^

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mcintyre321/FormFactory/issues/89?email_source=notifications&email_token=AACDJ6UMZQIVHG6CUZHTELDQ3ISHNA5CNFSM4JQMMUE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH2XHSA#issuecomment-569734088, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACDJ6S7IB2VMHS3EPAL3O3Q3ISHNANCNFSM4JQMMUEQ .

learner291 commented 4 years ago

I am having the same issue in asp.net mvc core 3.

So, I then tried to use FormFactory.Templates but now I get an error on build saying that 'DateAttribute' is a type which is not valid in the given context.

The error is appearing in the following file:

.nuget\packages\formfactory.templates\5.0.67\contentFiles\any\netstandard1.6\Cell.System.DateTime

FormFactoryDateAttribute Error

learner291 commented 4 years ago

It sounds like the embedded file system provider in a asp.net 3 doesn't work with FormFactory, which is compiled against 2.0 At some point, when I get the time, I'll upgrade it On Mon, 30 Dec 2019, 16:59 AspDotNetCP, @.***> wrote: No , I end up with change my code back to form taghelper for some reason ^.^ — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#89?email_source=notifications&email_token=AACDJ6UMZQIVHG6CUZHTELDQ3ISHNA5CNFSM4JQMMUE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH2XHSA#issuecomment-569734088>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACDJ6S7IB2VMHS3EPAL3O3Q3ISHNANCNFSM4JQMMUEQ .

Hi, Do you have a time frame in mind regarding updating this to core v3? Thanks

bestlane commented 4 years ago

It sounds like the embedded file system provider in a asp.net 3 doesn't work with FormFactory, which is compiled against 2.0 At some point, when I get the time, I'll upgrade it On Mon, 30 Dec 2019, 16:59 AspDotNetCP, @.***> wrote: No , I end up with change my code back to form taghelper for some reason ^.^ — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#89?email_source=notifications&email_token=AACDJ6UMZQIVHG6CUZHTELDQ3ISHNA5CNFSM4JQMMUE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH2XHSA#issuecomment-569734088>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACDJ6S7IB2VMHS3EPAL3O3Q3ISHNANCNFSM4JQMMUEQ .

Hi, Do you have a time frame in mind regarding updating this to core v3? Thanks

+1... I'm having troubles upgrading to v3.1 as well.

mcintyre321 commented 4 years ago

I'm afraid I have very little time at the moment. If someone could submit a Pull Request with necessary changes, I'd be happy to accept it *

Phexlyn42 commented 4 years ago

Hi, I managed to get it working on NET CORE 3.1 by doing the following:

services.AddRazorPages().AddRazorRuntimeCompilation(); var embeddedFileProvider = new EmbeddedFileProvider(typeof(FormFactory.FF).GetTypeInfo().Assembly,nameof(FormFactory)); services.Configure<MvcRazorRuntimeCompilationOptions>(options => { options.FileProviders.Add(embeddedFileProvider); });

nanchox commented 4 years ago

Hi, I managed to get it working on NET CORE 3.1 by doing the following:

* install nuget package Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation

* add the following to _ConfigureServices_ method inStartup.cs

services.AddRazorPages().AddRazorRuntimeCompilation(); var embeddedFileProvider = new EmbeddedFileProvider(typeof(FormFactory.FF).GetTypeInfo().Assembly,nameof(FormFactory)); services.Configure(options => { options.FileProviders.Add(embeddedFileProvider); });

Thanks Phexlyn42, this works fine for me!