我想使用MsBuild任務在我的Wix Visual Studio項目中獲取被引用項目的Output文件夾。但它與下面的錯誤而失敗:
MSBuild:Wix項目中的ProjectReference輸出路徑
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(724,5): error : The OutputPath property is not set for project 'ConsoleApplicatio n1.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Release' Platfo rm='x86'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Plat form that doesn't exist for this project. [C:\Users\fwaheed\Documents\Visual Studio 2015\Projects\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.cspro j]
以下是目標調用MSBuild任務。
<Target Name="AfterBuild">
<MSBuild
Projects="@(ProjectReference)"
Targets="GetTargetPath"
BuildInParallel="false"
Condition="'%(Name)'=='ConsoleApplication1'" >
<Output TaskParameter="TargetOutputs" ItemName="DependentAssemblies" />
</MSBuild>
</Target>
請注意,如果它是CSharp項目,但是在Wix項目中失敗,那麼相同的目標工作得很好。
有人可以指導如何獲得Wix項目中的ReferencedProjects輸出目錄嗎?
感謝
謝謝Brian。這是非常豐富的。但是,我仍然在我的解決方案中遇到x86或任何CPU類型問題......看起來像內部MSBuild任務不喜歡它。 –