1

搭建模型“发件人”时出现以下错误。发件人模型位于名为 BmbMessenger.Data 的类库项目中,该项目的 dll 在 BmbMessenger.AccountManager 中被引用,但由于某种原因,无法引用“发件人”模型以使脚手架正常运行。我也尝试使用 gui 脚手架工具,但无济于事。我对为什么脚手架不起作用感到困惑。

Scaffold Controller Switch -DbContextType BmbMessengerContext -Verbose -Repository -Project BmbMessenger.AccountManager -ModelType Switch
Get-ProjectType : Cannot find a type matching the name 'Switch'. Try specifying the fully-qualified type name, including namespace.
At C:\Users\Andrew\Documents\Visual Studio 2012\Projects\BmbMessenger\packages\MvcScaffolding.1.0.9\tools\Controller\MvcScaffolding.Controller.ps1:50 char:35
+     $foundModelType = Get-ProjectType <<<<  $ModelType -Project $Project
    + CategoryInfo          : NotSpecified: (:) [Get-ProjectType], InvalidOperationException
    + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.GetProjectTypeCmdlet
4

1 回答 1

0

As you add a new model, change your model, or import an existing model, you should first build your project and then try to use the .tt entity classes as models for scaffolding.

Hope that helps

于 2013-07-27T15:52:43.347 回答