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

Installation not working with .net core 3+ #101

Closed bsweb closed 3 years ago

bsweb commented 3 years ago

Hi,

Unfortunately the instructions for .net core don't work with 3+. This is installed on a blank .net core MVC web project.

In the startup.cs you get the error 'RazorViewEngineOptions' does not contain a definition for 'FileProviders'

On changing it to MvcRazorRuntimeCompilationOptions for .net core 3+ it works but you then need Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation package

Then when you run it you get "The partial view 'FormFactory/Form.Property' was not found."

If you then install the FormTemplate package you get swamped with files in the root of the project (as per issue https://github.com/mcintyre321/FormFactory/issues/98) and the following error:

'DateAttribute' is a type, which is not valid in the given context C\packages\formfactory.templates\5.0.71\contentFiles\any\netstandard1.6\Cell.System.DateTime.cshtml

Cheers

mcintyre321 commented 3 years ago

Hi! I've updated the FormFactory.AspNetCore.Example project to aspnetcore 5, compare your Startup.cs with the one on there.

The templates project seems completely messed up, the file paths get lost somewhere along the way.

I'm thinking that it may be possible to ditch the MVC projects in the near future, and just use FormFactory.Standalone ...