Reputation: 53139
Because of compatibility reasons, I need to compile my project under .NET 3.5. However Microsoft Visual C# 2012 does not offer that option.
I'm getting this compiler error:
The type 'System.Action' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Core, Version=3.5.0.0
For this code:
powerTrader.PowerStartedCallback = delegate
{
EmergencyMode(false);
};
powerTrader.PowerStoppedCallback = delegate
{
EmergencyMode(true);
};
This is available selection in the IDE:
What should I do?
Upvotes: 0
Views: 1001
Reputation: 63183
Portable Class Libraries are .NET 4+ only. It does not support .NET 3.5.
You have to create a normal class library project instead.
Upvotes: 3