1

Recently upgraded to Visual Studio 2019. If there is a licenses.licx license file present in the project properties folder, the following error occurs at build time:

error CS1566: Error reading resource 'MyProgram.exe.licenses' -- 'Could not find file 'C:\Sourcecodefolder\obj\x64\Debug\MyProgram.exe.licenses'.'

I tried setting "Copy to Output Directory" to "Copy always", on the .licx file. but that didn't help.

If I delete the license file, the app builds OK. As soon as I open a Windows form, Telerik create a new .licx file and adds it to the project. So every time I open a form in designer view, I have to go delete the .licx file before it will build. Thanks for any help.

d219
  • 2,707
  • 5
  • 31
  • 36
BrianK
  • 2,357
  • 3
  • 32
  • 41
  • I don't have VS2019 but maybe it helps to create an empty license file and set it to read-only? – Markus L Aug 14 '19 at 14:41
  • Also consider this solution, too: https://stackoverflow.com/questions/18067795/how-can-i-prevent-visual-studio-from-creating-license-licx/18070844#18070844 – Markus L Aug 20 '19 at 05:55
  • After it creates a license file, I set it to "No Action" for its build action. Works until I pull from source control and overwrite the project. – BrianK Nov 14 '19 at 21:47

1 Answers1

0

I automate that by installing EmptyLicensesLicx NuGet package, which will make sure there's always an empty Licenses.licx file in your project, before it gets compiled (which is all you really need).

C. Augusto Proiete
  • 24,684
  • 2
  • 63
  • 91