I have a test project that I can’t get to build in Water and Elements C#. I created the same project in VS 2017 using MS C# and it builds/runs fine. I also created the same project in VS 2017 using Elements C# and it fails to build, giving the same error as in Water.
I have attached both the Water/Elements C# project and the VS/MS C# project to this post.
If I comment out the following line in Form1.cs it will build/run
.Where($"{nameof(Recipient.RecipientName):C}=@NameParam")
The error has something to do with FormattableString
Here is the build log:
"C:\Program Files (x86)\RemObjects Software\Elements\Bin\EBuild.exe" C:\devdata\water\testing\formatted-string-test\dapper-multi-db-test.sln --logger:fire --configuration:Debug --verbosity:normal --xml:C:\devdata\water\testing\formatted-string-test\obj\dapper-multi-db-test.water.xml --build --setting:TreatFixableErrorsAsWarnings=True
RemObjects EBuild. An open source build engine for Elements and beyond.
Copyright RemObjects Software 2016-2018. All Rights Reserved. Created by marc hoffman.
Version 10.0.0.2337 (develop) built on talax, 20181019-174442. Commit e637dd2.
RemObjects Elements (Oxygene, C#, Swift and Java) Compiler for .NET, Cocoa, Java and Island.
Version 10.0.0.2337 (develop) built on talax, 20181019-174442. Commit e637dd2.
Copyright 2003-2018 RemObjects Software, LLC. All rights reserved.
Source file: C:\devdata\water\testing\formatted-string-test\Properties\AssemblyInfo.cs
Source file: C:\devdata\water\testing\formatted-string-test\Properties\Resources.Designer.cs
Source file: C:\devdata\water\testing\formatted-string-test\Properties\Settings.Designer.cs
Source file: C:\devdata\water\testing\formatted-string-test\Form1.cs
Source file: C:\devdata\water\testing\formatted-string-test\Form1.Designer.cs
Source file: C:\devdata\water\testing\formatted-string-test\Program.cs
Resource file: C:\Users\Chris\AppData\Local\RemObjects Software\EBuild\Obj\dapper-multi-db-test-6517456023558B0F44C8DD2C6A5653B6D47D7A19\Debug\Echoes\res\Properties-Resources.resources
Reference: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\mscorlib.dll
Reference: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Core.dll
Reference: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Data.DataSetExtensions.dll
Reference: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Data.dll
Reference: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.dll
Reference: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Drawing.dll
Reference: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Windows.Forms.dll
Reference: C:\Program Files (x86)\RemObjects Software\Elements\Echoes\Reference Assemblies\NET\Echoes.dll
Reference: C:\Program Files (x86)\RemObjects Software\Elements\Echoes\Reference Assemblies\NET\Elements.dll
Reference: C:\Users\Chris\.nuget\packages\dapper.fastcrud\2.5.0.39\lib\net46\Dapper.FastCrud.dll
Reference: C:\Users\Chris\.nuget\packages\dapper\1.50.5\lib\net451\Dapper.dll
Reference: C:\Users\Chris\.nuget\packages\EntityFramework\6.2.0\lib\net45\EntityFramework.dll
Reference: C:\Users\Chris\.nuget\packages\EntityFramework\6.2.0\lib\net45\EntityFramework.SqlServer.dll
Reference: C:\Users\Chris\.nuget\packages\System.Data.SQLite.Core\1.0.109.2\lib\net46\System.Data.SQLite.dll
Reference: C:\Users\Chris\.nuget\packages\System.Data.SQLite.EF6\1.0.109\lib\net46\System.Data.SQLite.EF6.dll
Reference: C:\Users\Chris\.nuget\packages\System.Data.SQLite.Linq\1.0.109\lib\net46\System.Data.SQLite.Linq.dll
Reference: C:\Windows\assembly\GAC_MSIL\RemObjects.Elements.Cirrus\10.0.0.2337__3df3cad1b7aa5098\RemObjects.Elements.Cirrus.dll
E: Parameter 1 is "RemObjects.Elements.RTL.String!", should be "FormattableString", in call to TStatementOptionsBuilder Dapper.FastCrud.Configuration.StatementOptions.IConditionalSqlStatementOptionsOptionsSetter<Recipient,Dapper.FastCrud.Configuration.StatementOptions.Builders.IRangedBatchSelectSqlSqlStatementOptionsOptionsBuilder<Recipient>>.Where(FormattableString whereClause) [C:\devdata\water\testing\formatted-string-test\Form1.cs (36)]
Project 'dapper-multi-db-test' failed to build.
Solution 'dapper-multi-db-test' failed to build all projects.
I’ve tried my best type-casting vodoo, but can’t get rid of the error. I think it might be a compiler problem.
Edit: Couldn’t upload - too big. Here are links:
Water/Elements C# version
VS/MS C# version