3

Visual Studio 2015 RC 14.0.22823.1 D14REL の最新 (2015 年 5 月 1 日) バージョンを使用して依存関係の問題を診断できません。

次のコードはコンパイルされておらず、このエラーをスローしています。

Severity    Code    Description Project File    Line
Error   CS1061  
'Thread' does not contain a definition for 'CurrentCulture' and no 
extension method 'CurrentCulture' accepting a first argument of type 
'Thread' could be found (are you missing a using directive or an assembly
reference?) 
ServiceLibrary.DNX Core 5.0 


using System;
using System.Globalization;
using System.Threading;

namespace ServiceLibrary
{
    public class CultureService
    {
        public void SetCulture(string cultureCode = "fr-FR")
        {
            Thread.CurrentThread.CurrentCulture = new CultureInfo(cultureCode);
        }
    }
}

CultureInfo Visual Studio の上にマウスを置くと、次のようなポップアップが表示されます。 ここに画像の説明を入力

これがproject.jsonです

{
  "version": "1.0.0-*",
  "description": "",
  "authors": [ "" ],
  "tags": [ "" ],
  "projectUrl": "",
  "licenseUrl": "",

  "dependencies": {
    "System.Threading": "4.0.10-beta-22816",
    "System.Threading.Thread": "4.0.0-beta-22816",
    "System.Globalization": "4.0.10-beta-22816"
  },

  "frameworks": {
    "dnx451": { },
    "dnxcore50": {
      "dependencies": {
        "System.Collections": "4.0.10-beta-22816",
        "System.Linq": "4.0.0-beta-22816",
        "Microsoft.CSharp": "4.0.0-beta-22816",

      }
    }
  }
}

誰かが問題がどこにあるかを確認するのを手伝ってくれることを願っています。

ありがとう

4

1 に答える 1