简体   繁体   中英

C# MVC Razor namespace Microsoft.VisualBasic.Financial not resolving

I am using MVC 3 Razor .cshtml pages. I have included the Microsoft.VisualBasic reference into my project and use it just fine in existing web forms pages. But within my view it will not resolve the Financial NameSpace. It sees Microsoft.VisualBasic just fine but the only thing intellisense brings up is Microsoft.VisualBasic.Activities and Microsoft.VisualBasic.VBCodeProvider. Attempting to use Financial results in a compile error of:

The type or namespace name 'Financial' does not exist in the namespace 'Microsoft.VisualBasic'

Any help is greatly appreciated i need to use the NPV function under financial.

该类型位于Microsoft.VisualBasic.dll中 ,请确保您具有对该类型的引用,以便能够在Razor中使用它。

I ended up just creating a static Finance class that i can make calls to that have access to that namespace. This of course ends up being more reusable anyway.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM