如何使用“dotnet"构建 .sqlproj 项目工具? [英] How to build .sqlproj projects using "dotnet" tool?

查看:21
本文介绍了如何使用“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 项目工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆