Skip to content

Commit

Permalink
- use build folder as output target folder for tasks assembly
Browse files Browse the repository at this point in the history
- ensure deps are packaged
  • Loading branch information
Cryptoc1 committed Jan 4, 2024
1 parent 8c29e1b commit fa904ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/LethalCompany.Plugin.Sdk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
<BuildOutputTargetFolder>tasks</BuildOutputTargetFolder>
<BuildOutputTargetFolder>build</BuildOutputTargetFolder>
<CopyLocalLockFileAssemblies Condition=" '$(TargetFramework)' != 'net472' ">true</CopyLocalLockFileAssemblies>
<DevelopmentDependency>true</DevelopmentDependency>
<Description>A MSBuild Sdk for creating Lethal Company mods.</Description>
Expand Down Expand Up @@ -84,4 +84,11 @@
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<Target Name="IncludeReferenceCopyLocalPathsInBuildOutputInPackage" BeforeTargets="_GetBuildOutputFilesWithTfm" DependsOnTargets="ResolveReferences;ResolvePackageDependenciesForBuild">
<ItemGroup>
<BuildOutputInPackage Include="@(RuntimeCopyLocalItems->WithMetadataValue('AssetType', 'runtime'))" TargetPath="%(RuntimeCopyLocalItems.DestinationSubDirectory)%(Filename)%(Extension)" />
<BuildOutputInPackage Include="@(RuntimeCopyLocalItems->WithMetadataValue('CopyLocal', 'true'))" TargetPath="%(RuntimeCopyLocalItems.DestinationSubDirectory)%(Filename)%(Extension)" />
</ItemGroup>
</Target>

</Project>
2 changes: 1 addition & 1 deletion src/Sdk/Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<PropertyGroup Condition=" '$(PluginSdkAssembly)' == '' ">
<PluginSdkAssemblyDir Condition=" '$(PluginSdkAssemblyDir)' == '' ">..\tasks\</PluginSdkAssemblyDir>
<PluginSdkAssemblyDir Condition=" '$(PluginSdkAssemblyDir)' == '' ">..\build\</PluginSdkAssemblyDir>
<PluginSdkAssembly Condition=" '$(MSBuildRuntimeType)' == 'Core' ">$(PluginSdkAssemblyDir)net8.0\LethalCompany.Plugin.Sdk.dll</PluginSdkAssembly>
<PluginSdkAssembly Condition=" '$(MSBuildRuntimeType)' != 'Core' ">$(PluginSdkAssemblyDir)net472\LethalCompany.Plugin.Sdk.dll</PluginSdkAssembly>
</PropertyGroup>
Expand Down

0 comments on commit fa904ee

Please sign in to comment.