How to clear/remove file licenses.licx

7.2k Views Asked by At

I'm removing dependency to some component from solution. Some C# projects in their directory contain file licenses.licx and have reference to this file in their text csproj representation. Most of licenses.licx reference only component I'm removing from solution. How to clean this referenses:

  • removing the file licenses.licx from both project(how to do this via VS GUI? I cant find in GUI how to select licenses.licx) and source control;
  • cutting string reference in licenses.licx and leave empty licenses.licx within project and source control.
3

There are 3 best solutions below

1
On BEST ANSWER

The easiest thing to do is show all files in the project within visual studio. When you do this, the .licx file will be shown.

Double-clicking on it will open it in a text editor, so you can make any changes that you need to.

You can also just delete it from the visual studio solution explorer if you need to (clearing all of the entries in the previous step would have the same effect).

1
On

Alternatively, you can install the EmptyLicensesLicx nuget package, and it will make sure your Licenses.licx is always empty before it gets compiled.

0
On

There is a very simple way to get rid of "Licenses.licx" annoying compile error. Just change the "Licenses.licx" Build Action to "None" through "Properties" window.