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".

[720 byte] By [Piero.B] at [2008-1-28]
# 1
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 at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Guidance Automation Toolkit...
# 2
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 at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Guidance Automation Toolkit...

Visual Studio

Site Classified