F# the namespace or module 'XXXX' is not defined

╄→尐↘猪︶ㄣ 提交于 2019-12-22 04:34:05

问题


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.

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

Can anyone think of a resolution to the problem, or anything I could check to understand why its not picking up the Google API?


回答1:


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.




回答2:


Did you check which version of .NET Framework that google assembly is built for? If it .NET 3.5 or .NET 4.0? If that is not set properly too this will occur.

-Fahad



来源:https://stackoverflow.com/questions/6091132/f-the-namespace-or-module-xxxx-is-not-defined

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!