Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I include license (.lic) files in my bin folder while ensuring they're covered by source control?

I've got a few license files (.lic) that are required by various third-party components, each of which requires the presence of the license file within the bin folder.

Because I've omitted my bin folder from source control, references and license files placed in bin are not source controlled. As per this answer, I moved my pre-compiled references to another location that is covered by source control and reference them in my project by way of a relative path. When I build, those DLLs are properly included in my bin folder.

As far as I know, I cannot use the same method for my license files. They must be stored within my Visual Studio project. In Visual Studio, how can I store my license files in a location covered by source control and have them published to my bin folder at build time?

like image 699
Chad Levy Avatar asked Jul 09 '13 19:07

Chad Levy


People also ask

Where do you store license files?

Typically, the primary license file is stored in the application directory or created on first execution in the application folder or the registry, one or more aliases are stored in the Windows Registry, Windows, or Windows\System(32) directory.

How do I run a .LIC file?

If you cannot open your LIC file correctly, try to right-click or long-press the file. Then click "Open with" and choose an application. You can also display a LIC file directly in the browser: Just drag the file onto this browser window and drop it.

What does license file mean?

A LICENSE file is a software license file commonly used by commercial software applications. It contains registration information that allows a registered user to open and access a piece of software. Many commercial software applications require users to purchase a license in order to use them.


1 Answers

The way I accomplished this was to place my license files in the project root (I imagine you can place them anywhere within the project). Then, I set their properties (ctrl-click each .lic file and press Alt+Enter, or click the Properties tab):

Properties

Setting Copy to output directory to "Copy always" causes the files to be moved to the bin folder at build time.

Setting Build action to "None" prevents the files from being published at their original location along with the other content. Without this setting, the license files would be published at the website root and could be downloaded.

like image 154
Chad Levy Avatar answered Sep 18 '22 15:09

Chad Levy