Microsoft Developer Network > 포럼 홈 > Visual C# General > how to resolve stale GUID references in (.csproj) projects files
질문하기질문하기
 

일반 토론how to resolve stale GUID references in (.csproj) projects files

  • 2009년 11월 4일 수요일 오후 5:16rtp_130 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    We have a solution that contains multiple projects.

    This solution builds without ERROR in VS2005.

    However, when I try to build in MSBuild (command line) I receive a MSB4051 GUID reference warnings. Example warning:

    "
    MySolution.sln : Solution file warning MSB4051: Project {DAA7D37E-D7A9-46E2-A9DF-096
    BCFD19065} is referencing a project with GUID {31C1DF20-0C80-4341-AAB9-08439245B
    845}, but a project with this GUID was not found in the .SLN file.
    "

    These warning are occuring because the "Project" in question has had it's GUID updated/changed (probably automatically by VS) but the reference (GUID) to this "Project" from another project has not been updated to reflect this new GUID.

    If I had edit the Project files that contain these stale GUIDs and update them to reflect the acutal new GUIDs then I can build from MSBuild.

    So what my questions is, is there a way for me to generate warnings in VS about these stale GUID references? Becuase VS studio builds i.e., doesn't seem to care about these stale GUID referenes but MSBuild fails I would like to be able to identify these issues in VS so that they can be resolved prior to learning about them on the command line.

    cheers,
    -reagan

모든 응답

  • 2009년 11월 10일 화요일 오전 6:50Harry ZhuMSFT, 중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Hi,

    Could you please show us how to reproduce the problem? 

    has had it's GUID updated/changed (probably automatically by VS)
    I have no idea when VS will change it , maybe you have change it accidently?

    The change of GUID may cause unexpected result . Have you tried referencing the project , does the error persist?

    Harry
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • 2009년 11월 13일 금요일 오전 4:31Harry ZhuMSFT, 중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    We are changing the issue type to “General Discussion” because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question” by opening the Options list at the top of the post  window, and changing the type. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.