0

I am working on winrt app that have some financial calculation involved. I searched on net and find Financial.dll which have all financial functions as in excel. I used it in my app and get desired result. But when I test my app on APP CERT KIT it failed because of it.

Error Found: The supported APIs test detected the following errors: o API System.Net.DownloadStringCompletedEventHandler in SYSTEM, PUBLICKEYTOKEN=B77A5C561934E089 is not supported for this application type. Financial.dll calls this API. o API System.Net.DownloadStringCompletedEventArgs in SYSTEM, PUBLICKEYTOKEN=B77A5C561934E089 is not supported for this application type. Financial.dll calls this API. o API System.Runtime.Serialization.SerializationInfo in MSCORLIB, PUBLICKEYTOKEN=B77A5C561934E089 is not supported for this application type. Financial.dll calls this API. o API System.Converter`2 in MSCORLIB, PUBLICKEYTOKEN=B77A5C561934E089 is not supported for this application type. Financial.dll calls this API. o API System.Threading.ParameterizedThreadStart in MSCORLIB, PUBLICKEYTOKEN=B77A5C561934E089 is not supported for this application type. Financial.dll calls this API.

There are lots of same error.
Is there any other API used for same functionality or what I do to fix this issue?

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
mayank.karki
  • 750
  • 1
  • 9
  • 34
  • Do you have the source of the financial.dll - does it build separately with .net framework 4.5? (project properties) – Michael May 10 '13 at 06:30
  • @Michael I don't have code just dll. If you want I can give you the download link. Once I downloaded it but that's in F# and I was not able to build it successfully. So from somewhere I get only dll. – mayank.karki May 10 '13 at 06:47
  • If you mean this: http://archive.msdn.microsoft.com/FinancialFunctions there are two versions of the dll - a standalone and one that requires, as I see, an additional F# runtime. It could be that this runtime overrides the mentioned items in your error log. – Michael May 10 '13 at 07:04
  • @Michael You are right same link I was using earlier. But there is only one dll in it FinancialNotStandalone.dll. – mayank.karki May 10 '13 at 07:24
  • The available source contains 2 batch scripts (one for standalone and one for notstandalone) which use fsc to build the project. fsc is the f#-compiler. if you use a current full visual studio (pro, ultimate) it should build correctly. If you have only Visual Studio Express for C# there should be F# compiler plugin - but I only found it for "VSE for web": http://www.microsoft.com/en-us/download/details.aspx?id=34675&WT.mc_id=rss_alldownloads_devresources – Michael May 10 '13 at 08:55

1 Answers1

1

Assuming you are developing a Windows Store App, there is a limited subset of the .NET framework that is available for your use. The assembly you are using is evidently built on a full .NET framework and is not a valid Windows Store App component.

If you have the source code for financial.dll you can try to port it to the sandboxed version of .NET available for WinRT. If you don't have the source code, you can't use the assembly at all and will need to find an alternative. In this case, perhaps you can edit your question to specify which financial functions you need and perhaps we can suggest alternatives for you.

EDIT

For the functions you listed, there's a C/C++ source code list here.

Roger Rowland
  • 25,885
  • 11
  • 72
  • 113
  • I need functions for FV, PV, PMT and no. of periods. – mayank.karki May 10 '13 at 12:18
  • 1
    @mayank.karki - probably simple enough just to reimplement in your own code - explained here - http://gnucash.org/docs/v2.4/C/gnucash-guide/loans_calcs1.html - another link added to answer. – Roger Rowland May 10 '13 at 12:23