Reference to System.Windows.Browser in WP7.1 app

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, melvyn.harbour, dom.smith

Postby Brian Donahue » Thu Apr 26, 2012 11:43 am

Hi Kal,

Sorry, no I can't reproduce. And just to clarify, the references we are talking about are in the actual assembly after build, not the .csproj. This is why I suggested your compiler may be to blame. You have to open the assembly in something like .NET Reflector and check the references after build.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby kal_ahmed » Thu Apr 26, 2012 12:27 pm

Hi Brian

I checked with dotPeek and for the unobfuscated assembly it shows one reference to:

mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e

When I expand that reference, I get the mscorlib assembly with the WindowsPhone71 profile.

For the obfuscated assembly, it references the same mscorlib but also System.Windows.Browser (System.Windows.Browser, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)

Can you give me a pointer on what compiler settings might be causing this problem - I'm happy to try things out, but I am very confused as to why this is happening at all with an empty, unmodified project and I'm not sure where to start with poking around at compiler settings.

Cheers

Kal
kal_ahmed
 
Posts: 10
Joined: Thu Apr 19, 2012 11:33 am

Postby kal_ahmed » Thu Apr 26, 2012 12:30 pm

Further to my last message, this is the output from msbuild when compiling the assembly:

CoreCompile:
C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\Csc.exe /noconfig /nowarn:1701,
1702 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE;SILVERLIGHT;W
INDOWS_PHONE /reference:"C:\\Program Files (x86)\\Reference Assemblies\\Microsof
t\\Framework\\Silverlight\\v4.0\\Profile\\WindowsPhone71\\mscorlib.dll" /reference:
"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\Silverlight\ v4.0\\Profile\\WindowsPhone71\\mscorlib.extensions.dll" /reference:"C:\\Program F
iles (x86)\\Reference Assemblies\\Microsoft\\Framework\\Silverlight\\v4.0\\Profile\ WindowsPhone71\\System.Core.dll" /reference:"C:\\Program Files (x86)\\Reference
Assemblies\\Microsoft\\Framework\\Silverlight\\v4.0\\Profile\\WindowsPhone71\\system
.dll" /reference:"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Frame
work\\Silverlight\\v4.0\\Profile\\WindowsPhone71\\System.Net.dll" /reference:"C:\\P
rogram Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\Silverlight\\v4.0\ Profile\\WindowsPhone71\\System.Windows.dll" /reference:"C:\\Program Files (x86)
\\Reference Assemblies\\Microsoft\\Framework\\Silverlight\\v4.0\\Profile\\WindowsPho
ne71\\System.Xml.dll" /debug+ /debug:full /optimize- /out:obj\\Debug\\PhoneClass
Library1.dll /target:library Class1.cs Properties\\AssemblyInfo.cs "C:\\Users\\K
al\\AppData\\Local\\Temp\\Silverlight,Version=v4.0,Profile=WindowsPhone71.Assembl
yAttributes.cs"


All references are definitely only to the WindowsPhone71 profile of Silverlight.
kal_ahmed
 
Posts: 10
Joined: Thu Apr 19, 2012 11:33 am

Postby Brian Donahue » Thu Apr 26, 2012 12:48 pm

Yes, but can you please look at the references in the assembly after build???
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby Brian Donahue » Thu Apr 26, 2012 12:48 pm

Or can you send the assembly in?
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby kal_ahmed » Thu Apr 26, 2012 1:07 pm

Hi

Sorry - it got a bit out of order, but if you look at the post preceding that last one, I did use dotNetPeek on the assembly both before obfuscation with SA and after obfuscation and noted the differences.

What email address should I use for sending in the assembly ?

Cheers

Kal
kal_ahmed
 
Posts: 10
Joined: Thu Apr 19, 2012 11:33 am

Postby Brian Donahue » Thu Apr 26, 2012 2:33 pm

support@red-gate.com and please quote F0059434 in the subject line.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby Brian Donahue » Tue May 01, 2012 3:32 pm

If you protect a phone app with an evaluation version of SmartAssembly, it adds the reference to System.Windows.Browser. I did not have this problem because I had a valid serial number for it.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby kal_ahmed » Wed May 02, 2012 1:28 pm

Hi Brian,

Thanks for the response. If this issue can be fixed by using a licensed copy of SmartAssembly, then that is definitely good news. It is a shame that we can't test the use of the assembly ourselves with the evaluation version, but if we have an assurance from Redgate that we will be able to obfuscate our WP 7.1 assembly and let our customers use it in their projects without this Silverlight dependency, then I am happy to proceed and get the licenses we need.

Many thanks for your assistance!

Cheers

Kal
kal_ahmed
 
Posts: 10
Joined: Thu Apr 19, 2012 11:33 am

Previous

Return to SmartAssembly 6

Who is online

Users browsing this forum: onnb and 0 guests