build: got packages building correctly

This commit is contained in:
Andrew Welker
2024-02-02 11:53:00 -06:00
parent 7a66fdd490
commit 9dfc99259f
4 changed files with 20 additions and 28 deletions

View File

@@ -1,29 +1,26 @@
<Project> <Project>
<ItemGroup> <ItemGroup>
<None Include="$(PackageOutputPath)\$(TargetName).$(Version).cpz" Condition="$(ProjectType) == 'Program'"> <None Include="$(PackageOutputPath)\$(AssemblyName)\*.cpz" Condition="$(ProjectType) == 'Program'">
<Pack>true</Pack> <Pack>true</Pack>
<PackagePath>content;</PackagePath> <PackagePath>build;</PackagePath>
</None> </None>
<None Include="$(PackageOutputPath)\$(TargetName).$(Version).*.cplz" Condition="$(ProjectType) == 'ProgramLibrary'"> <None Include="$(PackageOutputPath)\$(AssemblyName)\*.cplz" Condition="$(ProjectType) == 'ProgramLibrary'">
<Pack>true</Pack> <Pack>true</Pack>
<PackagePath>content;</PackagePath> <PackagePath>build;</PackagePath>
</None> </None>
</ItemGroup> </ItemGroup>
<Target Name="Create CPLZ" AfterTargets="Build; AfterRebuild" Condition="$(ProjectType) == 'ProgramLibrary'"> <Target Name="Create CPLZ" AfterTargets="Build; AfterRebuild" Condition="$(ProjectType) == 'ProgramLibrary' And $(TargetDir) != ''">
<Message Text="Creating CPLZ"></Message> <Message Text="Creating CPLZ $(TargetDir)"></Message>
<MakeDir Directories="$(PackageOutputPath)" Condition="!Exists($(PackageOutputPath))"></MakeDir> <MakeDir Directories="$(PackageOutputPath)" Condition="!Exists($(PackageOutputPath))" />
<ZipDirectory SourceDirectory="$(TargetDir)" DestinationFile="$(PackageOutputPath)\$(TargetName).$(Version).$(TargetFramework).cplz" Overwrite="true"/> <MakeDir Directories="$(PackageOutputPath)\$(AssemblyName)" Condition="!Exists('$(PackageOutputPath)\$(AssemblyName)')" />
<ZipDirectory SourceDirectory="$(TargetDir)" DestinationFile="$(PackageOutputPath)\$(AssemblyName)\$(TargetName).$(Version).$(TargetFramework).cplz" Overwrite="true"/>
</Target> </Target>
<Target Name="Clean CPLZ" AfterTargets="BeforeRebuild" Condition="$(ProjectType) == 'ProgramLibrary'"> <Target Name="Copy CPZ NET6" AfterTargets="SimplSharpPostProcess" Condition="($(ProjectType) == 'Program' And ( '$(TargetFramework)' == 'net6.0' ) Or ( '$(TargetFramework)' == 'net8.0' ))">
<Delete Files="$(PackageOutputPath)\$(TargetName).$(Version).$(TargetFramework).cplz"/>
</Target>
<Target Name="Copy CPZ NET6" AfterTargets="SimplSharpPostProcess; SimplSharpPostProcess47" Condition="$(ProjectType) == 'Program'">
<Message Text="Copying CPZ"></Message> <Message Text="Copying CPZ"></Message>
<Move SourceFiles="$(TargetDir)$(TargetName).cpz" DestinationFiles="$(TargetDir)$(TargetName).$(Version).$(TargetFramework).cpz" /> <Move SourceFiles="$(TargetDir)$(TargetName).cpz" DestinationFiles="$(PackageOutputPath)\$(AssemblyName)\$(TargetName).$(Version).$(TargetFramework).cpz" />
<Copy SourceFiles="$(TargetDir)$(TargetName).$(Version).${TargetFramework}.cpz" DestinationFiles="$(PackageOutputPath)\$(TargetName).$(Version).$(TargetFramework).cpz"/>
</Target> </Target>
<Target Name="Copy CPZ NET47" AfterTargets="SimplSharpPostProcess47" Condition="($(ProjectType) == 'Program' And ( '$(TargetFramework)' != 'net6.0' ) And ( '$(TargetFramework)' != 'net8.0' ))">
<Target Name="Clean CPZ" AfterTargets="BeforeRebuild" Condition="$(ProjectType) == 'Program'"> <Message Text="Copying CPZ"></Message>
<Delete Files="$(PackageOutputPath)\$(TargetName).$(Version).$(TargetFramework).cpz"/> <Move SourceFiles="$(TargetDir)$(TargetName).cpz" DestinationFiles="$(PackageOutputPath)\$(AssemblyName)\$(TargetName).$(Version).$(TargetFramework).cpz" />
</Target> </Target>
</Project> </Project>

View File

@@ -27,13 +27,8 @@
<None Remove="Web\**" /> <None Remove="Web\**" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System.Data.DataSetExtensions" /> <PackageReference Include="Crestron.SimplSharp.SDK.ProgramLibrary" Version="2.20.42" />
<Reference Include="Microsoft.CSharp" /> <PackageReference Include="PepperDashCore" Version="2.0.0-beta-383" />
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Crestron.SimplSharp.SDK.ProgramLibrary" Version="2.20.37" />
<PackageReference Include="PepperDashCore" Version="2.0.0-beta-379" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Crestron\CrestronGenericBaseDevice.cs.orig" /> <None Include="Crestron\CrestronGenericBaseDevice.cs.orig" />

View File

@@ -26,7 +26,7 @@
<ProjectReference Include="..\PepperDash.Essentials.Core\PepperDash.Essentials.Core.csproj" /> <ProjectReference Include="..\PepperDash.Essentials.Core\PepperDash.Essentials.Core.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Crestron.SimplSharp.SDK.ProgramLibrary" Version="2.20.37" /> <PackageReference Include="Crestron.SimplSharp.SDK.ProgramLibrary" Version="2.20.42" />
<PackageReference Include="PepperDashCore" Version="2.0.0-beta-379" /> <PackageReference Include="PepperDashCore" Version="2.0.0-beta-383" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -45,8 +45,8 @@
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Crestron.SimplSharp.SDK.Program" Version="2.20.37" /> <PackageReference Include="Crestron.SimplSharp.SDK.Program" Version="2.20.42" />
<PackageReference Include="PepperDashCore" Version="2.0.0-beta-379" /> <PackageReference Include="PepperDashCore" Version="2.0.0-beta-383" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\PepperDash.Essentials.Core\PepperDash.Essentials.Core.csproj" /> <ProjectReference Include="..\PepperDash.Essentials.Core\PepperDash.Essentials.Core.csproj" />