Some unexpected warnings and errors started appearing in my Soap Service after I had updated from .Net Framework 4.0 to 4.5.2 on Windows 7.
The errors all disappeared after I removed an old framework 2 application pool from IIS. I also removed all old application pools so that I only had 1 application pool for my project.
After this I was unable to reproduce the error by adding back a framework 2 application pool.
The issues I experienced and subsequently resolved where
[Issue 1: Warning]
The following assembly has dependencies on a version of the .NET Framework that is higher than the target and might not load correctly during runtime causing a failure
The complete error was
Severity Code Description Project File Line Suppression State
Warning The following assembly has dependencies on a version of the .NET
Framework that is higher than the target and might not load correctly during
runtime causing a failure: SBD.Common, Version=2.0.0.1, Culture=neutral,
PublicKeyToken=a3471ea16b9add4c. The dependencies are: mscorlib,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089; System,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;
System.ServiceModel, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089; System.Data, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089; System.Xml,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;
System.Core, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089. You should either ensure that the dependent
assembly is correct for the target framework, or ensure that the target
framework you are addressing is that of the dependent assembly.
**
[Issue 2 Error]
CS1502 The best overloaded method match for ( mymethod ) has some invalid arguements
In the code
[SoapHeader("CoreHeader")]
public bool QueueDeleteDesigns(int itemId, int[] designIDs)
{
CheckCoreHeader();
string s = string.Join(",", designIDs);
// etc
Intellisense also showed
The type 'IQueryable' is defined in an assembly that is not referenced. You
must add a reference to assembly 'System.Core, Version =4.0.0.0
**
[Issue 3 Warning]
warning CS1684: Reference to type 'System.Tuple`2' claims it is defined in 'c:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll', but it could not be found