Windows Form app being treated like a Silverlight app
DevInn
Posts: 7
I'm evaluating SmartAssembly 5.5 and trying to do a simple obfuscation. It appears that SA thinks my Windows Form application (.Net 4.0) is a Silverlight application. There are several options that are grayed out and say 'this option is not available for Silverlight applications.' and when I'm trying to build, it is failing saying 'The most likely cause is that SA has used a different version of the dependency...' Dependency found at: C:\Program Files (x86)\Microsoft Silverlight\4.0.50917.0\mscorlib.dll'. Not sure why SA thinks it should be looking in the Silverlight directory since it is a Windows Forms application...
Any help would be appreciated. Thanks!
Any help would be appreciated. Thanks!
Comments
case "2.0.5.0": Token targetFrameworkVersionAttribute = FindAttributeByFullName("[mscorlib]System.Runtime.Versioning.TargetFrameworkAttribute");
if (targetFrameworkVersionAttribute.IsEmpty)
{
clrVersion = CLRVersion.SilverlightV2or3;
}
else
{
clrVersion = CLRVersion.SilverlightV4;
}
Would you try opening your assembly up in .NET Reflector (you can download a free 14 day trial version from our website - www.red-gate.com) and check the mscorlib and TargetFramework attribute (use search to find the latter). If mscorlib reference is version 2.0.5.0 and the TargetFramework attribute doesn't exist, SA thinks it's silverlight. We are also aware that some assemblies can have two references to mscorlib as well which can cause problems. Make sure you are referencing Microsoft.CSharp.dll of version 4.0.0.0 and not 2.0.5.0 which would account for the mscorlib of Silverlight.