如何使用“dotnet"构建 .sqlproj 项目工具?

编程入门 行业动态 更新时间:2024-10-25 12:28:17
本文介绍了如何使用“dotnet"构建 .sqlproj 项目工具?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

无法使用dotnet"命令行工具构建 .Net .sqlproj.这是错误:

dotnet\sdk\3.1.300\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTask​​s.targets"未找到

我已安装 SSDT 工具,但在上述位置不可用.

注意:它是使用 Visual Studio 和 MSBuild 没有任何错误的建筑物

解决方案

如何使用dotnet"工具构建 .sqlproj 项目?

抱歉,据我所知,目前不支持方案.dotnet cli 无法使用旧框架样式 项目文件构建数据库项目,这是设计使然.

至于为什么使用 Visual Studio 和 MSBuild 构建没有任何错误但使用 dotnet 失败的原因.请检查您的SSDT安装路径,它应该在路径C:\Program Files (x86)\Microsoft Visual Studio\2019\VSEditon\MSBuild\Microsoft\VisualStudio\v16.0\SSDT下.>

SSDT 作为 MSBuild(VS 构建工具)或来自 VS 的 MSBuild 的子模块安装,因此在通过 VS/MSbuild 构建时效果很好.但是 dotnet cli 不知道在哪里可以找到 MSBuild 文件夹的子文件夹下的这个模块,所以它会抛出错误.

在 github 中曾经对此进行了讨论,我认为该功能支持通过 Dotnet 构建 SQLProj 尚未实现.如果你对该功能感兴趣,我建议你可以在那里打开一张新票来发表你的想法.

Unable to build .Net .sqlproj using "dotnet" command line tool. Here's the error:

dotnet\sdk\3.1.300\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found

I have installed SSDT tool but it's not available at the above location.

Note: It's buildings without any error using Visual Studio and MSBuild

解决方案

How to build .sqlproj projects using "dotnet" tool?

Sorry but as I know this is not supported scenario for now. It's by design that dotnet cli can't build the Database Project with old-framework style project file.

As for the reason why it's buildings without any error using Visual Studio and MSBuild but failing using dotnet. Please check your SSDT installation path, it should be under pathC:\Program Files (x86)\Microsoft Visual Studio\2019\VSEditon\MSBuild\Microsoft\VisualStudio\v16.0\SSDT.

The SSDT is installed as a sub-module of MSBuild(VS build tools) or MSBuild from VS, so it works well when building it via VS/MSbuild. But dotnet cli won't know where to find this module which is under MSBuild folder's sub-folder, so it throws error.

There's once a discussion about this in github, in my opinion the feature to support build SQLProj via Dotnet hasn't come true. If you're interested in that feature, I suggest you can open a new ticket there to post your idea.

更多推荐

如何使用“dotnet"构建 .sqlproj 项目工具?

本文发布于:2023-11-16 21:14:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1607483.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   工具   项目   quot   dotnet

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!