T4模板配置记要
自己琢磨了两个多星期还没有解决的问题,结果被几个简单的配置就搞定了,调用T4模板后出现:“找不到请求的 .Net Framework Data Provider。可能没有安装.”
真的是毫无脾气,解决方案:
1、VS2013开发人员命令提示
2、gacutil -i DataAccessManager.dll目录
3、添加(<configuration>-><configSections>):
<section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
4、添加(<system.data>-><DbProviderFactories>):
<add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
*:3、4的位置:C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config