Skip to content

Commit

Permalink
Straightened out some publish related paths
Browse files Browse the repository at this point in the history
  • Loading branch information
scottbilas committed Nov 11, 2023
1 parent 80449be commit 98405d2
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
10 changes: 5 additions & 5 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
<OkTargetsRoot>$(OkRoot)targets\</OkTargetsRoot>

<!-- build -->
<OutputPath>$(OkRoot)artifacts\build\bin\$(MSBuildProjectName)\$(Configuration)</OutputPath>
<OkExeOutputPath>$(OkRoot)build\$(MSBuildProjectName)</OkExeOutputPath>
<OkExeOutputPath Condition="'$(Configuration)' == 'Debug'">$(OkExeOutputPath)\$(Configuration)</OkExeOutputPath>
<OkExePublishDir>$(OkRoot)publish\$(MSBuildProjectName)</OkExePublishDir>
<OkExePublishDir Condition="'$(Configuration)' == 'Debug'">$(OkExePublishDir)\$(Configuration)</OkExePublishDir>
<OutputPath>$(OkRoot)artifacts\build\bin\$(MSBuildProjectName)\$(Configuration)</OutputPath><!-- don't add trailing \ here -->
<OkOutputPath>$(OkRoot)build\$(MSBuildProjectName)\</OkOutputPath>
<OkOutputPath Condition="'$(Configuration)' == 'Debug'">$(OkOutputPath)$(Configuration)\</OkOutputPath>
<OkPublishDir>$(OkRoot)publish\$(MSBuildProjectName)\</OkPublishDir>
<OkPublishDir Condition="'$(Configuration)' == 'Debug'">$(OkPublishDir)$(Configuration)\</OkPublishDir>
<BaseIntermediateOutputPath>$(OkRoot)artifacts\build\obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<GenerateDependencyFile>false</GenerateDependencyFile>

Expand Down
9 changes: 8 additions & 1 deletion src/Core/Core.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup><OkFeatures>T4</OkFeatures></PropertyGroup>
<Import Project="$(OkTargetsRoot)Library.targets" />

Expand All @@ -9,6 +9,13 @@
<NoWarn>CS1591</NoWarn>
</PropertyGroup>

<!-- nuget -->
<PropertyGroup>
<GeneratePackageOnBuild>$(_IsPublishing)</GeneratePackageOnBuild>
<Title>Some OK core utility functions</Title>
<RepositoryUrl>https://github.com/scottbilas/OkTools</RepositoryUrl>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="PInvoke.Kernel32" />
<PackageReference Include="PInvoke.NTDll" />
Expand Down
4 changes: 2 additions & 2 deletions targets/Exe.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<OutputPath>$(OkExeOutputPath)</OutputPath>
<OutputPath>$(OkOutputPath)</OutputPath>
<RootNamespace />

<!-- publishing defaults -->
<PublishDir>$(OkExePublishDir)</PublishDir>
<PublishDir>$(OkPublishDir)</PublishDir>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishSingleFile>false</PublishSingleFile>
<SelfContained>false</SelfContained>
Expand Down
6 changes: 6 additions & 0 deletions targets/Library.targets
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<Project>

<!-- global -->

<PropertyGroup>
<PackageOutputPath>$(OkPublishDir)</PackageOutputPath>
</PropertyGroup>

<!-- debug support -->

<PropertyGroup>
Expand Down

0 comments on commit 98405d2

Please sign in to comment.