On upgrading from 4.1 NETMF to 4.2 RC1 I get the following warning
The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\Program Files\Microsoft .NET Micro Framework\v4.2\Assemblies\le\mscorlib.dll' prj_NetduinoPlus
I have loaded the following references:
<ItemGroup>
<Reference Include="MFDpwsClient" />
<Reference Include="MFDpwsDevice" />
<Reference Include="MFDpwsExtensions" />
<Reference Include="Microsoft.SPOT.Hardware" />
<Reference Include="Microsoft.SPOT.Hardware.SerialPort" />
<Reference Include="Microsoft.SPOT.Hardware.Usb" />
<Reference Include="Microsoft.SPOT.IO" />
<Reference Include="Microsoft.SPOT.Native" />
<Reference Include="Microsoft.SPOT.Net" />
<Reference Include="Microsoft.SPOT.Time" />
<Reference Include="SecretLabs.NETMF.Diagnostics, Version=4.2.0.0, Culture=neutral, processorArchitecture=MSIL" />
<Reference Include="SecretLabs.NETMF.Hardware, Version=4.2.0.0, Culture=neutral, processorArchitecture=MSIL" />
<Reference Include="SecretLabs.NETMF.Hardware.Netduino, Version=4.2.0.0, Culture=neutral, processorArchitecture=MSIL" />
<Reference Include="SecretLabs.NETMF.Hardware.NetduinoPlus, Version=4.2.0.0, Culture=neutral, processorArchitecture=MSIL" />
<Reference Include="SecretLabs.NETMF.IO, Version=4.2.0.0, Culture=neutral, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Ftp" />
<Reference Include="System.Http" />
<Reference Include="System.IO" />
<Reference Include="System.Xml" />
</ItemGroup>
What is interesting is that I added 'mscorlib' in teh IDE (saved teh project etc) and opened the *.csproj file to get the above snapshot of references, but it shows no record with 'mscorlib'!, yet all others are present!
Is this expected?
4.2 RC1 predefined type ... is defined in multiple assemblies
Started by Earthed, Aug 30 2011 10:55 PM
2 replies to this topic
#1
Posted 30 August 2011 - 10:55 PM
#2
Posted 30 August 2011 - 11:02 PM
I found the problem after some web surfing:
I used a webserver example located at:
http://forums.netdui...ch__1#entry5789
and inside it, had the following code - which I have commented out. Warning disappears,
//namespace System.Runtime.CompilerServices
//{
// public class ExtensionAttribute : Attribute { }
//}
The above code is happy under 4.1 NETMF, but not under NETMF 4.2 RC1
#3
Posted 31 August 2011 - 01:24 AM
Earthed,
Good find! ExtensionAttribute has now been integrated with .NET MF 4.2 as you noted...which should make extending classes easy going forward.
Chris
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users