Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Error unfolding a project template
 

Error unfolding a project template

I built a project template that contains some item. One of them is an "App.config" file, that should be copied in the project root folder when the project is unfolded.
I defined a recipe to collect information about the project connection string that must be written into the App.config file at the end of the wizzard.
To accomplish this task I'm coping many thing from the Teched example.

I checked I declared correctly this file in the project.vstemplate and project.csproj. Every time i run the wizzard, everything works fine, but I always receive this error message:

Unable to copy the file 'App.config' from the project template to the project. Cannot find file "C:\...\Temp\Properties\App.config".
Piero.B  Friday, July 22, 2005 3:43 PM
That's right Piero, all items must have either Copy always or Copy if newer in order for them to be picked not only for running the package, but also for building the MSI.
kzu  Monday, July 25, 2005 4:21 PM
I found out by myself what the problem is.
Every file in Visual Studio has a "Copy to Ouput Directory" property, that by default is setted to "Do not copy". In this way when I execute a package, Visual Studio looks for that file in the application execution folder (in my case is bin\dedug\Templates\Projects\MyProject) and can't find it.
I changed the value of the property to "Copy always" ("Copy if newer" sholud works fine as well) and everthings worked correctly.
Piero.B  Monday, July 25, 2005 2:35 PM
That's right Piero, all items must have either Copy always or Copy if newer in order for them to be picked not only for running the package, but also for building the MSI.
kzu  Monday, July 25, 2005 4:21 PM

You can use google to search for other answers

Custom Search

More Threads

• Get StrongDataSet reference
• Recipe framework error
• CAB - Open a View from another view that exists in another or in the same module
• Registering guidance with the experimental hive
• Create Virtual Directory from a Guidance Package.
• Is GAT/GAX compatible with non-English versions of Visual Studio 2005 ?
• Type of Document objects retrieved from DTE
• Template runs as part of the target solution but does not run as part of a Guidance Package
• 2008 New Slippers in www.shoes198.com
• CommandBars