c# - You must add a ref to System.Runtime... when deployed to Azure Websites -


site runs fine locally, throws windows azure websites hosting environment.

cs0012: type 'system.object' defined in assembly not referenced. must add reference assembly 'system.runtime, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a'

so infamous message , has known fix;

<compilation ... >   <assemblies>     <add assembly="system.runtime, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a" />   </assemblies> </compilation> 

i understand asp.net pages/views compiled @ different time controllers , other logic, (that vnext going address this), , above adding reference page compilation side of things.

but question is: why work on development machine needs config on waws environment, you'd think setup?

i know what's different, what's missing on target environment such referencing portable library (portable, meaning should 'just work' in variety of environments) breaks stuff.

moreover, why when reference pcl, system.object isn't found in mscorlib. once upon time used understand this, , got confusing.

pcl references system.runtime.dll, not mscorlib.dll , when asp.net compiles view page, doesn't add reference system.runtime.dll. in case, c# compiler throws error. not sure why issue happens on waws environment.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -