We have a developed some PowerShell cmdlets in C# using Visual Studio 2008 / .NET framework 3.5 SP1. When we try to execute the cmdlet on a Windows XP or Windows 2003 server that has .NET framework 4.0 installed, we get the following error:
Could not load file or assembly 'System.Core, Version=18.104.22.168, Cul
ture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The
system cannot find the file specified.
Note that this machine does NOT have .NET framework 3.5 installed on it. .NET framework 4.0 is directly installed without installing 3.5. I do not see System.Core.dll in the GAC.
On the other hand, if we first install .NET 3.5 and then install .NET 4.0, we do see System.Core in GAC and there are no issues.
Is this expected behavior? Doesn't .NET framework 4.0 installer install all the binaries from 3.5 SP1 as well?
Thanks for your help,
View Complete Post