A new project contains build errors when you use a template that you exported from a project if the name of the old project contains space characters or other invalid identifying characters in Visual Studio 2005 (907754)
The information in this article applies to:
- Microsoft Visual Studio 2005 Standard Edition
- Microsoft Visual Studio 2005 Professional Edition
- Microsoft Visual Studio 2005 Express Edition
SYMPTOMS Consider the following scenario. In Microsoft Visual Studio 2005, the name of a Microsoft Visual Basic Windows Application project contains space characters or other invalid identifying characters. You export a template from the project. You create a new project by using the exported template. In this scenario, the new project contains the following build errors: 'Data_Project' is not a member of
'<Default>'
Type 'Data_Project.My.MySettings' is not
defined. CAUSEThis problem occurs because certain code elements require the name to be embedded as a safe name. These code elements may include namespace issues. For example, when you name your project "Data Project," you notice the code Global.Data_Project in the Application.designer.vb file.
The Export
Template Wizard cannot identify the safe name. The wizard uses the project name
instead of the safe project name to search for the project name. Then, the wizard replaces the project name with the $safeprojectname$ template parameter. This behavior causes the safe project name not to be
replaced. When you create a new application from the exported template, the
safe project name that remains in the template causes the build errors to
occur.WORKAROUNDTo work around this problem, make sure that any projects
from which you export templates do not contain any space characters or invalid
identifying characters in the project name.STATUSMicrosoft
has confirmed that this is a problem in the Microsoft products that are listed
in the "Applies to" section.
Modification Type: | Major | Last Reviewed: | 2/9/2006 |
---|
Keywords: | kbtshoot kbBug kbProgramming kbprb KB907754 kbAudDeveloper |
---|
|