Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

4.2 RC1 predefined type ... is defined in multiple assemblies


  • Please log in to reply
2 replies to this topic

#1 Earthed

Earthed

    Member

  • Members
  • PipPip
  • 20 posts
  • LocationAustralia

Posted 30 August 2011 - 10:55 PM

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?

#2 Earthed

Earthed

    Member

  • Members
  • PipPip
  • 20 posts
  • LocationAustralia

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 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

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

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.