0

我是 Visual Studio 的新手。我从 Azure 多租户下载了一个 Web 应用程序。但是当我尝试运行该应用程序时,我收到以下错误消息:

/Users/MySystem/Desktop/active-directory-dotnet-webapp-multitenant-openidconnect/TodoListWebApp/TodoListWebApp.csproj(3,3): Error MSB4019: The imported project "/Library/Frameworks/Mono.framework/Versions/5.0.0/lib/mono/xbuild/Microsoft/VisualStudio/v15.0/WebApplications/Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. (MSB4019) 

我已经尝试修改此链接中给出的 .csproj 文件,但无法解决该问题。请注意我正在使用 Mac Visual Studio。

任何想法或建议将不胜感激。

4

1 回答 1

1

活动目录-dotnet-webapp-multitenant-openidconnect/TodoListWebApp

通过在网络上搜索项目名称,我发现它是一个示例 .NET 4.5 MVC Web 应用程序

我正在使用 Mac Visual Studio

Visual Studio for Mac 中的 Web 应用程序基于 .NET Core,它不能与 sln/csproj 文件一起使用。我建议您在 Visual Studio for Mac 上创建一个新项目并从原始项目中复制文件。

由于 Mac 上的 .NET 版本是 .NET Core,这与示例应用程序 (.NET 4.5) 不同。您还需要修改一些代码。例如,ASP.NET Core 应用程序不包含 Global.asax。

有关如何创建 asp.net 核心应用程序的更多信息,以下链接供您参考。

使用 Visual Studio Code 创建 ASP.NET Core MVC 应用

于 2017-06-12T08:08:38.907 回答