F#未定义名称空间或模块"XXXX" [英] F# the namespace or module 'XXXX' is not defined
问题描述
我正在尝试创建一个基本的ASP.net f#应用程序,当我尝试引用Youtube .net API时,我的代码背后出现了未定义名称空间或模块'Google'的信息"文件.
I'm trying to create a basic ASP.net f# application and when I'm trying to reference the Youtube .net API I'm getting a "The namespace or module 'Google' is not defined" in my code behind file.
我在Visual Studio中使用了默认的ASP Web表单模板,删除了所有内容,然后从Expert F#,第14章的示例中加载了该示例.默认示例运行良好,仅在加载Google API时出现问题.通过f#控制台应用程序加载该API时,它可以正常工作.
I've used the default ASP web forms template in Visual Studio, removed all of the contents, then loaded in the examples from Expert F#, Chapter 14. The default examples run fine, the problem only occurs when loading the Google API. The API works fine when I load it through an f# console application.
文件后面的前几行如下:
The first few lines behind file looks like:
#light
namespace MyASPApp
open System
open System.Web
open System.Web.UI
open System.Web.UI.WebControls
open Google.YouTube
任何人都可以想到解决该问题的方法,或者我可以检查以了解其为什么不采用Google API的任何方法?
Can anyone think of a resolution to the problem, or anything I could check to understand why its not picking up the Google API?
推荐答案
Google程序集可能要求应用程序不使用客户端配置文件,这是VS 2010中的默认配置.请尝试编辑项目设置并更改目标框架"属性
The Google assembly may require that the application not use the Client Profile, which is the default in VS 2010. Try editing the project settings and changing the Target Framework property.
这篇关于F#未定义名称空间或模块"XXXX"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!