使用SQL Server數據工具項目,其目標平臺設置爲一個Microsoft.SqlServer.Types時:RuntimeBinderInternalCompilerException使用帶有精緻小巧
- SQL Server 2008中
- SQL Server 2012的
- 的SQL Server 2014
和部署到(的LocalDB)\項目或(的LocalDB)\ ProjectsV12
調用存儲過程返回一個幾何,地理或HierachyId類型如:
CREATE PROCEDURE [dbo].[SelectSqlGeometry]
@x Geometry
AS
SELECT @x as y
RETURN 0
以下調用代碼:
var result = Connection.Query("dbo.SelectSqlGeometry", new { x = geometry }, commandType: CommandType.StoredProcedure).First();
bool isSame = ((bool)geometry.STEquals(result.y));
導致在STEquals線以下情況例外。
Microsoft.CSharp.RuntimeBinder.RuntimeBinderInternalCompilerException 是由用戶代碼的HResult = -2146233088未處理消息=當結合一個動態操作
源= Microsoft.CSharp堆棧跟蹤發生 意外的異常: 在Microsoft.CSharp。 RuntimeBinder.RuntimeBinder.Bind(DynamicMetaObjectBinder 有效載荷,IEnumerable的1 parameters, DynamicMetaObject[] args, DynamicMetaObject& deferredBinding) at Microsoft.CSharp.RuntimeBinder.BinderHelper.Bind(DynamicMetaObjectBinder action, RuntimeBinder binder, IEnumerable
1個指定參數時,IEnumerable的1 arginfos, DynamicMetaObject onBindingError) at Microsoft.CSharp.RuntimeBinder.CSharpConvertBinder.FallbackConvert(DynamicMetaObject target, DynamicMetaObject errorSuggestion) at System.Dynamic.DynamicMetaObject.BindConvert(ConvertBinder binder) at System.Dynamic.ConvertBinder.Bind(DynamicMetaObject target, DynamicMetaObject[] args) at System.Dynamic.DynamicMetaObjectBinder.Bind(Object[] args, ReadOnlyCollection
1參數,LabelTarget returnLabel) 在System.Runtime.CompilerServices.CallSiteBinder.BindCore [T](CallSite`1 部位,對象[]參數) 在System.Dynamic.UpdateDelegates.UpdateAndExecute1 [T0,TRET](調用點 站點,T0爲arg0) 在DATailor.Examples.Dapper.SqlClient.Test.AllTypesDAOTest.TestAllTypesDynamic()