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: RESOLVED ANSWERED
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: 2018-02-22 23:13 UTC (History)
4 users (show)

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


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

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
Comment 5 Marek Safar 2018-02-22 23:13:05 UTC
xbuild has been replaced with xbuild, if you can still reproduce the issue with msbuild please reopen