热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Dotnetaspnetcodegenerator对于dotnetcore3.1失败

我跟随

我跟随https://docs.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/model?view=aspnetcore-3.1&tabs=visual-studio-code并跑步

dotnet tool install --global dotnet-aspnet-codegenerator
dotnet aspnet-codegenerator razorpage -m Movie -dc RazorPagesMovieContext -udl -outDir Pages\Movies --referenceScriptlibraries

那之后,我得到了错误

Building project ...
Scaffolding failed.
Add microsoft.VisualStudio.Web.CodeGeneration.Design package to the project as a NuGet package reference.
To see more information,enable tracing by setting environment variable 'codegen_trace' = 1.
RunTime 00:00:03.47

我尝试使用添加程序包

dotnet add package microsoft.VisualStudio.Web.CodeGeneration.Design --version 3.1.0

并获取错误

Writing C:\Users\tdong.BCFSA\AppData\Local\Temp\tmpA5E0.tmp
info : Adding PackageReference for package 'microsoft.VisualStudio.Web.CodeGeneration.Design' into
project 'D:\Work\Testing\Movies\RazorPagesMovie\RazorPagesMovie.csproj'.
info : Restoring packages for D:\Work\Testing\Movies\RazorPagesMovie\RazorPagesMovie.csproj...
error: Package NuGet.Frameworks 4.7.0 is not compatible with netcoreapp3.1
(.NETCoreApp,Version=v3.1). Package NuGet.Frameworks 4.7.0 does not support any target frameworks.
error: Package 'microsoft.VisualStudio.Web.CodeGeneration.Design' is incompatible with 'all'
frameworks in project 'D:\Work\Testing\Movies\RazorPagesMovie\RazorPagesMovie.csproj'.





推荐阅读
author-avatar
凌波_薇步
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有