Monday, 13 March 2017

Fix - Error in lc.exe when Compiling Solution upgraded to Visual Studio 2017 RTM from Visual Studio 2015

Upgraded our product solution today to the latest Visual Studio 2017 RTM and everything seemed to work fine - until I started getting the following error in the build:

"The specified task executable "lc.exe" could not be run. The filename or extension is too long"

What is this lc.exe command and why is it running? It is used by the standard .NET licensing mechanism and is maintained by Visual Studio for information about all licensed components.

In my case, the error was occurring in "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets" Line 2975 according to my error log.

Clearly this problem was related to the fact we are using Telerik Controls which require a licx file to compile (or so I thought).

I turned on full diagnostics in Visual Studio 2017 to help get to the bottom of the issue:




This showed the full path that was being passed to lc.exe is over 42000 characters long (!):
1> C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\lc.exe /target:ESSP.ApplicationPages.dll /complist:Properties\licenses.licx /outdir:obj\Debug_SP2013\ ....[SNIP]
 


Several places such as on Microsoft Connect - suggested that the "solution" (pardon the pun) is just to delete the licx file (also as per http://docs.telerik.com/devtools/aspnet-ajax/licensing/license-file) I could then recompile without any build exceptions.

This issue comes about because the lc.exe executable can only handle a parameter length of 32000 characters or less - and the full path is used for all references. Needless to say this is a restrictive limitation in the licensing mechanism!

So the possible alternatives to fix this issue:
1) Remove the licx file if possible when you don't need the full licensed functionality (in my case this was fine - as we don't need design mode for the Telerik controls).
2) Reduce the length of your references by adding a shared drive or logical redirect to a shorter path e.g. c:\references instead of c:\src\DDK\product name\releases\ etc)
3) Reduce the number of references that you have in the project that has issues with lc.exe

DDK

19 comments:

Unknown said...



Thanks admin for sharing the unique content, you have done a great job

Installment loans in Mississippi
Payday loans in Mississippi
Title loans in Mississippi

sachin.ogeninfo said...

Cattle feed Bags supplier
Rice Bags Manufacturers
dry fruit pouches manufacturers

sachin.ogeninfo said...

website designing company in Gurgaon
ppc services in gurgaon

Teena Aggarwal said...

pouch manufacturers
wall putty bag manufacturers

Teena Aggarwal said...

iso certification in noida
iso certification in delhi
Halal Certification in Delhi
haccp certification in delhi

شوشو said...

شركة عزل الاسطح بالخبر
شركة كشف تسربات المياه بعنك
شركة كشف تسربات المياه بسيهات
شركة مكافحة النمل الابيض بالقطيف

Alisah Wilson said...

Our top experts have all the knowledge and experience in all studies and they offer high-quality content in their assignment help so that students can score better grades.
assignment help
online assignment help cheap

meldaresearch said...

Unsure which firm produces Best Custom Research Paper Writing Services in the industry to solve your writing needs? Legitimate Custom Research Paper Services is there for your to produce the best Research Paper Help Assistance Services.

hrroman said...

If you are stuck with your Management assignment then in this case you can opt for our Management Assignment. we provide the bestMarketing assignment help.We also provideConsumer Behaviour Assignment Help for students across the globe. for more information contact us +16692714848.

meldaresearch said...

It is important for cultural studies coursework writing service students to seek Cultural Studies Writing Services from a reputable cultural studies assignment writing service provider for their cultural studies research paper services.

Ravi chauhan said...

Thanks for provide great informatic and looking beautiful blog, really nice required information & the things i never imagined and i would request, wright more blog and blog post like that for us. Thanks you once agian

marriage certificate in ghaziabad
marriage certificate in noida
marriage certificate in gurgaon
marriage certificate in faridabad
marriage certificate in banglore
arya samaj mandir in ghaziabad
arya samaj mandir in noida
arya samaj mandir in gurgaon
arya samaj mandir in faridabad
arya samaj mandir in delhi

Shayari Sad said...

FB Status
Status

Qater said...

here you can get more info about Allama Iqbal open university result data and student ID process, application tracking, BA Admission
Allama iqbal open university

km346 said...

Hi I am from Join Pak Navy I and I really like your work thanks for this information and keep it up you are doing good

Health Lobby said...

Check the requirements for the criminal case law demanded by the Sindh High Court and feel free to consult advocate. Here you can find how to put the case in Sindh high Court.

$ said...

Best Shayri in Hindi

SEO King of Earth.. visit asiainfotech.in said...

We tell you about Income Tax Return.

This tax in India since 1961 through the multiple Amendment of the Constitution of India.

This article is really helpful to you, Every business and offices required Income Tax Return in Delhi and Income Tax Return in Faridabad. We also provide professional service for tax return, tax guidanace in Income Tax Return in Karnataka as well as we provide Income Tax Return in Ahmedabad and Income Tax Return in Kerala.

Get complete detail about income tax, tax refund status, income tax filing procedure, pan number, tax guide. Tax experts in India provided by TaxWala will assist you through the entire process. Online Income Tax Return File your return application & get your acknowledgement Online. Agents and consultanst at TaxWala help you to file income tax return done online in 3 hours without any problem.

Our Tax Consultants also available for Income Tax Return in Gujarat, Income Tax Return in Haryana, Income Tax Return in Rajasthan and Income Tax Return in Punjab.

We are best in taxation services, itr filing, income tax return in india etc.

For SEO, SEM - Top 10 Digital Marketing Company In India

venkatesh sirimalla said...

4Movierulz telugu
Narappa Full Movie
Radhe Shyam Full Movie
Movierulz Plz 2021
Zee5 Premium account
Movierulz Plz
Tamilrockers Telugu
30 Rojullo Preminchadam Ela Full Movie Download
Ala Vaikunta puram Lo Full Movie Download
Vakeel Saab Full HD Movie Download
KGF Chapter 2 Movie Download
HIT Full Movie Download
Tamilyogi isaimini

Himanshi Dagar said...

Your article is very informative, thanks for this amazing post. I have also written some: Best Job Portal