locked
Access denied while trying to a load a Microsoft.Build.Evaluation.Project RRS feed

  • Question

  • Hi,

    I'm trying to load a project using the following code:

    Microsoft.Build.Evaluation.Project project = ProjectCollection.GlobalProjectCollection.LoadProject(path);

    But I get the following exception:

    Microsoft.Build.Exceptions.InvalidProjectFileException
    
    The project file could not be loaded. Access to the path 'path' is denied. 

    I have verified the path is correct, so I cannot what's going wrong...

    Any thoughts?

    Thanks!

    • Moved by Mike Feng Monday, March 25, 2013 4:49 AM VSX
    Wednesday, March 20, 2013 6:32 PM

All replies

  • "Access to the path 'path' is denied"

    denied.... NTLM issue?

    the path is not granted for you to access? chk with your sys admin

    Thursday, March 21, 2013 2:54 AM
  • it's a project on my local drive and I can access it outside of VS.
    Thursday, March 21, 2013 8:34 AM
  • Is the path a right path? Can it be found by computer?

    崖山之後無中國,明亡之後無華夏

    Wednesday, April 3, 2013 8:27 AM
  • Hi,

      I have a similar issue. Did you fix it?

    Alvin

    Tuesday, July 9, 2013 11:05 AM
  • Hi,

    Please have a try using below code to check whether it denies you to access.

    Microsoft.Build.Evaluation.ProjectCollection collection = new icrosoft.Build.Evaluation.ProjectCollection();
    collection
    .DefaultToolsVersion = "4.0";
    collection
    .RegisterLogger(new ConsoleLogger());
    Microsoft.Build.Evaluation.Project project = new Microsoft.Build.Evaluation.Project(collection);

    Hope it would give you some help!

    Yuping

    Wednesday, July 10, 2013 9:42 AM