Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access to .licenseheader file is denied #55

Open
epieters opened this issue Sep 14, 2016 · 4 comments
Open

Access to .licenseheader file is denied #55

epieters opened this issue Sep 14, 2016 · 4 comments

Comments

@epieters
Copy link

Running VS 2015 on Windows 10 and I'm getting the following error message:

"Access to c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE.licenseheader" is denied

I also tried with a manually created .licenseheader file in the above directory, but that was not successful either.

@FlorianDecker
Copy link
Contributor

FlorianDecker commented Sep 15, 2016

Hi epieters!

Thats certainly an interesting error.

I am a little bit confused how a .licenseheader can end up in this directory. The Extension should only try to access Files which are placed in the Project Tree.

My first guess is that you have the file "c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE.licenseheader" in your Project Tree and the Extension does not have the right to read the file and therefore throws the error.

As a solution you would have to move the file somewhere else (and assert that the ProjectItem in the Project Tree is pointing to the new direction (which you can do by right clicking the file in the Solution Explorer -> Properties -> Full Path) or, if you want your .licenseheader file in this directory (not recommended), change the permissions for the file.

If there is no such file in your Project Tree i need more information:

Before you tried to manually create the IDE.licenseheader file in the above directory, was the "IDE.licenseheader" file located somewhere else?

What did you try to do when the error message popped up?

Is it possible to share a Repository with us where we can reproduce the error?

@epieters
Copy link
Author

Hi Florian,

I managed to get this working by manually adding a .licenseheader file to the project.

However, when I select the "add new license header definition file" option in the menu I do get the error message that I reported (see attached screenshots)
My project tree is completely outside of the program files directory.

access_denied
header_not_found

@MichaelKetting
Copy link
Member

MichaelKetting commented Sep 19, 2016

Hi Eric!
Thanks for the screenshots. It looks like this is related to sql project files. I just tried a sqlproj file myself in VS2013/LHM v1.7.2 and got "Access to the path 'C:\Windows\system32.licenseheader' is denied." Looks like we now have a repro :)

Best regards, Michael

Edit: Workaround
You can add the licenseheaderfile via the following workaround: Create a c# project, then use the Add Definition File command and copy the .licenseheader file to the sql project. Once that is done, you can delete the c# project.

@FlorianDecker FlorianDecker modified the milestones: 1.8.0, 1.7.3 Sep 21, 2016
@spoggie
Copy link

spoggie commented Sep 27, 2016

I can report the same error, when trying to add a new licence header to an existing Node.js Project

@FlorianDecker FlorianDecker removed this from the 1.7.3 milestone Mar 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants