We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

.NET 4.0 Compile Error in version 5.6.1.0

It looks like the latest version of the .NET 4.0 DLL includes a definition for the ExtensionAttribute System Class. System.Runtime.CompilerServices.ExtensionAttribute. This is causing a compile error. Is a definition for this class supposed to be included in a .NET 4.0 version of the Aspose.BarCode.dll?



On further research, it looks like this is a way to get extension methods to work in .NET 2.0 but isn’t needed for 4.0.

Hi


Thanks for your inquiry. I’m sorry to share with you that I’m unable to reproduce the problem. Could you please share a sample application which reproduces the issue on your side and attach it here? We will take a closer look and provide you with some further feedback.

Attached is a zipped solution that demonstrates the problem.

We use extension methods in our code, so I have included two in the project. If the body of the extension classes are commented out, the project compiles fine. If they not (so extension methods are compiled) then the project will not compile. If the reference to Aspose.BarCode.dll is removed, the project also compiles.

It looks like the inclusion of System.Runtime.CompilerServices.ExtensionAttribute in the Aspose.BarCode.dll compiled for .NET 4.0 is what is causing the problem. I don’t believe this is needed in 4.0.

Here is the output from the compiler:


1>------ Rebuild All started: Project: AsposeCompileError, Configuration: Debug Any CPU ------
1>CSC : warning CS1685: The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\Users\xxxx\Documents\Visual Studio 2012\Projects\Play\AsposeCompileError\AsposeLibs\bin\net4.0\Aspose.BarCode.dll'
1>CSC : error CS0656: Missing compiler required member 'System.Runtime.CompilerServices.ExtensionAttribute..ctor'
1>CSC : error CS0656: Missing compiler required member 'System.Runtime.CompilerServices.ExtensionAttribute..ctor'
1>CSC : error CS0656: Missing compiler required member 'System.Runtime.CompilerServices.ExtensionAttribute..ctor'
1>CSC : error CS0656: Missing compiler required member 'System.Runtime.CompilerServices.ExtensionAttribute..ctor'
1>CSC : error CS0656: Missing compiler required member 'System.Runtime.CompilerServices.ExtensionAttribute..ctor'
1>CSC : error CS0656: Missing compiler required member 'System.Runtime.CompilerServices.ExtensionAttribute..ctor'
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Build Summary
-------------
00:00.587 - Failed - Debug Any CPU - AsposeCompileError\AsposeCompileError.csproj

Total build time: 00:00.608

========== Rebuild All: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

Hi Patrick,


Thank you for sharing sample project. I managed to replicate the error message. This problem has been logged under ticket id BARCODENET-33607 in our issue tracking system. Your request has also been linked to this issue and you will be notified as soon as it is resolved and available for the public use. We’re sorry for your inconvenience.

Hi Patrick,

Thanks for your patience. We have a good news for you that the issue id
BARCODENET-33607 has now been resolved and its fix will be included in the next version of Aspose.BarCode for .NET (5.7.0). Which is expected after 3 or 4 weeks. We will inform you via this forum thread as soon as the new release is published.

The issues you have found earlier (filed as BARCODENET-33607) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.