Visual Studio keeps adding property to my csproj. Why?

后端 未结 4 1380
没有蜡笔的小新
没有蜡笔的小新 2021-01-17 14:46

I\'m using Visual Studio 2012 RC to work with my C# solution. All my configuration-specific settings are stored within a single .props file which is then included by all my

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-17 14:59

    Those IntermediateOutputPath's can be inserted when MSBuild is given a bad path.

    In our case, we had extra unnecessary slash after SolutionDir for output folders.

    What wasn't working for us(note the extra slash):

    $(SolutionDir)\out\bin\
    $(SolutionDir)\out\obj\
    

    What did work:

    $(SolutionDir)out\bin
    $(SolutionDir)out\obj
    

    To help troubleshoot your particular case, try turning on diagnostic MSBuild output and logging under Tools->Options->Projects and Solutions->Build and Run-> MSBuild project build output verbosity. Then, search for the generated folder (ex. "Temp").

    Using common proj/props/targets file is a great idea, but it does require fighting Visual Studio a little.

提交回复
热议问题