2

我在这里尝试一些内容,但仍然失败。Microsoft.Data.Entity.Design版本= 10.0.0.0适用于Visual Studio开发人员预览版11

我在Windows Server 2008 R2上安装了Visual Studio Developer Preview。如你所知,现在VS扩展不与VS 11开发预览兼容的,但我发现了一个解决办法:

Visual Studio Extensions and Visual Studio 11 Dev. Preview

我在VS 11安装ADO.NET C# DbContext Generator但是当我尝试运行代码生成,我得到出现以下错误:

Error: this template attempted to load component assembly 'Microsoft.Data.Entity.Design, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. For more information on this problem and how to enable this template, please see documentation on Customizing Project Templates.

我从添加参考页检查,没有像上面的DLL。

任何机会,我可以得到VS 11 Dev的这项工作。预习?

回答

1

好的,我解决了这个问题,但我不确定它是否合法。

当你解压缩扩展,导航到内部的T/code/文件夹中,有一个名为DbContextCS.zip一个zip文件。解压缩,作为好,你会看到文件名为ADONETArtifactGenerator_DbContextCSharp.vstemplate

打开此了文本编辑器和更改此代码:

<WizardExtension> 
    <Assembly>Microsoft.Data.Entity.Design, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly> 
    <FullClassName>Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.AddArtifactGeneratorWizard</FullClassName> 
    </WizardExtension> 

这一个:

<WizardExtension> 
    <Assembly>Microsoft.Data.Entity.Design, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly> 
    <FullClassName>Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.AddArtifactGeneratorWizard</FullClassName> 
    </WizardExtension> 

包一切回到一起并安装扩展,当你运行代码生成时,你将没有问题。

相关问题