Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > wix creates a .bak file???
 

wix creates a .bak file???

hi,

i'm getting a problem with the wix installer project where it creates a file
"TechControl.SoftwareFactoryTemplatesContent.wxs.bak" when i build the solution, once this is created any subsequent builds fail with:

System.UnauthorizedAccessException: Access to the path 'TechControl.SoftwareFactoryTemplatesContent.wxs.bak' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite)
at Clarius.MetaFactory.Tasks.Tasks.Tallow.a()
at Clarius.MetaFactory.Tasks.Tasks.Tallow.Execute()
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode howToExecuteTask, Hashtable projectItemsAvailableToTask, BuildPropertyGroup projectPropertiesAvailableToTask, Boolean& taskClassWasFound) C:\TFS\Infrastructure Technology Development\SoftwareFactory\TechControlSF\TechControl.SoftwareFactory.Setup\TechControl.SoftwareFactory.Setup.csproj 73 5 TechControl.SoftwareFactory.Setup
Error 2 The "Tallow" task failed unexpectedly.


if i delete the file the next build completes ok, but i also noticed:

"C:\Program Files\Clarius Consulting\Software Factories Toolkit\1.0\Tools\tallow.exe" -d "..\TechControlSoftwareFactory\bin\Debug\Recipes" -d "..\TechControlSoftwareFactory\bin\Debug\Templates" > "TechControl.SoftwareFactoryTemplatesContent.wxs"
Access is denied.

any ideas???

mickdelaney  Tuesday, August 07, 2007 9:54 AM
Hi, this is actually by design. Every time you build the project, the WIX files will be updated by the SFT in order to sync the installer with the Guidance Package changes. So if you add a template for example, the installer will be automatically updated. If the files that should be updated are read-only (probably because they are under source control), you will receive the second warning.

The backup file (.bak) file is created by SFT. You can configure if the backup file should be created editing the .csproj of the installer project by modifying the following task:

<Tallow
Condition="'%(GuidancePackage.Name)' != ''"
Directory="%(GuidancePackage.Identity)%(GuidancePackage.OutputPath)"
OutputFile="%(GuidancePackage.TemplatesContentFilename)"
Tool="$(MetaFactoryLibPath)$(Tallow)"
SubDirectoriesMode="true"
SourceBaseDirectory="%24(var.%(GuidancePackage.Name).Build.Dir)\"
DirectoryRef="%(GuidancePackage.Name)Directory"
BackupFileName="%(GuidancePackage.TemplatesContentFilename).bak"
/>

If you remove the BackupFileName attribute the backup file won't be created.

HTH
-Adrian
Adrian Alonso  Tuesday, August 07, 2007 12:10 PM
Hi, this is actually by design. Every time you build the project, the WIX files will be updated by the SFT in order to sync the installer with the Guidance Package changes. So if you add a template for example, the installer will be automatically updated. If the files that should be updated are read-only (probably because they are under source control), you will receive the second warning.

The backup file (.bak) file is created by SFT. You can configure if the backup file should be created editing the .csproj of the installer project by modifying the following task:

<Tallow
Condition="'%(GuidancePackage.Name)' != ''"
Directory="%(GuidancePackage.Identity)%(GuidancePackage.OutputPath)"
OutputFile="%(GuidancePackage.TemplatesContentFilename)"
Tool="$(MetaFactoryLibPath)$(Tallow)"
SubDirectoriesMode="true"
SourceBaseDirectory="%24(var.%(GuidancePackage.Name).Build.Dir)\"
DirectoryRef="%(GuidancePackage.Name)Directory"
BackupFileName="%(GuidancePackage.TemplatesContentFilename).bak"
/>

If you remove the BackupFileName attribute the backup file won't be created.

HTH
-Adrian
Adrian Alonso  Tuesday, August 07, 2007 12:10 PM

You can use google to search for other answers

Custom Search

More Threads

• Error creating ServiceContract, also not displaying my current project's DataContracts / FaultContracts???
• Business module creation problem
• How to modify the SCSF Add View (with presenter) generated code
• How to Create Project Reference and App_Code from Web Sevice?
• $(TargetDir) available in Recipe node?
• Application Block Software Factory Templates
• Create a Template
• Passing argument between wizards (with custom TypeConverters)
• Code samples anywhere ?
• how to specify another project within a same solution included as namespace & its objects name used as parameters