locked
SDK Package: *proj file always treated as MSBuild and fails on missing variables RRS feed

  • Question

  • I'm developing a new type of project which will include a new language with different file types.
    I'm working with Visual Studio 2008 SDK SP1 on Windows 7 RC, using the MPFProj files.

    My project files (<projectname>.xxproj) are MSBuild files but I want to control their execution myself. When opening a project I only want to access certain parts from them. I thought that since I'm defining a project type myself I will have control of what to do with the .xxproj files , but instead it always seems to treat them as MSBuild files and I fail opening the project because some variable is undefined at that stage which leads to a missing <Import> location.

    Can someone help and clarify how (if at all) I can manage how to treat the project file myself?
    Monday, August 10, 2009 12:12 PM

Answers

  • MPF was designed around the assumption that your project file is a valid MSBuild file, and MSBuild itself always treats any file whose extension ends in "proj" as a MSBuild file.

    Why fight it?  If your project file isn't a valid MSBuild file then it can't participate in command line builds or builds on a TFS server. Can't you set default values for the variables in question?  MSBuild is flexible enough to do almost anything.  If you really need to take control over how your project file is treated, then you're going to have to do some major surgery on the MPF sources.  I would rethink your design and do what it takes to make it compatible with MSBuild if at all possible.
    Don Caton - Shoreline Software
    NewsHound - Offline Reader for Newsgroups and Microsoft Forums
    • Marked as answer by Secoak Tuesday, August 11, 2009 7:20 AM
    Tuesday, August 11, 2009 1:02 AM

All replies

  • MPF was designed around the assumption that your project file is a valid MSBuild file, and MSBuild itself always treats any file whose extension ends in "proj" as a MSBuild file.

    Why fight it?  If your project file isn't a valid MSBuild file then it can't participate in command line builds or builds on a TFS server. Can't you set default values for the variables in question?  MSBuild is flexible enough to do almost anything.  If you really need to take control over how your project file is treated, then you're going to have to do some major surgery on the MPF sources.  I would rethink your design and do what it takes to make it compatible with MSBuild if at all possible.
    Don Caton - Shoreline Software
    NewsHound - Offline Reader for Newsgroups and Microsoft Forums
    • Marked as answer by Secoak Tuesday, August 11, 2009 7:20 AM
    Tuesday, August 11, 2009 1:02 AM
  • Thanks for the clarification, it really wasn't obvious for me that MPF was designed to work that way.
    I guess that since my file is an MSBuild file after all I should indeed not fight this.
    Tuesday, August 11, 2009 7:23 AM