This project is read-only.
1
Vote

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

description

http://source.roslyn.codeplex.com/#Microsoft.CodeAnalysis.Workspaces/Workspace/MSBuild/ProjectFile/ProjectFile.cs#837fdfd369006af9

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.

comments

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.