XLL addins do not work in .NET 4 / VS 2010

Add-in Express™ Support Service
That's what is more important than anything else

XLL addins do not work in .NET 4 / VS 2010
 
Yuri Astrakhan




Posts: 53
Joined: 2006-05-19
It appears none of the XLL addins work when compiled with Visual Studio 2010, even the vanila sample generated by VS. All functions show up in the Excel's functions wizard, but always return #VALUE, without even entering the UDF.

I tried it on a Windows XP SP3 32 bit and Windows 7 (RC1) 64 bit.
Both machines had Visual Studio 2010 beta 1 and Excel 2007. Add-in Express™ 2009 for .NET v5.1.2022 (premium)


At one point I was able to catch this exception:

"Attempt to access method OurAddin.XLLModule+XLLContainer.OurMethod( <list of parameter types> ) in violation of security transparency rules failed." which seemed to be an instance of MethodAccessException


Repo steps:
* Create a new ADX XLL Add-in project
* (do not generate the setup project, leave all other settings on default)
* Uncomment the sample function AllSupportedExcelTypes()
* build and register adx project
* start Excel
* In any cell, enter =AllSupportedExcelTypes("aa")

Result: #VALUE error

Posted 25 Aug, 2009 11:56:42 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Hi Yuri.

Thanks for the bug report. Please try to set the 'Target Framework' option to .NET Framework 2.0 in the Properties dialog of the XLL project.
It should fix the issue for a while.
Posted 26 Aug, 2009 10:49:07 Top
Yuri Astrakhan




Posts: 53
Joined: 2006-05-19
Thanks Sergey, but unfortunately there is a 4.0-compiled library that this plugin is referencing. Is there a chance this issue might be resolved some time soon? Anything I can do to help?

Thanks!
Posted 26 Aug, 2009 12:30:14 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Yuri,

Is there a chance this issue might be resolved some time soon? Anything I can do to help?


Nope. We will do our best to make it work. Please understand that it can get some time to fix the issue. Thank you for your time and patience.
.NET, Extended MAPI, Windows Phone & RT
Posted 27 Aug, 2009 09:57:26 Top
Yuri Astrakhan




Posts: 53
Joined: 2006-05-19
Eugene, thanks for a quick reply.

The reason I was asking about the time is that I have a demo project that I need to show in 2 weeks. If you think you will fix this issue soon, I can simply wait. If not, I can try to back-port the needed code (a considerable effort), but I wouldn't want to do it if you think it's a quick fix.

In short - I am not pressuring you to fix it right away, just need an estimate to determine how to better organize my work.

Thanks much!
Posted 28 Aug, 2009 10:37:39 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Yuri,

We will do our best to prepare a new build for you in a week.
.NET, Extended MAPI, Windows Phone & RT
Posted 28 Aug, 2009 10:54:46 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Good news, Yuri!

The bug lies in the .Net Framework 4.0 Beta 1. We have just tested it against the Beta 2. The add-in works like a charm :D So, we don't need to fix anything in Add-in Express.
.NET, Extended MAPI, Windows Phone & RT
Posted 28 Aug, 2009 11:25:28 Top
Yuri Astrakhan




Posts: 53
Joined: 2006-05-19
Eugene, this is a good news, except WHERE did you find beta 2? I have looked around, and it doesn't seem to exist anywhere :( Does it work with the Visual Studio 2010?

Thanks!
Posted 28 Aug, 2009 14:06:48 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hello Yuri,

Eugene, this is a good news, except WHERE did you find beta 2? I have looked around, and it doesn't seem to exist anywhere


It was not opened for public access. You have to wait a little.

Does it work with the Visual Studio 2010?


Yes, it does.
.NET, Extended MAPI, Windows Phone & RT
Posted 31 Aug, 2009 02:02:05 Top