0

CodeFluent のテンプレート エンジンを使用して、カスタム SharePoint 2013 アプリケーションでカスタム メールを生成しています。SharePoint 2013 アプリは通常、SharePoint 2016 と前方互換性がありますが、SharePoint 2016 で SharePoint 2013 に対してコンパイルされたアセンブリを使用しようとすると、CodeFluent 関連の障害にぶつかりました。

SharePoint 2016 で Template.Run(..) が呼び出されると、次のエラーが発生します (16.0.0.0 アセンブリと SharePoint 2013 の 15.0.0.0 アセンブリ)。

CF7010: CodeFluent テンプレート '' 言語 'CSharp' を使用した例外: c:\windows\system32\inetsrv> "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe" /t:library /utf8output /R :"C:\Windows\assembly\GAC_MSIL\CodeFluent.Model.Common\1.0.0.0__1bb6d7cccf1045ec\CodeFluent.Model.Common.dll" /R:"C:\Windows\assembly\GAC_MSIL\CodeFluent.Runtime\1.0.0.0 __1bb6d7cccf1045ec\CodeFluent.Runtime.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\ Windows\assembly\GAC_MSIL\CodeFluent.Runtime\1.0.0.0__1bb6d7cccf1045ec\CodeFluent.Runtime.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System. dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\RLSoft.XtraShare.BusinessLayer\v4.0_3.0.0.0__ee2f606d34db8cb1\RLSoft.XtraShare.BusinessLayer.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll" / R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.SharePoint\v4.0_16.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.dll" /out:"C:\Users\SvcSpAppPool\AppData\Local\Temp \CFTemplating.Temp4.0.30319.42000\70804\CF_00000000001456124944.null.dll" /D:DEBUG /debug+ /optimize-Temp4.0.30319.42000\70804\CF_00000000001456124944.null.dll" /D:DEBUG /debug+ /optimize-Temp4.0.30319.42000\70804\CF_00000000001456124944.null.dll" /D:DEBUG /debug+ /optimize-/warnaserror "C:\Users\SvcSpAppPool\AppData\Local\Temp\CFTemplating.Temp4.0.30319.42000\70804\CF_00000000001456124944.null.cs" Microsoft (R) Visual C# コンパイラ バージョン 4.6.0081.0 for Microsoft (R) .NETフレームワーク 4.5 Copyright (C) Microsoft Corporation. 全著作権所有。c:\Windows\Microsoft.NET\assembly\GAC_MSIL\RLSoft.XtraShare.BusinessLayer\v4.0_3.0.0.0__ee2f606d34db8cb1\RLSoft.XtraShare.BusinessLayer.dll: エラーCS1701: エラーとして警告: アセンブリ参照 'Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' が 'Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' に一致すると仮定すると、ランタイムを指定する必要がある場合があります。ポリシー c:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SharePoint\v4.0_16.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.dll.

この問題は、CodeFluent が明らかに /warnaserror フラグを使用して csc.exe コンパイラを呼び出すという事実に起因しているようです。警告がエラーとして扱われないように、この動作をカスタマイズする方法はありますか?

csc.exe.config と SharePoint Web アプリケーションの web.config ファイルの両方で bindingRedirect エントリを使用しようとしましたが、役に立ちませんでした。

誰もが以前にその問題に遭遇したように、もしそうなら、どのように解決しましたか?

4

1 に答える 1