Reference trouble with BizTalk schema project in Visual Studio 2008

时光毁灭记忆、已成空白 提交于 2019-12-13 14:29:34

问题


In a large VS 2008 solution we have different schema projects and mapping projects. The mapping projects reference the appropriate schema projects and this works fine overall.

However, recently I added a new schema project and it consistently gives the same problem. When I add a new schema to it, and I want to use that schema in a mapping project that already has a reference to the schema project, the map fails to validate with the message

Cannot load source/destination schema [...]. Either the file/type does not exist, or if a project dependency exists, the dependent project is not built.

Fair enough, I'll just re-build the schema project and this should solve the error. But that is not enough with this particular schema project. I have to remove and re-add the schema project reference to make this error go away. It's pretty annoying and it works for other projects without this extra step, so what can I do?


回答1:


What you are experiencing is a will known issue with the BizTalk Server 2009 Project system.

That version had a number of frustrating designer issues. The later Service Packs alleviated many of them but not all.

The most common workaround for the problem you are facing is to flip the Copy Local property of the Reference.




回答2:


I don't know how often you rebuild your schemas project, but it may be handy to reference the schemas DLL on disk instead of the schemas project in your solution.

Keep in mind though, that a change in the schemas, will need you to rebuild the schemas project again and afterwards the mappings project to take the new version into account.




回答3:


This was probably not the best approach in general, but in case it helps someone, I received this error after...

  1. Making a copy of an existing schema file and giving it a temporary file name. I wanted to keep the original around to reference while I completely rewrote this process.
  2. Eventually I deleted the original file and renamed my copy to what the original file was named.
  3. The map could no longer find the schema even though I clearly had a schema file named as such in my schema project. When asked to "pick a new schema," only the temp schema name was in the list.

The fix for me was that I needed to manually update the "Type Name" field in the properties on the schema to match the file name and rebuild. The "Type Name" was still set to the temp file name I had used while rewriting.



来源:https://stackoverflow.com/questions/24548593/reference-trouble-with-biztalk-schema-project-in-visual-studio-2008

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!