I downloaded a library(SquishIt) I want to use in a Console Application. I am working in Visual Studio 2010 so the Target framework is set to ".Net Framework 4" in the properties of the application. This causes the following error in my code:
The type or namespace name 'SquishIt' could not be found (are you missing a using directive or an assembly reference?)
When I switch the Target framework to 3.5 the problem goes away.
Could anybody explain why this happens?
IIRC, while .NET 3.0/3.5 added a lot of new functionality, it did not introduce any changes to the CLR, meaning that it was backwardly compatible with assemblies targeting the 2.0 framework. .NET 4 introduces some CLR changes, so no backward compatibility.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.