Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when creating a Partial View in Visual Studio 2012 Express with Razor

I am creating a view in Microsoft Visual Studio 2012 Express and I want it to be a strongly-typed partial view, but I am getting the following error:

C:\Program Files(x86)\Microsoft Visual Studio 11.0\Common7\IDE\VWDExpress\Item Templates\CSharp\Web\MVC 4\CodeTemplates\AddView\CSHTML\Empty.tt(-1,1) : error : There was a problem getting an AppDomain to run the transformation from the host. The process cannot continue.

I have not had any trouble creating views that are not partial views, strongly-typed or not.

like image 743
Becca Avatar asked Feb 01 '13 18:02

Becca


3 Answers

Is simple... Just restart Visual Studio.

http://blog.jongallant.com/2012/07/appdomain-process-cannot-continue.html#.UQwtQs6mg1I

like image 142
Pablo Claus Avatar answered Nov 09 '22 10:11

Pablo Claus


I was using Visual Studio 2013 Professional and had the same issue and none of the following worked for me-

  • Restarted VS- didn't helped
  • There was no <NetFx40_LegacySecurityPolicy enabled="true" /> in devenv.exe.config file
  • Reinstalled Nuget Package Manager from VS > Tools > Extensions and Updates
  • Reinstalled MVC4 from Microsoft

Then I repaired my VS installation from Control Panel > Add/Remove Programs and my issue was resolved. I don't know what went wrong but this certainly needs attention by Microsoft Guys. Hope my answer helps out somebody in need.

like image 33
Manik Arora Avatar answered Nov 09 '22 09:11

Manik Arora


I was using VS12 and Updated to VS13, i was unable to create views and was getting the above error, I just updated Nuget Package Manager by going in Tool --> Extension and Updates and everything worked fine for me.

like image 22
Aditya Pewekar Avatar answered Nov 09 '22 10:11

Aditya Pewekar