简体   繁体   English

Microsoft.Data.Entity.Design版本1.0.0.0.0适用于Visual Studio Developer Preview 11

[英]Microsoft.Data.Entity.Design, Version=10.0.0.0 is for Visual Studio Developer Preview 11

I am trying something here but keep failing. 我在这里尝试一些东西,但一直失败。

I have Visual Studio Developer Preview installed on a Windows Server 2008 R2. 我在Windows Server 2008 R2上安装了Visual Studio Developer Preview。 As you know, for now VS extensions are not compatible with VS 11 Dev Preview but I found a workaround: 如您所知,目前VS扩展与VS 11 Dev Preview不兼容,但是我找到了一种解决方法:

Visual Studio Extensions and Visual Studio 11 Dev. Visual Studio扩展和Visual Studio 11开发。 Preview 预习

I installed ADO.NET C# DbContext Generator on VS 11 but when I try to run the code generation, I am getting the following error: 我在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'. 错误:此模板尝试加载组件装配'Microsoft.Data.Entity.Design,版本= 10.0.0.0,文化=中性,PublicKeyToken = b03f5f7f11d50a3a'。 For more information on this problem and how to enable this template, please see documentation on Customizing Project Templates. 有关此问题以及如何启用此模板的更多信息,请参见有关自定义项目模板的文档。

I checked from the add reference page, there is no dll like above. 我从添加参考页面检查过,没有上面的dll。

Any chance I can get this work with VS 11 Dev. 我有机会通过VS 11 Dev进行这项工作。 Preview? 预习?

Ok, I solved the problem but I am not sure it is legitimate or not. 好的,我解决了这个问题,但是我不确定它是否合法。

when you unzip the extension, navigate to T/code/ folder inside that, there is a zip file called DbContextCS.zip . 解压缩扩展名时,导航至其中的T/code/文件夹,其中有一个名为DbContextCS.zip的zip文件。 Unzip that as well, and you will see file called ADONETArtifactGenerator_DbContextCSharp.vstemplate 也将其解压缩,您将看到名为ADONETArtifactGenerator_DbContextCSharp.vstemplate的文件

Open this up with text editor and change this code: 使用文本编辑器打开它并更改代码:

  <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>

To this one: 对此:

  <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>

Pack everything back together and install the extension, when you run the code gen., you will have no problem. 将所有内容打包在一起并安装扩展,当您运行代码生成时,将没有问题。

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

相关问题 Resharper 6.0(当前版本)是否支持Microsoft Visual Studio 11开发人员预览版或是否可以进行? - Does Resharper 6.0 (current version) support Microsoft Visual Studio 11 Developer Preview or can it be made to? 什么版本的Visual Studio 11与Windows 8开发人员预览版捆绑在一起? - What version of Visual studio 11 is bundled with Windows 8 Developer Preview? 安装Visual Studio 11开发人员预览时出错 - Error Installing Visual Studio 11 Developer Preview Visual Studio 11开发人员预览版中的F#是吗? - Is F# in visual studio 11 Developer Preview? Visual Studio 11开发人员预览版中的BitScanForward64问题 - BitScanForward64 issue in Visual Studio 11 Developer Preview 有没有人将SVN客户端与Visual Studio 11 Developer Preview一起使用? - Has anyone used an SVN client with Visual Studio 11 Developer Preview? 用户控件XAML C#Visual Studio 11 Windows开发人员预览 - Usercontrols XAML c# visual studio 11 windows developer preview 与Visual Studio 2010 SP1一起运行的Visual Studio 11 Developer Preview? - Visual Studio 11 Developer Preview running alongside with Visual Studio 2010 SP1? Visual Studio 11开发人员预览版中的Visual C#SQL CLR数据库项目 - Visual C# SQL CLR Database Project on Visual Studio 11 Developer Preview Visual Studio 2010 SDK不会随VS 11 Developer Preview Present一起安装 - Visual Studio 2010 SDK won't install with VS 11 Developer Preview Present
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM