Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions source/nanoFramework.CoreLibrary/CoreLibrary.nfproj
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,9 @@
<NFMDP_PE_ExcludeClassByName Include="System.Reflection.AssemblyVersionAttribute">
<InProject>false</InProject>
</NFMDP_PE_ExcludeClassByName>
<NFMDP_PE_ExcludeClassByName Include="System.Reflection.AssemblyNativeVersionAttribute">
<InProject>false</InProject>
</NFMDP_PE_ExcludeClassByName>
<NFMDP_PE_ExcludeClassByName Include="System.Reflection.DefaultMemberAttribute">
<InProject>false</InProject>
</NFMDP_PE_ExcludeClassByName>
Expand Down
3 changes: 3 additions & 0 deletions source/nanoFramework.CoreLibrary/System/AssemblyInfo2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@

using System;
using System.Reflection;
using System.Runtime.CompilerServices;

[assembly: CLSCompliant(true)]
[assembly: AssemblyTitle("mscorlib")]
[assembly: AssemblyCompany("nanoFramework Contributors")]
[assembly: AssemblyProduct("nanoFramework mscorlib")]
[assembly: AssemblyCopyright("Copyright © nanoFramework Contributors 2017")]

[assembly: AssemblyNativeVersion("1.1.1.")]
Original file line number Diff line number Diff line change
Expand Up @@ -226,4 +226,37 @@ public String Version
get { return _version; }
}
}

/// <summary>
/// Defines the required native version required for an assembly.
/// At deploy time this is used to check if the target device has the correct native version to support this assembly.
/// </summary>
/// <remarks>
/// This attribute is specific of nanoFramework.
/// </remarks>
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class, Inherited = false)]
public sealed class AssemblyNativeVersionAttribute : Attribute
{
private readonly String _nativeVersion;

/// <summary>
/// Initializes a new instance of the AssemblyNativeVersionAttribute class.
/// </summary>
/// <param name="version">The native version required for the assembly.</param>
public AssemblyNativeVersionAttribute(String version)
{
_nativeVersion = version;
}

/// <summary>
/// Gets the native version required for the assembly.
/// </summary>
/// <value>
/// A string containing the native version.
/// </value>
public String NativeVersion
{
get { return _nativeVersion; }
}
}
}