VS2019 CS1566 when project has an licx file init

959 Views Asked by At

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.

1

There are 1 best solutions below

0
C. Augusto Proiete On

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).