我在编写一个简单的WCF服务时遇到了麻烦。这是我收到的主要错误消息:
D:\ temp \ 3fsgwk0h.1vu \ input \ AndroidWCFService.csproj(102,3):错误 MSB4019:导入的项目“C:\ Program Files (86)\的MSBuild \微软\ VisualStudio的\ WCF \ Microsoft.VisualStudio.ServiceModel.targets” 没找到。确认声明中的路径是 正确,并且该文件存在于磁盘上。
唯一可能使这个WCF服务更复杂的是我使用Entity Framework连接到我在AppHarbor上创建的SQL数据库。我需要进行配置设置吗?
答案 0 :(得分:1)
Here's a blog post that answers your question。从帖子:
You will see that appharbor cannot build the application with WCF service, the following error will be in log:
"Microsoft.VisualStudio.ServiceModel.targets" was not found
To fix this error you should add Microsoft.VisualStudio.ServiceModel.targets (this file located in C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\WCF folder) to your “testForBlockService” service project. Then open testForBlockService.csproj for edit and replace
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\WCF\Microsoft.VisualStudio.ServiceModel.targets" />
with
<Import Project="Microsoft.VisualStudio.ServiceModel.targets" />