天天看點

Error “Unable to copy the file xxx from the project template to the project. Can't find the file \xxxx” when create VS template

開源項目常常需要按照一定的模闆建立項目代碼, Visual Studio 的模闆功能非常适合這種需要。

建立模闆其實其實非常容易,使用VS的“Export Template”就可以輕松搞定。

<a href="http://images.cnblogs.com/cnblogs_com/DotNetNuke/201202/201202121507459152.png"></a>

不過在修改完各種項目檔案以及手工修改完.vstemplate檔案後,在測試模闆時得到這樣的錯誤:

Error &amp;ldquo;Unable to copy the file xxx from the project template to the project. Can't find the file \xxxx&amp;rdquo; when create VS template

網上搜了一下,原因是還沒有修改.csproj檔案,需要在這個檔案中同樣替換如$safeprojectname”一樣的參數。

繼續閱讀