VS2010 project dependencies

假装没事ソ 提交于 2019-12-10 20:22:17

问题


I have a c++ project in VS2010 and a c# project that is to consume this c++ project output (it uses it for p/invoke). I was thinking that I could ensure that the c++ project was build before the c# project by editing the "Project dependencies..." in the solution but this does not seem to have any effect, the build on my buildserver does not respect this setting (I'm using TeamCity to bootstrap an MSBuild file that builds the entire solution file)

I think this used to work, has anything changed with VS2010? Or should I declare the dependency in another way?

SOLUTION: The trick was to hand-edit the csproj file outside VS2010 and add a section like this:

<ProjectReference Include="..\CobraLib\CobraLib.vcxproj">
  <Project>{598506DA-91DA-4F25-948D-A14CB16ABEBA}</Project>
  <Name>CobraLib</Name>
  <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>

That made the build server process my projects in the correct order. Only caveat is that VS2010 displays an error on the project reference ("not a .NET project") but otherwise things are working as I intended

来源:https://stackoverflow.com/questions/4123042/vs2010-project-dependencies

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