当我尝试构建时遇到此错误。
硒
verity Code Description Project File Line Suppression State
Error 04094: "C:\Sources\Repos\Dir\PreDeployment\PreDeployment.sql;C:\Sources\Repos\Dir\PreDeployment\PreDeployment.sql" is an invalid value for the "PredeployItem" parameter of the "SqlScriptDependenciesTask" task. Multiple items cannot be passed into a parameter of type "Microsoft.Build.Framework.ITaskItem". Dir C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VisualStudio\v16.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets 512
我添加的只是预部署脚本。
<SqlScriptDependenciesTask
PostdeployItem="@(PostDeploy->'%(FullPath)')"
**PredeployItem="@(PreDeploy->'%(FullPath)')"**
BuildExtensionConfiguration="@(BuildExtensionConfiguration)"
DeploymentExtensionConfiguration="@(DeploymentExtensionConfiguration)"
SqlCmdVariables="@(SqlCmdVariables)">
我在任何地方都找不到解决方案?
部署后运行良好。所以我添加了一个预部署。好像不是这样
sqlproj
<ItemGroup>
<PostDeploy Include="PostDeployment\PostDeployment.sql" />
</ItemGroup>
<ItemGroup>
<PreDeploy Include="PreDeployment\PreDeployment.sql" />
</ItemGroup>
我今天遇到了这个问题,请在下面找到解决方案
这应该可以解决问题。
我还注意到这个错误并不会阻止您运行解决方案。