Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Facing problem while working with file system under source control
 

Facing problem while working with file system under source control

Hi all,
I am facing some problem while working with file system in my project. The scenario is something like this. I'm creating a file which will be added to the project after creation. This is working fine when the project is not in source control. But an error comes up whenever i try to modify the content of the newly created file and then save it. This process is done by running a recipe from GAT.

When the recipe runs, the file will be created and added to the project. The target project from where the recipe will be run is under version control. When running the recipe, I also modify the content of the newly created file in a temp file and then saving it and then copying to the target file. So the recipe's throwing an error when i'm saving the changes into the temp file and it's saying "access to the path 'some_path' is denied". please help.

Help anyone

Regards,

Danny

DannyArcher  Thursday, August 16, 2007 12:41 PM
Hi Danny, what about using the dte.SourceControl instance in order to checkout the item if it's under Source Control? Here it's the MSDN reference documentation of the SourceControl's members: http://msdn2.microsoft.com/en-us/library/envdte.sourcecontrol_members(VS.80).aspx

HTH
-Adrian
Adrian Alonso  Thursday, August 16, 2007 1:26 PM
Hi Danny,

Can you please post the complete stack trace of the error so we can better diagnose where this is coming from? (i.e. it is coming from your code vs. GAX code, etc).

Also, if you could run a tool like Process Explorer (now from Microsoft, it used to be from SysInternal) to filter file accesses you could easily pinpoint the exact error (invalid credentials, file locked, etc).

Please provide all extra info you can get.

thanks,
-Victor.
vga  Tuesday, August 21, 2007 6:41 PM
Hi Danny, what about using the dte.SourceControl instance in order to checkout the item if it's under Source Control? Here it's the MSDN reference documentation of the SourceControl's members: http://msdn2.microsoft.com/en-us/library/envdte.sourcecontrol_members(VS.80).aspx

HTH
-Adrian
Adrian Alonso  Thursday, August 16, 2007 1:26 PM

Hi Adrian,

Thanks for the post but I think you've caught the problem wrongly. The idea suggested by you has already been implemented by me.

My problems come up when the solution running the recipe is under source control and When I'm invoking a particular recipe which creates a temp file in my "Documents & Settings" folder in "C drive", the recipe runs into an exception saying that access to the particular file in C drive is denied. I need to access this file in order to update some info into the temp file.

Please help.

Thanks,

Danny

DannyArcher  Monday, August 20, 2007 4:44 AM
Hi Danny,

Can you please post the complete stack trace of the error so we can better diagnose where this is coming from? (i.e. it is coming from your code vs. GAX code, etc).

Also, if you could run a tool like Process Explorer (now from Microsoft, it used to be from SysInternal) to filter file accesses you could easily pinpoint the exact error (invalid credentials, file locked, etc).

Please provide all extra info you can get.

thanks,
-Victor.
vga  Tuesday, August 21, 2007 6:41 PM

You can use google to search for other answers

Custom Search

More Threads

• Use T4 when unfolding solution
• Clarius SFT June 2007 CTP available: GAX & DSL integration just got better!
• <ProjectGuid>{$WebGuidProp$}</ProjectGuid> Ignored -- very stragne behaviour
• Error using CreateProjectAction - Invalid URI: The URI is empty..
• error installing gaxp1409.exe
• GAT fails to install, claims GAX is missing
• The function IsWebProject does not return true for web service project as it should
• Where is the Recipe History stored?
• Use of ExpressionEvaluatorValueProvider in VS2008
• How to set the Open attribute of AddItemFromStringAction