0

In a project that I am working now, a new WIX setup project was added by a developer. When I'm trying to get the latest from the TFS that we are using for the code base, the newly added project is shown as incompatible and while building the solution following error is thrown: error screenshot

Has anyone experienced this before?

2
  • Is the file C:\70_Suite\Accounting\IBS.Accounting.Setup\App.wxs under source code control in TFS? Commented Jul 10, 2015 at 7:08
  • @bradfordrg: yes it is. Hence the issue. Right now I have to exclude this project in order to get things to work. Commented Jul 10, 2015 at 18:51

1 Answer 1

2

In a typical team build, the TfGetSources activity will do a Get to retrieve the source files from TFS source code control. However the Get will set the Read Only attribute on all files retrieved, and any attempt to over-write any source code controlled file, during the build, will result in an Access Denied error.

Your new project is using the WIX toolset Heat.exe utility to generate the file C:\70_Suite\Accounting\IBS.Accounting.Setup\App.wxs. This file is under source code control which means it will be read only. The Heat.exe utility is throwing the Access Denied error because it can't over-write this file.

One solution is to remove C:\70_Suite\Accounting\IBS.Accounting.Setup\App.wxs from team foundation source code control. It is generated by heat.exe anyway, so doesn't need to be fetched by the TfGetSources activity.

If you need to keep C:\70_Suite\Accounting\IBS.Accounting.Setup\App.wxs under source code control, then a work-around would be to remove the read-only attribute from this file. This could be done in the Pre-Build Event Command Line in the new WIX project.

Sign up to request clarification or add additional context in comments.

1 Comment

Great answer, but i was hoping there would be some links/examples for setting up the prebuild event to remove readonly

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.