Msbuild Cake、VS2017、.NET Core 2.0和构建SQL项目
我正在尝试构建一个.NET Core 2.0解决方案,该解决方案的SQL Server项目为空,但出现以下错误:Msbuild Cake、VS2017、.NET Core 2.0和构建SQL项目,msbuild,sqlproj,Msbuild,Sqlproj,我正在尝试构建一个.NET Core 2.0解决方案,该解决方案的SQL Server项目为空,但出现以下错误: MyDb.sqlproj(57,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.4\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks. targets" was not found. Confir
MyDb.sqlproj(57,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.1.4\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.
targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
你知道我为什么会犯这样的错误吗?
谢谢,Net Core不支持SQL项目,因此您应该使用MSBuild而不是DotNetCoreBuild。 大概是这样的:
Task("Build")
.IsDependentOn("RestoreNuGetPackages")
.IsDependentOn("SetVersion")
.Does(() =>
{
Information("Running DotNetCoreBuild");
MSBuild("../MySolution.sln",
settings =>
settings
.SetConfiguration(configuration)
.SetVerbosity(Verbosity.Minimal));
});
Task("Build")
.IsDependentOn("RestoreNuGetPackages")
.IsDependentOn("SetVersion")
.Does(() =>
{
Information("Running DotNetCoreBuild");
MSBuild("../MySolution.sln",
settings =>
settings
.SetConfiguration(configuration)
.SetVerbosity(Verbosity.Minimal));
});