Commits

Anton Afanasyev committed 11394d1

also backported to the non-DAL2 VSIX template. in case I ever use them.

Comments (0)

Files changed (4)

VSIX/CSharp-DAL2-Template/DnnTemplate.csproj

     <DNN_Package_Extension>zip</DNN_Package_Extension>
     <DNN_Package_FileName>$safeprojectname$</DNN_Package_FileName>
     <DNN_Package_Name>$safeprojectname$</DNN_Package_Name>
-    <!--<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.targets" Condition="'$(MSBuildCommunityTasksPath)' != ''" />-->
     <MSBuildCommunityTasksPath>$(SolutionDir)\packages\MSBuildTasks.1.4.0.56\tools</MSBuildCommunityTasksPath>
   </PropertyGroup>
   <Import Project="BuildScripts\ModulePackage.Targets" />

VSIX/CSharp-Template/BuildScripts/ModulePackage.targets

 <!-- REMEMBER THAT IF YOU MODIFY THE TARGETS FILE YOU NEED TO CLOSE/OPEN THE PROJECT FOR THE CHANGES TO TAKE EFFECT -->
 
 <Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="MSBuild.Community.Tasks.Targets" />
+  <Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.targets" />
   <Target Name="PackageModule" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <XmlRead Prefix="n"
                     Namespace="http://schemas.microsoft.com/developer/msbuild/2003"
                     XPath="dotnetnuke/packages/package[1]/@version"
-                    XmlFileName="$(DNNFileName).dnn">
+                    XmlFileName="$(DNN_Package_FileName).dnn">
       <Output TaskParameter="Value" PropertyName="Version" />
     </XmlRead>
 
       <SourceInclude Include="**\*.xml" Exclude="**\obj\**;**\_ReSharper*\**;" />
       <SourceInclude Include="**\*.aspx" />
       <SourceInclude Include="**\*.js" />
+      <SourceInclude Include="**\*.dnn" />
       <SourceInclude Include="**\*.txt" Exclude="**\obj\**;**\_ReSharper*\**;" />
       <SourceInclude Include="**\images\**" />
+      <SourceInclude Include="**\packages\**" />
       <SourceInclude Include="**\*.cs" />
-	  <SourceInclude Include="**\Packages\**" />
       <SourceInclude Include="**\*.cs.designer" />
       <SourceInclude Include="**\*.csproj" />
       <SourceInclude Include="**\*.targets" />
       <SourceInclude Include="**\*.sln" />
     </ItemGroup>
-    
-    <CreateItem Include="$(DNNFileName).dnn">
+
+    <!-- some helpful file names and listings -->
+    <CreateItem Include="$(DNN_Package_FileName).dnn">
       <Output TaskParameter="Include" ItemName="PackageManifestFiles" />
     </CreateItem>
 
       <Output TaskParameter="Include" ItemName="SqlDataProviderFiles" />
     </CreateItem>
 
-    <Copy SourceFiles="$(MSBuildDnnBinPath)\$(AssemblyName).dll" DestinationFolder="$(MSBuildProjectDirectory)\Package\bin"/>
+
+    <!-- install package -->
+    <Copy SourceFiles="$(TargetDir)$(AssemblyName).dll" DestinationFolder="$(MSBuildProjectDirectory)\Package\bin"/>
     <Copy SourceFiles="@(SqlDataProviderFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package\%(RecursiveDir)" />
     <Copy SourceFiles="@(PackageManifestFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package" />
     <Copy SourceFiles="@(PackageTxtFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package" />
     
-    
     <!-- create the INSTALL RESOURCES.ZIP file -->
     <Copy SourceFiles="@(InstallInclude)" DestinationFolder="$(MSBuildProjectDirectory)\ResourcesZip\%(RecursiveDir)" />
 
     <CreateItem Include="$(MSBuildProjectDirectory)\ResourcesZip\**\*.*">
-      <Output TaskParameter="Include" ItemName="ResourcesContent" />
+      <Output TaskParameter="Include" ItemName="InstallContent" />
     </CreateItem>
     
-    <Zip Files="@(ResourcesContent)" WorkingDirectory="$(MSBuildProjectDirectory)\ResourcesZip" ZipFileName="Resources.$(Extension)" />
-    <Copy SourceFiles="$(MSBuildProjectDirectory)\Resources.$(Extension)" DestinationFolder="package/" />
+    <Zip Files="@(InstallContent)" WorkingDirectory="$(MSBuildProjectDirectory)\ResourcesZip" ZipFileName="Resources.$(DNN_Package_Extension)" />
+    <Copy SourceFiles="$(MSBuildProjectDirectory)\Resources.$(DNN_Package_Extension)" DestinationFolder="package/" />
 
     <CreateItem Include="$(MSBuildProjectDirectory)\Package\**\*.*">
-      <Output TaskParameter="Include" ItemName="OutputContent" />
+      <Output TaskParameter="Include" ItemName="OutputInstall" />
     </CreateItem>
     <!-- Create the Install package -->    
-    <Zip Files="@(OutputContent)" WorkingDirectory="$(MSBuildProjectDirectory)\Package" ZipFileName="$(PackageName)_$(Version)_Install.$(Extension)" />
+    <Zip Files="@(OutputInstall)" WorkingDirectory="$(MSBuildProjectDirectory)\Package" ZipFileName="$(DNN_Package_Name)_$(Version)_Install.$(DNN_Package_Extension)" />
     <!-- Copy the Install package to the Packages folder -->
-    <Copy SourceFiles="$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Install.$(Extension)" DestinationFolder="install/" />
-    
+    <Copy SourceFiles="$(MSBuildProjectDirectory)\$(DNN_Package_Name)_$(Version)_Install.$(DNN_Package_Extension)" DestinationFolder="$(SolutionDir)..\dnn\build\packages\" />
+
+    <!-- clean up -->
+    <Delete Files="$(MSBuildProjectDirectory)\$(DNN_Package_Name)_$(Version)_Install.$(DNN_Package_Extension)" />
+    <Delete Files="$(MSBuildProjectDirectory)\Resources.Zip" />
     <RemoveDir Directories ="$(MSBuildProjectDirectory)\Package" />
     <RemoveDir Directories ="$(MSBuildProjectDirectory)\ResourcesZip" />
 
     
-    <Copy SourceFiles="$(MSBuildDnnBinPath)\$(AssemblyName).dll" DestinationFolder="$(MSBuildProjectDirectory)\Package\bin"/>
+
+    <!-- sources package -->
+    <Copy SourceFiles="$(TargetDir)$(AssemblyName).dll" DestinationFolder="$(MSBuildProjectDirectory)\Package\bin"/>
     <Copy SourceFiles="@(SqlDataProviderFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package\%(RecursiveDir)" />
     <Copy SourceFiles="@(PackageManifestFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package" />
     <Copy SourceFiles="@(PackageTxtFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package" />
       <Output TaskParameter="Include" ItemName="SourceContent" />
     </CreateItem>
 
-    <Zip Files="@(SourceContent)" WorkingDirectory="$(MSBuildProjectDirectory)\ResourcesZip" ZipFileName="Resources.$(Extension)" />
-    <Copy SourceFiles="$(MSBuildProjectDirectory)\Resources.$(Extension)" DestinationFolder="package/" />
+    <Zip Files="@(SourceContent)" WorkingDirectory="$(MSBuildProjectDirectory)\ResourcesZip" ZipFileName="Resources.$(DNN_Package_Extension)" />
+    <Copy SourceFiles="$(MSBuildProjectDirectory)\Resources.$(DNN_Package_Extension)" DestinationFolder="package/" />
 
     <CreateItem Include="$(MSBuildProjectDirectory)\Package\**\*.*">
       <Output TaskParameter="Include" ItemName="OutputSource" />
     </CreateItem>
 
-    <Zip Files="@(OutputSource)" WorkingDirectory="$(MSBuildProjectDirectory)\Package" ZipFileName="$(PackageName)_$(Version)_Source.$(Extension)" />
-    <Copy SourceFiles="$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Source.$(Extension)" DestinationFolder="install/" />
+    <!-- Create the Source package -->    
+    <Zip Files="@(OutputSource)" WorkingDirectory="$(MSBuildProjectDirectory)\Package" ZipFileName="$(DNN_Package_Name)_$(Version)_Source.$(DNN_Package_Extension)" />
+    <!-- Copy the Source package to the Packages folder -->
+    <Copy SourceFiles="$(MSBuildProjectDirectory)\$(DNN_Package_Name)_$(Version)_Source.$(DNN_Package_Extension)" DestinationFolder="$(SolutionDir)..\dnn\build\packages\" />
 
-    <Delete Files="$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Install.$(Extension)" />
-    <Delete Files="$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Source.$(Extension)" />
-
+    <!-- cleanup -->
+    <Delete Files="$(MSBuildProjectDirectory)\$(DNN_Package_Name)_$(Version)_Source.$(DNN_Package_Extension)" />
     <Delete Files="$(MSBuildProjectDirectory)\Resources.Zip" />
-
     <RemoveDir Directories ="$(MSBuildProjectDirectory)\Package" />
-
     <RemoveDir Directories ="$(MSBuildProjectDirectory)\ResourcesZip" />
     
   </Target>

VSIX/CSharp-Template/DNN-C-Module.vstemplate

   </TemplateData>
   <TemplateContent>
     <!--
-      You can customize the parameters below if you want to make changes to the templates for your own environments.
+              You can customize the parameters below if you want to make changes to the templates for your own environments.
       
-      After changing these parameter values you should rebuild the DNNTemplates project in RELEASE mode and then install the VSIX file found in the bin/release folder
-    -->
+              After changing these parameter values you should rebuild the DNNTemplates project in RELEASE mode and then install the VSIX file found in the bin/release folder
+            -->
     <CustomParameters>
-      <CustomParameter Name="$rootnamespace$" Value="Christoc.Modules."/>
-      <CustomParameter Name="$ownername$" Value="Christoc.com"/>
-      <CustomParameter Name="$owneremail$" Value="modules@christoc.com"/>
-      <CustomParameter Name="$ownerwebsite$" Value="http://www.christoc.com"/>
+      <CustomParameter Name="$rootnamespace$" Value="SilvediaConsulting.Modules."/>
+      <CustomParameter Name="$ownername$" Value="Silvedia Consulting"/><!-- change to a name that fits you or your company -->
+      <CustomParameter Name="$safeownername$" Value="SilvediaConsulting" /><!-- change to a name that fits you or your company. this is the "safe" version of the string - only chars, digits, and underscores. maybe dashes. -->
+      <CustomParameter Name="$owneremail$" Value="dnn.modules@silvedia.com"/>
+      <CustomParameter Name="$ownerwebsite$" Value="http://silvedia.com"/>
       <CustomParameter Name="$devenvironmenturl$" Value="dnndev.me" />
     </CustomParameters>
     <Project TargetFileName="$safeprojectname$.csproj" File="DnnTemplate.csproj" ReplaceParameters="true">

VSIX/CSharp-Template/DnnTemplate.csproj

     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
-    <OutputPath>..\..\bin\</OutputPath>
+    <OutputPath>bin\Debug\</OutputPath>
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
-    <OutputPath>..\..\bin\</OutputPath>
+    <OutputPath>bin\Release\</OutputPath>
     <DefineConstants>TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="DotNetNuke, Version=7.0.2.1, Culture=neutral, processorArchitecture=MSIL">
+    <Reference Include="DotNetNuke">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\bin\DotNetNuke.dll</HintPath>
+      <HintPath>$(SolutionDir)..\dnn\_refs\dnn\DotNetNuke.dll</HintPath>
     </Reference>
-    <Reference Include="Microsoft.ApplicationBlocks.Data, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+    <Reference Include="Microsoft.ApplicationBlocks.Data">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\bin\Microsoft.ApplicationBlocks.Data.dll</HintPath>
+      <HintPath>$(SolutionDir)..\dnn\_refs\dnn\Microsoft.ApplicationBlocks.Data.dll</HintPath>
     </Reference>
     <Reference Include="Microsoft.CSharp" />
     <Reference Include="System" />
     </VisualStudio>
   </ProjectExtensions>  
   <PropertyGroup>
-    <Extension>zip</Extension>
-    <DNNFileName>$safeprojectname$</DNNFileName>
-    <PackageName>$safeprojectname$</PackageName>
+    <DNN_Package_Extension>zip</DNN_Package_Extension>
+    <DNN_Package_FileName>$safeprojectname$</DNN_Package_FileName>
+    <DNN_Package_Name>$safeprojectname$</DNN_Package_Name>
     <MSBuildCommunityTasksPath>$(SolutionDir)\packages\MSBuildTasks.1.4.0.56\tools</MSBuildCommunityTasksPath>
   </PropertyGroup>
   <Import Project="BuildScripts\ModulePackage.Targets" />