|
@@ -1,4 +1,4 @@
|
|
|
-<Project Sdk="Microsoft.NET.Sdk">
|
|
|
+<Project Sdk="Microsoft.NET.Sdk">
|
|
|
<!-- =================================================================== -->
|
|
|
<!-- Version numbers -->
|
|
|
<!-- Automatically updated by gitversion (run `dotnet-gitversion /updateprojectfiles`) -->
|
|
@@ -142,4 +142,36 @@
|
|
|
<Authors>Miguel de Icaza, Tig Kindel (@tig), @BDisp</Authors>
|
|
|
</PropertyGroup>
|
|
|
<ProjectExtensions><VisualStudio><UserProperties resources_4config_1json__JsonSchema="../../docfx/schemas/tui-config-schema.json" /></VisualStudio></ProjectExtensions>
|
|
|
+
|
|
|
+ <Target Name="CopyNuGetPackagesToLocalPackagesFolder"
|
|
|
+ AfterTargets="Pack"
|
|
|
+ Condition="'$(Configuration)' == 'Release'">
|
|
|
+ <PropertyGroup>
|
|
|
+ <!-- Define the path for local_packages relative to the project directory -->
|
|
|
+ <LocalPackagesPath>$(MSBuildThisFileDirectory)..\local_packages\</LocalPackagesPath>
|
|
|
+ <!-- Output path without framework-specific folders -->
|
|
|
+ <PackageOutputPath>$(MSBuildThisFileDirectory)bin\$(Configuration)\</PackageOutputPath>
|
|
|
+ </PropertyGroup>
|
|
|
+
|
|
|
+ <!-- Ensure the local_packages folder exists -->
|
|
|
+ <Message Text="Checking if $(LocalPackagesPath) exists, creating if necessary." Importance="high" />
|
|
|
+ <MakeDir Directories="$(LocalPackagesPath)" />
|
|
|
+
|
|
|
+ <!-- Collect .nupkg and .snupkg files into an item group -->
|
|
|
+ <ItemGroup>
|
|
|
+ <NuGetPackages Include="$(PackageOutputPath)*.nupkg;$(PackageOutputPath)*.snupkg" />
|
|
|
+ </ItemGroup>
|
|
|
+
|
|
|
+ <!-- Check if any packages were found -->
|
|
|
+ <Message Text="Found packages: @(NuGetPackages)" Importance="high" />
|
|
|
+
|
|
|
+ <!-- Copy files only if found -->
|
|
|
+ <Copy SourceFiles="@(NuGetPackages)"
|
|
|
+ DestinationFolder="$(LocalPackagesPath)"
|
|
|
+ SkipUnchangedFiles="false"
|
|
|
+ Condition="@(NuGetPackages) != ''" />
|
|
|
+
|
|
|
+ <!-- Log success -->
|
|
|
+ <Message Text="Copy completed successfully." Importance="high" />
|
|
|
+ </Target>
|
|
|
</Project>
|