在Visual Studio 2010中创建多项目(解决方案)模板之关键步骤【五】
问题描述如下:

1. 使用模板新建项目时候出错:

在网上找到这句话,顺利解决了!
There's no need to remove the <WizardExtension> section from the .vstemplate file. You simply need to build CslaItemTemplateWizards.dll and copy it into <Visual Studio installation path>\Microsoft Visual Studio 9.0\Common7\IDE
2. 引用第三方dll 的时候出现感叹号:
解决方法:
<Reference Include="System" /> <Reference Include="System.Core" /> <Reference Include="System.Runtime.Caching" /> <Reference Include="System.Xml.Linq" /> <Reference Include="System.Data.DataSetExtensions" /> <Reference Include="Microsoft.CSharp" /> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> <Reference Include="Newtonsoft.Json" /> 主要是这里,在对应的*.csproj 文件中加上这句,另外,我们要将 Newtonsoft.Json.dll 注册到 GAC 中去。
注册方法 打开 Visual Studio Command Prompt
注册到 GAC 命令 gacutil -i <assembly name with extension name>
从 GAC 移除命令 gacutil -u <assembly name>
另外:我们也可以通过 先将 TestProjectTemplateWizard.dll 注册到 GAC,然后再从 GAC 移除的方式 查看到 TestProjectTemplateWizard.dll 的 PublicKeyToken


浙公网安备 33010602011771号