Bug 28710 - Mono 3.12.1.0 xbuild failed to compile the license file in my visual studio project.
Summary: Mono 3.12.1.0 xbuild failed to compile the license file in my visual studio p...
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: Ms.Build (show other bugs)
Version: 3.12.0
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-04-02 16:16 UTC by li.she
Modified: 2016-03-11 18:06 UTC (History)
4 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
This reproduces the problem. (3.38 KB, application/zip)
2016-03-11 15:21 UTC, kpickard@flightdocs.com
Details

Description li.she 2015-04-02 16:16:28 UTC
My visual studio solution contains a license file for a third-party component. 
Mono 3.12 xbuild failed to build it. Below is the error message

Building target "CompileLicxFiles" in project "D:\TFS\MacDM\Common\LPI.NetworkTools\LPI.NetworkTools.csproj" ("c:\Program Files (x86)\Mono\lib\mono\4.5\Microsoft.Common.targets"); "PrepareResources" depends on it.
			Target CompileLicxFiles:
			Task "LC"
				Using task LC from Microsoft.Build.Tasks.LC, Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
			Task "LC" execution -- FAILED
			Done building target "CompileLicxFiles" in project "D:\TFS\MacDM\Common\LPI.NetworkTools\LPI.NetworkTools.csproj".-- FAILED
		

However, It was built successfully by Mono 3.0.10.
Comment 1 Marek Safar 2015-04-03 09:34:34 UTC
How can I reproduce the issue you are seeing locally ?
Comment 2 li.she 2015-04-08 16:05:24 UTC
To Reproduce this issue, a license file with extension "licx" should be added into the project file.

In my case, I used a third-party component that requires a license file in the project file. 

XBuild in Mono 3.12.1 failed to launch "lc.bat" to build the license file. Even with the most detailed verbosity setting ( diagnostic), no details are shown about this failure.

Thanks.
Comment 3 kpickard@flightdocs.com 2016-03-11 15:21:09 UTC
Created attachment 15375 [details]
This reproduces the problem.

Repro steps:  
1) Build the project --> you'll some conflicting info in the build output.  it claims it was successful but if you check the bin/debug directory, nothing was generated.  If you turn on verbose build output you can see this error:  

	Target CompileLicxFiles:
	Task "LC"
		Using task LC from Microsoft.Build.Tasks.LC, Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
	Task "LC" execution -- FAILED
	Done building target "CompileLicxFiles" in project "/Users/kpickard/Code/ProductDevelopment/api/Flightdocs.Reporting/Flightdocs.Reporting.csproj".-- FAILED

2) remove the .licx file from the project and build --> this will generate the dll.

the licx file is definitely the issue.  

Please fix this or at least improve the build output to clearly state the error and not claim the build was successful when it wasn't
Comment 4 Cody Beyer (MSFT) 2016-03-11 18:06:11 UTC
I was able to reproduce the issue using the above noted steps

Note You need to log in before you can comment on or make changes to this bug.