Reputation: 45771
I am using VS2010 + C# + .Net 4.0 + IIS 7.5 + Windows 7. When I open a WCF svc file in IIS 7.0, there is some error like this, any ideas what is wrong?
System.BadImageFormatException: Could not load file or assembly 'foo.test' or one of its dependencies.
Upvotes: 0
Views: 763
Reputation: 1038780
Probably the application pool is configured to target CLR 2.0. You need to change it to target .NET 4.0:
Also make sure .NET 4.0 is registered by running:
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
Upvotes: 2