locked
Access Denied when creating C++ Project from custom template RRS feed

  • Question

  • Hi,

    I'm facing a problem when creating a C++ project from a custom template using Visual Studio 2013, steps to reproduce:

    1. I created a C++ project which compiles fine ... 
    2. I used File->Export Template to export the project as a template, in the wizard I checked "Automatically import the template in Visual Studio" 
    3. When right clicking the solution item -> Add -> New Project, the template shows up in the list but .... when selecting it I get an "Access Denied" error. It seems the project was created in the selected folder on disk, but it was not added to the solution in Visual Studio.

    Any ideas, thx !


    Tuesday, April 22, 2014 2:44 PM

Answers

  • Hi,

    Would you mind also share me your project template? You can upload it to the OneDrive then post back the link.

    By the way, another community member got the same issue as you, see: http://social.msdn.microsoft.com/Forums/vstudio/en-US/2007c7b6-61e1-4d29-ac71-bf4281bc15d8/getting-an-error-message-when-creating-a-new-project-from-my-template?forum=vsx

    And his/her issue is caused by including one unexisting file. Please double check if your issue is the same.

    Thanks.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, May 13, 2014 12:39 AM
  • Hi,

    thank you for your help: the solution is indeed related to a "missing" file. The project included an .h file which is not part of the project directory put in some other (central) location on the local disk. Once I moved this .h file inside the project folder the problem was resolved. 

    Which brings up the question: is this a bug or a feature ? I guess the ability to include .h files from other APIs or projects is pretty standard, not ?

    Thanks.

     

    Tuesday, May 13, 2014 8:12 AM
  • Hi,

    I create a VC project to test. And I didn't come across this issue.

    >>It seems the project was created in the selected folder on disk, but it was not added to the solution in Visual Studio.

    Why do you think so?

    Please check if the template exist. If you didn't change the default path, it should be a compression file in the path "...\Documents\Visual Studio 2012\My Exported Templates".

    Please open the visual studio again, file -> new project, choose the template to see if it is ok.

    Best regards,

    Sunny

    • Marked as answer by Anna Cc Wednesday, April 30, 2014 8:42 AM
    Wednesday, April 23, 2014 10:02 AM

All replies

  • Hi,

    I create a VC project to test. And I didn't come across this issue.

    >>It seems the project was created in the selected folder on disk, but it was not added to the solution in Visual Studio.

    Why do you think so?

    Please check if the template exist. If you didn't change the default path, it should be a compression file in the path "...\Documents\Visual Studio 2012\My Exported Templates".

    Please open the visual studio again, file -> new project, choose the template to see if it is ok.

    Best regards,

    Sunny

    • Marked as answer by Anna Cc Wednesday, April 30, 2014 8:42 AM
    Wednesday, April 23, 2014 10:02 AM
  • Hi Vandeplas,

    Please post here the detailed error message you got.

    Thanks.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, April 24, 2014 2:48 AM
  • Hi,

    Thanks for your response. So to answer your questions:

    1. the zip file exists in .. \Documents\Visual Studio 2013\My Exported Templates
    2. When I add a new project from the template (which is effectively listed in the new project dialog) two error dialogs pop up:
      The first has a "red X mark" icon saying "The operation completed succussfully" (strange combination if you ask me)
      The second dialog, again the red X, reads: "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    3. When I check the solution folder on my disk it seems a folder for thenew project was effectively created, but not added to the visual studio solution
    4. When I then try to add this newly created project to my solution using "Add -> Existing project" I get an error saying "Can't register twice. Must call Close first"

    Alternative try:

    1. When I open a new instance of visual studio, and try to create a project/solution from scratch using the template I get the same two error boxes described in step 2 above. 
    2. However, when I then try to open the newly created project and add it to the solution manually as described in step 4 above it seems to work. 

    I am running Windows Server 2008R2, maybe that has an impact ?

    Thx !



    Monday, May 5, 2014 8:09 AM
  • When I add a new project from the template (which is effectively listed in the new project dialog) two error dialogs pop up:
    The first has a "red X mark" icon saying "The operation completed succussfully" (strange combination if you ask me)
    The second dialog, again the red X, reads: "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

    Hi,

    Could you please share me one screenshot of it?

    And how about you run VS with administrator privilege? In addition, what edition of your VS? Ultimate, professional, or ...?

    Thanks.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, May 7, 2014 3:40 AM
  • Hi,

    the requested screenshots are attached, the Visual Studio version I'm using is 2013 premium. As you can see in the header, running as administrator does not make any difference. 

    Thanks.

    Monday, May 12, 2014 1:07 PM
  • Hi,

    Would you mind also share me your project template? You can upload it to the OneDrive then post back the link.

    By the way, another community member got the same issue as you, see: http://social.msdn.microsoft.com/Forums/vstudio/en-US/2007c7b6-61e1-4d29-ac71-bf4281bc15d8/getting-an-error-message-when-creating-a-new-project-from-my-template?forum=vsx

    And his/her issue is caused by including one unexisting file. Please double check if your issue is the same.

    Thanks.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, May 13, 2014 12:39 AM
  • Hi,

    thank you for your help: the solution is indeed related to a "missing" file. The project included an .h file which is not part of the project directory put in some other (central) location on the local disk. Once I moved this .h file inside the project folder the problem was resolved. 

    Which brings up the question: is this a bug or a feature ? I guess the ability to include .h files from other APIs or projects is pretty standard, not ?

    Thanks.

     

    Tuesday, May 13, 2014 8:12 AM
  • Hi,

    Firstly, I am glad your issue is resolved.

    But I'm sure why the issue raises as I can't reproduce it on my machine. Would you mind to submit one feedback on the Microsoft Connect site? Our senior engineers may take a deep look at it for you. Go:

    https://connect.microsoft.com/VisualStudio/feedback/CreateFeedbackForm.aspx?FeedbackFormConfigurationID=5303&FeedbackType=1

    Thanks.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, May 14, 2014 10:18 PM
  • the issue still reproduces
    Monday, July 6, 2015 2:50 PM