My ASP.NET MVC solution runs pretty well on VS2012. I installed VS2015 and my solution also works on it.... until I Clean
then Rebuild
the service inside it. Then if I run the solution, I got an error when trying to call the service (which is part of my solution)...
If I Clean
then Rebuild
the solution in VS2015 and run it again got the same error.
If I Clean
then Rebuild
the solution in VS2012, close it and open it again in VS2015 then it runs pretty well.
So it seems I need to Clean
and Rebuild
with VS2012 to be able to run it under VS2015. Very strange.
EDIT
The error is: System.ServiceModel.ProtocolException
because the service is not returning the structured data as expected but rather some html (1024 first octets)... corresponding to an error page as 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 there is no need to reference System.Web.WebPages.Razor
inside of services.