错误CS0246找不到类型或名称空间名称'Microsoft'

时间:2019-06-16 11:18:41

标签: asp.net-core .net-core asp.net-core-webapi

我已经从github https://github.com/miroslavpopovic/production-ready-apis-sample-2.2下载了项目。当我建立项目时,编译错误越来越多。

Error   CS0246  The type or namespace name 'Microsoft' could not be found (are you missing a using directive or an assembly reference

enter image description here

code
using BoardGamesApi.Data;
using BoardGamesApi.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Microsoft.AspNetCore.Http;

namespace BoardGamesApi.Controllers
{
    /// <summary>
    /// Games endpoint of Board Games API.
    /// </summary>
    [ApiController]
    [ApiConventionType(typeof(DefaultApiConventions))]
    [ApiVersion("1", Deprecated = true)]
    [Authorize]
    [Route("api/games")]
    [Route("api/v{api-version:apiVersion}/games")]
    public class GamesController : Controller
    {
        private readonly IGamesRepository _gamesRepository;
        private readonly ILogger<GamesController> _logger;
      ........
    }

0 个答案:

没有答案