Windowsレガシープロジェクトの移行(StrConvのエラーについて: 'RegisterProvider' という名前のパブリック static メソッドがあります。)

windowsレガシープロジェクトをwindowsプロジェクトへ変換したところ
StrConvの実行で以下のエラーが発生しました

半角カナ→ひらがな変換(名字): ‘StrConv(CStr(row.Item(“名字(かな)”)) , Microsoft.VisualBasic.VbStrConv.Wide , &H411)’ を ‘dfZenFirstName’ に割り当てられません。

別のトピックよりwindowsプロジェクトからはInvokeMethodが必要ということで直前に追加したのですが、次は以下のエラーが発生しています

‘EncodingProvider’ には、InvokeMethod ‘メソッドを呼び出し’ に指定されたパラメーター型、ジェネリック型引数、およびジェネリック型制約と一致する ‘RegisterProvider’ という名前のパブリック static メソッドがあります。

該当のキャプチャについていけない点を指摘もらえないでしょうか?

Version:studio 2024.10.6

I’ve faced the same error in the past. You need to replace the quotation marks (") in your project from where they are used for string declarations.

You can notice change in ", while replacing it.

1 Like

こんにちは

TargetTypeプロパティの指定が間違えていると思います。
正しくは

System.Text.Encoding

になると思います。

1 Like

ご指摘の内容で改善できました!
助かりました、ありがとうございました。

1 Like

Thank you for your comment. This time I was able to solve the problem by making the following changes.

System.Text.Encoding

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.