将新的asp.net核心项目更新为核心1.1软件包会破坏项目

时间:2022-11-13 07:33:21

I just did a File new project in Visual Studio 2015 Community edition with update 3 and created a new Asp.NEt Core Mvc project.

我刚刚在Visual Studio 2015社区版中使用更新3创建了一个File新项目,并创建了一个新的Asp.NEt Core Mvc项目。

I could build and start the project just fine.

我可以很好地构建和启动项目。

Then I updated all nuget-packagges because many *.core.1.1 packages are available. After I did this, the project can no longer start when I do a simple f5. The browser opens and says the site cant be reached - probably because i fails to start. I tried setting a breakpoint in the main method in the Program.cs file, and that is not even hit. So it looks as if upgrading nuget packages breaks a standard ASP.Net Core project created from the official project template. The project is by deault set to use IIS Express.

然后我更新了所有nuget-packagges,因为有许多* .core.1.1包可用。在我这样做之后,当我做一个简单的f5时,项目再也无法启动。浏览器打开并说该网站无法访问 - 可能是因为我无法启动。我尝试在Program.cs文件的main方法中设置一个断点,甚至没有命中。因此,看起来升级nuget包会破坏从官方项目模板创建的标准ASP.Net Core项目。该项目被设置为使用IIS Express。

Has anybody else experienced the same issue and found a solution ?

有没有其他人遇到同样的问题并找到了解决方案?

1 个解决方案

#1


1  

Did you follow the guide here: Announcing .NET Core 1.1?

你有没有按照这里的指南:宣布.NET Core 1.1?

Beside just updating your packages other changes are required, like update of frameworks section in project.json file:

除了更新包之外,还需要进行其他更改,例如project.json文件中的框架更新部分:

{
  ...
  "frameworks": {
    "netcoreapp1.1": {
      "dependencies": {
        "Microsoft.NETCore.App": {
          "type": "platform",
          "version": "1.1.0"
        }
      },
      "imports": "dnxcore50"
    }
  }
  ...
}

#1


1  

Did you follow the guide here: Announcing .NET Core 1.1?

你有没有按照这里的指南:宣布.NET Core 1.1?

Beside just updating your packages other changes are required, like update of frameworks section in project.json file:

除了更新包之外,还需要进行其他更改,例如project.json文件中的框架更新部分:

{
  ...
  "frameworks": {
    "netcoreapp1.1": {
      "dependencies": {
        "Microsoft.NETCore.App": {
          "type": "platform",
          "version": "1.1.0"
        }
      },
      "imports": "dnxcore50"
    }
  }
  ...
}