Is there a reliable way to keep Compact Framework and Desktop projects in sync with Visual Studio 2008?

邮差的信 提交于 2019-12-12 08:58:56

问题


I am working on an SDK that is targeting both the Full/Desktop .Net Framework and the Compact .Net Framework. As such I have a solution that has projects for the Compact Framework and the full framework. The project files contain the same source files, or thay should. Some of the developers that are working on this SDK with me are only working on the full framework side. From time to time they add a file to the full framework projects, but forget to add it to the compact framework project. Eventually some other peice of code (already in both projects) references this new type. Then the build fails that evening because the compact framework project does not include the new file. Does anyone know of a tool or trick to verify that two project files are in sync? Remember that the files are not identical (one is for the compact framework and the other for the full framework).

BTW, before you mention it I have read The Moths blog posts on this.

Pat O


回答1:


Sounds like you already have continuous integration going on, that is really step one in this -- making sure all the developers know about the build breaking as soon as possible.

If you don't, please check out JetBrains Team City, Cruise Control, or Microsoft Team Systems Team Build.

Depending on your source control server, you might be able to setup check-in policies as well. So if a particular file is checked in, and alert is generated.

But typically I share as much code as I can through linked files. If you have to have different code between the two, hopefully subtle differences, you can do #IFDEFs around the differing code.

Sorry, but no easy answers on this one.




回答2:


Yes, there is a trick ;-p Consider this line from my protobuf-net CF project file:

<ItemGroup>
    <Compile Include="..\protobuf-net\**\*.cs" />
</ItemGroup>

It says "in this project, include and compile all the .cs files from (back a level, up to the sibling protobuf-net folder) and all sub-folders".



来源:https://stackoverflow.com/questions/783750/is-there-a-reliable-way-to-keep-compact-framework-and-desktop-projects-in-sync-w

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