This project is read-only.

GetTargetPath() should deal with TargetPath property not set in project


This method doesn't deal with the case if the TargetPath property is not set in the project. There are projects out there with TargetPath set to "" and we should be able to correctly deal with this case. Namely, default TargetPath to the assembly name rooted in the project directory.


KirillOsenkov wrote Apr 16, 2014 at 10:15 AM

I should add that this can happen if the project configurations in the project are x86 and we're building/opening using Debug/AnyCPU. Then none of the configurations take effect, OutputPath is not set and we blow up.

KirillOsenkov wrote Apr 16, 2014 at 10:25 AM

Correction - this can happen when the following line is missing from the project:

<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

In this case TargetPath is not set.