xwrs
xwrs

Reputation: 1297

Visual Studio template export for ASP.NET MVC

I have an issue with namespaces in views when I export my template. The cs files have a variable to replace namespace. But cshtml (strongly typed view) contains parent project namespace for model.

How to make visual studio export views with variables?

I have tried to change template cshtml files and replaced namespace for model this way

@model $safeprojectname$.Models.ContactUsModel

and it didn't helped.

Thanks

Upvotes: 2

Views: 580

Answers (1)

xwrs
xwrs

Reputation: 1297

I found a resolution for my issue. Hope it will help someone. I've replaced namespace in view with $safeprojectname$. Then I changed vstemplate file in line, related to changed cshtml to set parameter to true.

Upvotes: 2

Related Questions