"Create ViewComponent View" add file on wrong path (and project)

How I can configure path for new Views for ViewComponents?

I Want use path: "Views\Shared\Components\<component-name>\Default.cshtml"

but in my case views created in folder "Pages\Components\<component-name>\Default.cshtml"

and in some cases - in another project

1
4 comments

Regrettably, you encountered a known issue. We would appreciate it if you could demonstrate your interest by upvoting these tickets: [RSRP-465732]; [RSRP-475934]

Please let me know if you have any other questions or difficulties.

0

I'm coming across many .net core projects built in VS where ViewComponent Views are in places other than /Pages/Components/.  Perfectly reasonable places like /Views/Components.  Please could you either look across the whole project or allow us to specify either a general target for all VC's or a specific target per VC. I suspect the former would be better, tbh.

Thanks.

0

Hello Craig,

Thank you for your feedback. I have added it to the relevant issues on our tracker.

Regrettably, these issues have not been scheduled for any release yet. Please keep watching the issue on bug tracker, as it has the most recent state. Please accept our sincere apologies for the inconvenience.

Should you have any other questions or difficulties, please let me know.

0

For Sitefinity development the views location can be: 
{ProjectRoot}/Views/**,
{ProjectRoot}/ResourcePackages/{NameOfTheme}/Views/Shared, {ProjectRoot}/ResourcePackages/{NameOfTheme}/Views/Shared/Components/**,
etc.

Being able to add a path to search just as you can in your app would be nice.

0

Please sign in to leave a comment.