简体   繁体   English

Azure存储类型提供程序:构建时为FS0039,但智能感知显示类型为可用

[英]Azure Storage Type Provider: FS0039 on build but intellisense shows type as available

I am trying to access a type from our Azure Storage account using the Azure Storage Type Provider : 我正在尝试使用Azure存储类型提供程序从Azure存储帐户访问类型

type AzAcc = AzureTypeProvider<"{our ac name}","{our key}">
type clientEntity = AzAcc.Domain.FeedLabClientsEntity

I get intellisense for the FeedLabClientsEntity type and can proceed without the Visual Studio 'red squiggly' but on build the second line above throws the error 我得到了FeedLabClientsEntity类型的intellisense,可以在没有Visual FeedLabClientsEntity '的情况下继续进行,但是在构建上面的第二行会抛出错误

error FS0039: The type 'FeedLabClientsEntity' is not defined

How can I access this type? 我该如何访问此类型?

Basically this is a "feature" of the TP. 基本上这是TP的“特征”。 Unlike most other TPs which eagerly evaluate schema and generate the type system up front, the Azure TP generates types on demand, so only once you navigate through blobs or tables do those types appear accessible. 与大多数其他热切评估模式并预先生成类型系统的TP不同,Azure TP按需生成类型,因此只有在浏览blob或表后,才会显示这些类型。 It most mostly due to save on potential IO - if you point to a real Azure account, theoretically you could have an infinite number of tables and blobs. 这主要是因为节省了潜在的IO - 如果你指向一个真正的Azure帐户,理论上你可以拥有无​​限数量的表和blob。

You can work around this by first trying to access the appropriate table using eg GetPartition. 您可以通过首先尝试使用例如GetPartition访问相应的表来解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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