summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--projecttemplates/projecttemplates.proj46
-rw-r--r--vsi/vsi.proj38
-rw-r--r--vsix/vsix.proj1
3 files changed, 43 insertions, 42 deletions
diff --git a/projecttemplates/projecttemplates.proj b/projecttemplates/projecttemplates.proj
index b816b73..8419a32 100644
--- a/projecttemplates/projecttemplates.proj
+++ b/projecttemplates/projecttemplates.proj
@@ -3,9 +3,10 @@
<PropertyGroup>
<ProjectTemplateMaxPath Condition=" '$(ProjectTemplateMaxPath)' == '' ">50</ProjectTemplateMaxPath>
- <ProjectTemplatesLayoutPath>$(IntermediatePath)projecttemplates\</ProjectTemplatesLayoutPath>
- <ProjectTemplates2008LayoutPath>$(IntermediatePath)projecttemplates2008\</ProjectTemplates2008LayoutPath>
- <ExtensionVsixLayoutDirectory>$(IntermediatePath)Vsix\</ExtensionVsixLayoutDirectory>
+
+ <!-- We use GetFullPath here because IntermediatePath may be a relative directory, and we need to do full path comparisons. -->
+ <ProjectTemplatesLayoutPath>$([System.IO.Path]::GetFullPath('$(IntermediatePath)projecttemplates\'))</ProjectTemplatesLayoutPath>
+ <ProjectTemplates2008LayoutPath>$([System.IO.Path]::GetFullPath('$(IntermediatePath)projecttemplates2008\'))</ProjectTemplates2008LayoutPath>
<LayoutDependsOn>
BuildUnifiedProduct;
@@ -163,7 +164,9 @@
<VS2008ProjectTemplates Include="@(ProjectTemplates2008Layout)" Condition="'%(Extension)' == '.vstemplate'" />
<TopLevelVS2008ProjectTemplates Include="@(VS2008ProjectTemplates)" Condition="'%(RootDir)%(Directory)' == '$(ProjectTemplates2008LayoutPath)'" />
+ <VS2008ProjectTemplateZipFiles Include="@(TopLevelVS2008ProjectTemplates->'%(RootDir)%(Directory)%(FileName).zip')" />
</ItemGroup>
+ <Message Text="VS2008ProjectTemplates: @(VS2008ProjectTemplates)" />
<HardLinkCopy SourceFiles="@(ProjectTemplates2008Source)" DestinationFiles="@(ProjectTemplates2008Layout)" />
@@ -173,7 +176,42 @@
DowngradeMvc2ToMvc1="true"
/>
- <Purge Directories="$(ProjectTemplates2008LayoutPath)" IntendedFiles="@(ProjectTemplates2008Layout)" />
+ <Purge Directories="$(ProjectTemplates2008LayoutPath)"
+ IntendedFiles="@(ProjectTemplates2008Layout);@(VS2008ProjectTemplateZipFiles)" />
+ </Target>
+
+ <Target Name="Zip2008" DependsOnTargets="Layout2008">
+ <DiscoverProjectTemplates TopLevelTemplates="@(TopLevelVS2008ProjectTemplates)">
+ <Output TaskParameter="ProjectTemplates" ItemName="SubVS2008Templates" />
+ <Output TaskParameter="ProjectTemplateContents" ItemName="VS2008TemplateItemContents" />
+ </DiscoverProjectTemplates>
+
+ <ItemGroup>
+ <!-- Include in each template .zip file the top-level .vstemplate file itself. -->
+ <VS2008ProjectTemplateContents Include="@(TopLevelVS2008ProjectTemplates)">
+ <ZipFile>$(ProjectTemplates2008LayoutPath)%(FileName).zip</ZipFile>
+ <WorkingDirectory>$(ProjectTemplates2008LayoutPath)</WorkingDirectory>
+ </VS2008ProjectTemplateContents>
+
+ <!-- Now throw in all the files in each of the project-level template's directories and their children. -->
+ <VS2008ProjectTemplateContents Include="@(VS2008TemplateItemContents)">
+ <ZipFile>$(ProjectTemplates2008LayoutPath)%(VS2008TemplateItemContents.TopLevelTemplateFileName).zip</ZipFile>
+ <WorkingDirectory>$(ProjectTemplates2008LayoutPath)</WorkingDirectory>
+ </VS2008ProjectTemplateContents>
+
+ <!-- Include the template icon for each .zip file. -->
+ <VS2008ProjectTemplateContents Include="@(TopLevelVS2008ProjectTemplates->'$(ProjectTemplates2008LayoutPath)__TemplateIcon.ico')">
+ <ZipFile>$(ProjectTemplates2008LayoutPath)%(TopLevelVS2008ProjectTemplates.FileName).zip</ZipFile>
+ <WorkingDirectory>$(ProjectTemplates2008LayoutPath)</WorkingDirectory>
+ </VS2008ProjectTemplateContents>
+ </ItemGroup>
+
+ <Zip
+ Files="@(VS2008ProjectTemplateContents)"
+ ZipFileName="%(VS2008ProjectTemplateContents.ZipFile)"
+ WorkingDirectory="%(VS2008ProjectTemplateContents.WorkingDirectory)"
+ ZipLevel="$(ZipLevel)"
+ />
</Target>
<Import Project="$(ProjectRoot)tools\DotNetOpenAuth.automated.targets"/>
diff --git a/vsi/vsi.proj b/vsi/vsi.proj
index 51e0f58..f5eee7c 100644
--- a/vsi/vsi.proj
+++ b/vsi/vsi.proj
@@ -12,44 +12,6 @@
<ProjectTemplates Include="$(ProjectRoot)projecttemplates\**\*.*proj" />
</ItemGroup>
- <Target Name="ProjectTemplates2008" DependsOnTargets="ProjectTemplatesLayout">
- <ItemGroup>
- <VS2008ProjectTemplateZipFiles Include="@(TopLevelVS2008ProjectTemplates->'%(RootDir)%(Directory)%(FileName).zip')" />
- </ItemGroup>
-
- <DiscoverProjectTemplates TopLevelTemplates="@(TopLevelVS2008ProjectTemplates)">
- <Output TaskParameter="ProjectTemplates" ItemName="SubVS2008Templates" />
- <Output TaskParameter="ProjectTemplateContents" ItemName="VS2008TemplateItemContents" />
- </DiscoverProjectTemplates>
-
- <ItemGroup>
- <!-- Include in each template .zip file the top-level .vstemplate file itself. -->
- <VS2008ProjectTemplateContents Include="@(TopLevelVS2008ProjectTemplates)">
- <ZipFile>$(ProjectTemplatesVsiDirectory)%(FileName).zip</ZipFile>
- <WorkingDirectory>$(VS2008ProjectTemplatesDirectory)</WorkingDirectory>
- </VS2008ProjectTemplateContents>
-
- <!-- Now throw in all the files in each of the project-level template's directories and their children. -->
- <VS2008ProjectTemplateContents Include="@(VS2008TemplateItemContents)">
- <ZipFile>$(ProjectTemplatesVsiDirectory)%(VS2008TemplateItemContents.TopLevelTemplateFileName).zip</ZipFile>
- <WorkingDirectory>$(VS2008ProjectTemplatesDirectory)</WorkingDirectory>
- </VS2008ProjectTemplateContents>
-
- <!-- Include the template icon for each .zip file. -->
- <VS2008ProjectTemplateContents Include="@(TopLevelVS2008ProjectTemplates->'$(VS2008ProjectTemplatesDirectory)__TemplateIcon.ico')">
- <ZipFile>$(ProjectTemplatesVsiDirectory)%(TopLevelVS2008ProjectTemplates.FileName).zip</ZipFile>
- <WorkingDirectory>$(VS2008ProjectTemplatesDirectory)</WorkingDirectory>
- </VS2008ProjectTemplateContents>
- </ItemGroup>
-
- <Zip
- Files="@(VS2008ProjectTemplateContents)"
- ZipFileName="%(VS2008ProjectTemplateContents.ZipFile)"
- WorkingDirectory="%(VS2008ProjectTemplateContents.WorkingDirectory)"
- ZipLevel="$(ZipLevel)"
- />
- </Target>
-
<Target Name="vsi" DependsOnTargets="ProjectTemplates2008">
<PropertyGroup>
<ProjectTemplatesVsi>$(DropDirectoryNoSlash).vsi</ProjectTemplatesVsi>
diff --git a/vsix/vsix.proj b/vsix/vsix.proj
index b9e39d3..8a14ba6 100644
--- a/vsix/vsix.proj
+++ b/vsix/vsix.proj
@@ -4,6 +4,7 @@
<PropertyGroup>
<VS2010ProjectTemplatesDirectory>$(IntermediatePath)VS2010projecttemplates\</VS2010ProjectTemplatesDirectory>
<ProjectTemplateSubdirectory>$(ExtensionVsixLayoutDirectory)PT\CSharp\Web\</ProjectTemplateSubdirectory>
+ <ExtensionVsixLayoutDirectory>$(IntermediatePath)Vsix\</ExtensionVsixLayoutDirectory>
</PropertyGroup>
<Target Name="VsixManifestLayout">