Visual Studio 2013:数据库项目MSBuild错误 [英] Visual Studio 2013: Database Project MSBuild error

查看:127
本文介绍了Visual Studio 2013:数据库项目MSBuild错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio 2013中,作为解决方案的一部分,我有一个数据库项目.过去三周一直运行良好,现在突然无法构建,因此我无法发布任何更改.我收到一个MSBuild错误:

I've got a database project as part of my solution in Visual Studio 2013. Been working perfectly for the last 3 weeks and now suddenly today it won't build and so I cannot publish any changes. I'm getting an MSBuild error:

"C:\ Program文件 (x86)\ MSBuild \ Microsoft \ VisualStudio \ v12.0 \ SSDT \ Microsoft.Data.Tools.Schema.SqlTask​​s.targets(513,5): 错误:MSB4018:"SqlBuildTask"任务意外失败. System.MethodAccessException:尝试通过方法'Microsoft.Data.Tools.Schema.Sql.Build.SqlTask​​Host.OnCreateCustomSchemaData(System.String, System.Collections.Generic.Dictionary`2)' 访问方法 'Microsoft.Data.Tools.Components.Diagnostics.SqlTracer.ShouldTrace(System.Diagnostics.TraceEventType)' 失败."

"C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(513,5): Error: MSB4018: The "SqlBuildTask" task failed unexpectedly. System.MethodAccessException: Attempt by method 'Microsoft.Data.Tools.Schema.Sql.Build.SqlTaskHost.OnCreateCustomSchemaData(System.String, System.Collections.Generic.Dictionary`2)' to access method 'Microsoft.Data.Tools.Components.Diagnostics.SqlTracer.ShouldTrace(System.Diagnostics.TraceEventType)' failed."

有人有什么想法吗?今天早上我所做的就是从源代码管理中提取最新的更改.我看不出这怎么会弄乱实际的MSBuild流程,而上次签到的那个人根本没有任何问题.

Anyone got any ideas? All I did this morning was pull down the latest changes from source control. I can't see how that would mess up the actual MSBuild process, and the guy who checked in last doesn't have any issues at all.

推荐答案

事实证明,问题出在Visual Studio Update 3上.我仅将VS 2013卸载并重新安装到Update 2,然后重新安装了Data Tools,它现在可以正常使用.

It turns out the issue was with Visual Studio Update 3. I uninstalled and reinstalled VS 2013 to Update 2 only and reinstalled Data Tools and it works perfectly now.

这篇关于Visual Studio 2013:数据库项目MSBuild错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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