I need to clean and rebuild my solution using VS2012 to run it on VS2015

My ASP.NET MVC solution works pretty well on VS2012. I installed VS2015, and my solution also works on it .... while I Clean , and then the Rebuild service inside it. Then, if I ran the solution, I had an error while trying to call the service (which is part of my solution) ...

If I Clean , then the Rebuild solution in VS2015 and running it again got the same error.

If I Clean , then the Rebuild solution in VS2012, close it and reopen in VS2015, then it works pretty well.

I think I need Clean and Rebuild with VS2012 in order to be able to run it under VS2015. Very strange.

EDIT


Error: System.ServiceModel.ProtocolException because the service does not return structured data as expected, but rather some html (1024 first octets) ... corresponding to the error page, as shown below:

 <head> <title>Could not load file or assembly 'System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.</title> <meta name="viewport" content="width=device-width" /> <style> body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: '. 

To be clear: the error described above is not the (real) cause of the problem, because we know that there is no need to reference System.Web.WebPages.Razor inside the services.

+5
source share

Source: https://habr.com/ru/post/1236350/


All Articles