When I try to add a View/Controller/Model from default templates in mvc 3 application in visual studio, it gives an error message:
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CSharp\Web\MVC 3\CodeTemplates\AddView\CSHTML\Empty.tt(-1,-1) : There was a problem getting an AppDomain to run the transformation from the host. The process cannot continue."
I tried uninstalling and installing the VS2010 again but that didn't fix it either.
Where I will find T4 assemblies? Are you referencing to Microsoft.VisualStudio.TextTemplating.dll, I can't find it either anywhere in my system. Is there any resource to download it from?
I have some related assemblies e.g. Microsoft.VisualStudio.TextTemplating.Modeling.10.0.dll, EnvDTE.dll at this location C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies.
shamaatique
0 Points
6 Posts
MVC Add View/Model/Controller from template throws an error
Jul 02, 2012 05:39 PM|LINK
Hi,
When I try to add a View/Controller/Model from default templates in mvc 3 application in visual studio, it gives an error message:
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CSharp\Web\MVC 3\CodeTemplates\AddView\CSHTML\Empty.tt(-1,-1) : There was a problem getting an AppDomain to run the transformation from the host. The process cannot continue."
I tried uninstalling and installing the VS2010 again but that didn't fix it either.
Any help would be much appreciated.
Thanks,
Shama
CPrakash82
All-Star
18290 Points
2844 Posts
Re: MVC Add View/Model/Controller from template throws an error
Jul 02, 2012 11:09 PM|LINK
Modify the devenv.exe.config file and remove the below line, lets see if it works for you.
<NetFx40_LegacySecurityPolicy enabled="true" />
This could be also a cause of your other problem you had with Unit Testing.
Thanks,
shamaatique
0 Points
6 Posts
Re: MVC Add View/Model/Controller from template throws an error
Jul 03, 2012 02:48 PM|LINK
I verified this line does not exist in devenv.exe.config, so still having the same problem.
Thanks,
santhoshgmd
Member
28 Points
11 Posts
Re: MVC Add View/Model/Controller from template throws an error
Jul 03, 2012 03:09 PM|LINK
Try to Install visual studio 2010 service pack1.......
http://www.microsoft.com/en-in/download/details.aspx?id=23691
Young Yang -...
All-Star
21343 Points
1818 Posts
Microsoft
Re: MVC Add View/Model/Controller from template throws an error
Jul 09, 2012 12:20 PM|LINK
Hi
Please add the T4 template assemblies in the GAC.
Hope this helpful
Regards
Feedback to us
Develop and promote your apps in Windows Store
shamaatique
0 Points
6 Posts
Re: MVC Add View/Model/Controller from template throws an error
Jul 09, 2012 07:50 PM|LINK
Hi,
Where I will find T4 assemblies? Are you referencing to Microsoft.VisualStudio.TextTemplating.dll, I can't find it either anywhere in my system. Is there any resource to download it from?
I have some related assemblies e.g. Microsoft.VisualStudio.TextTemplating.Modeling.10.0.dll, EnvDTE.dll at this location C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies.
Do I need to change the location?
Thanks,
shamaatique
0 Points
6 Posts
Re: MVC Add View/Model/Controller from template throws an error
Nov 30, 2012 05:13 PM|LINK
I solved it.
1) Installed ASP .Net MVC4
2) Uninstalled Nuget Manager in the extension manager and installed its upgrade.
Now I can add Controllers and Views from template.
Thanks,
E.r.i.c.
Member
2 Points
1 Post
Re: MVC Add View/Model/Controller from template throws an error
Mar 24, 2013 05:52 PM|LINK
Just uninstalling/re-installing Nuget worked for me. Thank you very much for your help.