We recommend using Visual Studio 2017

Microsoft Visual Studio Enterprise Templates: Frequently Asked Questions

 

Summary   This article provides answers to common questions about Visual Studio Enterprise Templates. It also contains a short feature summary about Enterprise Templates and links to other sources of information and support for users of Enterprise Templates, including product documentation and the address of a public newsgroup. (4 printed pages)

Contents

Feature Summary
For More Information
Questions and Answers

Feature Summary

Visual Studio provides a set of Enterprise Templates for software architects to use as a basis for developing more complex applications. These templates are based on the task the application is meant to accomplish rather than on the programming language being used.

For More Information

Questions and Answers

  1. Choosing between project types
  2. Documentation has no back button
  3. Why can't I add a Facade layer?
  4. Adding a project item to a template
  5. Changing templates after distribution
  6. Enterprise Template documentation in languages other than English
  7. Can I use policy in various Visual Studio .NET SKUs?
  8. Does the custom wizard project have C++ requirements?

Question 1: Choosing between project types

What is the difference between a 'Win32 Project' and a 'Managed C++ Empty Project'? The difference is not explained in the Help topic for these project types.

Answer: A "Win32 Project" is unmanaged (native) C++, while a "Managed C++ Empty Project" is an empty project for Managed C++. So the difference is managed versus unmanaged.

Question 2: Documentation has no back button

It is extremely inconvenient not to have a Back button. Every time I go down the wrong path and don't find what I'm looking for (for example, Managed C++ Empty Project), I have to go back to the beginning and start all over again. What do I use instead?

Answer: When you are navigating through the documentation, you can use the various buttons on the Web toolbar. To display the Web toolbar, click View, and then Toolbars, and then click Web if it doesn't already have a check next to it. This toolbar contains forward and back arrows, up and down arrows (for previous topic and next topic), and other helpful buttons. Similarly, when you are moving from one source file to the next, you can move back to previously viewed files (and forward, if applicable) by using the Navigate Backward and Navigate Forward buttons on the Standard toolbar. To display the Standard toolbar, click View, Toolbars, and then make sure Standard is checked.

Question 3: Why can't I add a façade layer?

I cannot add a facade-layer project between the Web Services layer of my project and the business-logic layer. Why can't I do this?

Answer: The policy expressed in the DAP.tdl policy file by default restricts facade-layer projects from being added between the Web Services layer and the business-logic layer. You can remove this restriction from a project by changing one line in the policy file (which is based on DAP.tdl) that the project is using. To see how, read Modifying the Façade Layer Constraint in the Visual Studio documentation.

Question 4: Adding a project item to a template

The Enterprise Template walkthroughs are good for building the same type of projects over and over. But what about a template for a Project Item such as a form? If the Enterprise Template has been customized to use a customized Web form, for instance, and we would like to add another Web form to the project that is based on the one in the Enterprise Template, how do we add that form to the project?

Answer: It should work for you to follow the steps in the "Creating a Project Item Prototype" section of the topic Walkthrough: Creating a New Enterprise Template Building Block (to find it quickly, input the address ms-help://MS.VSCC/MS.MSDNVS/vsent7/html/vxwlkWalkthroughCreatingNewEnterpriseTemplateBuildingBlock.htm in the URL text box in the Web toolbar). Keep in mind while doing this that your custom Web form is the same as a custom class, and this topic describes how to make a custom class project item available in the Enterprise Template.

You would also benefit from the whitepaper Using Custom Code Attributes for TDL Identification in Enterprise Templates at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vstchusingcustomcodeattributesfortdlidentificationinenterprisetemplates.asp. This describes how you can identify your new class through the use of custom code attributes, after which you can control (allow or constrain) the class through your project's policy file. In the policy file, you would define an Element and a Project Item, and then edit the policy file so that it allows adding project items (your Web form) to the parent project type. For an example, look in the topic Walkthrough: Creating a New Enterprise Template Building Block in the section "Defining an ELEMENT in a Policy File."

Question 5: Changing templates after distribution

The result of using Enterprise Templates is cool, but let's say I change something in my template (while using it, I'm also adapting it to the best production of my team). I then have to get inside all of the template files to make changes and then redistribute it. How best to do this?

Answer: It depends. The question of how to edit these different parts and make the new versions available -- after work has begun on an application based on the template -- has a different answer depending on the part. Here is information on all three:

  • Help. You can change Help files easily after a project has begun. Development team members see the new Help pages the first time they access Help after you have made your changes. The documentation describes the relevant steps in the section Providing Custom Help for Enterprise Templates; this topic has the address ms-help://MS.VSCC/MS.MSDNVS/vsent7/html/vxgrfProvidingCustomHelpForEnterpriseTemplateApplications.htm.
  • Policy. You can also change policy after a project has been begun. If you plan to change policy, it is best to have all the projects in your template point to a single policy file on a shared network location. (See the topic Providing Policy From a Shared Network Location; this topic has the address ms-help://MS.VSCC/MS.MSDNVS/vsent7/html/vxtskprovidingpolicyfromsharednetworklocation.htm.) This way, after you update a policy file, all the projects that point to it will simply point to the new version of it, as long as the Policy File property in each project still references that policy file correctly.
  • Project Structure. Templates were not intended to propagate changes made to their structure after projects have been instantiated from that template. Instead, you should apply standard source-control mechanisms for modifying the instantiated project. This means that you would need to make changes both to the template and to any projects that have already been generated from that template.

Question 6: Enterprise Template documentation in languages other than English

I am using Enterprise Templates now, but as I am a native German speaker, I'd prefer to read the Help topics for Enterprise Templates in German. Where can I find it?

Answer: If you bought an English-language copy of Visual Studio .NET, your documentation is entirely in English and there is no way to order the documentation (in German) separately. MSDN publishes large sections of Microsoft documentation in a number of languages online, including German, but no German-language documentation of Visual Studio .NET is currently available online. The only way to obtain it is to purchase a German-language copy of Visual Studio .NET.

Question 7: Can I use Policy in various Visual Studio .NET SKUs?

According to the Enterprise Template documentation, I need either Visual Studio .NET Enterprise Developer or Visual Studio .NET Enterprise Architect to use Enterprise Templates. Is that for building them only? Or can I distribute the created template to developers after it has been created using Architect or Developer editions, and then have them develop using that template with Visual Studio. NET Pro?

Answer: The dividing line is not whether a project is based on an Enterprise Template, but whether the project has policy. You cannot open any project that has associated policy in Visual Studio .NET Pro; you can only open them in Enterprise Developer and Enterprise Architect.

Question 8: Does the custom wizard project have C++ requirements?

I want to create and use a custom wizard with my Enterprise Template, but I don't want to use C++ to do it. The only folder in the New Project dialog box that has a custom wizard is the "Visual C++ Projects" folder. There are no custom wizards in the C# or Visual Basic folders. Where do I go for C# and Visual Basic custom wizards?

Answer: While the custom wizard icon appears in the C++ folder in the New Project dialog box, there is no direct requirement or linking of it to the C++ language. Because it is not language dependent, you can use it for C# or Visual Basic projects, as well as C++ projects.

Show: