Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 找不到Visual Studio项目模板*.projitems_C#_Visual Studio_Project Template - Fatal编程技术网

C# 找不到Visual Studio项目模板*.projitems

C# 找不到Visual Studio项目模板*.projitems,c#,visual-studio,project-template,C#,Visual Studio,Project Template,我已经创建了一个VisualStudio模板,效果很好。但是,当我尝试使用此新模板向解决方案中添加新项目时,我收到以下错误: "The imported project "c:\users\xy\AppData\Local\Temp\Common\Shared\XY.projitems" was not found. Confirm that the expression in the import declaration "..\..\Common\Shared\XY.projitems"

我已经创建了一个VisualStudio模板,效果很好。但是,当我尝试使用此新模板向解决方案中添加新项目时,我收到以下错误:

"The imported project "c:\users\xy\AppData\Local\Temp\Common\Shared\XY.projitems" was not found. Confirm 
that the expression in the import declaration "..\..\Common\Shared\XY.projitems" is correct and that the 
file exists on disk."c:\users\xy\AppData\Local\Temp\qfuczw4e.apk\Temp\MyTemplate1.csproj"
背景资料:

我的解决方案包含在我的项目模板中引用的共享项目

我的项目模板的*.csproj中的导入语句如下所示:

<Import Project="..\..\Common\Shared\XY.projitems" Label="Shared" />

创建的项目位于解决方案中的特殊项目文件夹中。因此,当模板创建项目1到项目3时,需要有对共享项目的引用。

我认为这是由于引用的差异造成的。我使用进行测试,但错误仍然存在,我注意到,如果我只为共享项目或其他项目创建模板,它们将正常工作。由于共享项目是,我可能认为VS不支持创建包含共享项目引用的项目模板。谢谢您对此的答复。是的,你是对的,这一定和你提到的有关。也许我可以忘记创建这样的模板,因为即使是多项目模板也不适合,因为我无法在项目本身中拥有共享项目。因为基于此模板的项目将在包含共享项目的解决方案中创建…请回答我更新的问题。我认为这是由于引用的差异造成的。我使用进行测试,但错误仍然存在,我注意到,如果我只为共享项目或其他项目创建模板,它们将正常工作。由于共享项目是,我可能认为VS不支持创建包含共享项目引用的项目模板。谢谢您对此的答复。是的,你是对的,这一定和你提到的有关。也许我可以忘记创建这样的模板,因为即使是多项目模板也不适合,因为我无法在项目本身中拥有共享项目。因为基于此模板的项目将在包含共享项目的解决方案中创建…请回答我更新的问题。
Solution_XY

   - SharedProject

   - PluginsFolder
     - Project_1
     - Project_2
     - Project_3