Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ TestResults
results
BenchmarkDotNet.Artifacts
/app
/mcps
.vs
.vscode
.genaiscript
Expand Down
6 changes: 3 additions & 3 deletions .netconfig
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
url = https://github.com/devlooped/oss/blob/main/.gitignore
sha = a225b7a9f609f26bcc24e0d84f663387be251a7d

etag = 09b499201361a59fad0036e925f4008cdd7bdc6723ba37ff18cc509e6024b2bf
etag = f502a2be3b4155fd86675ef45a4364e598979738128a612deb7db59074f93a51
weak
[file "Directory.Build.rsp"]
url = https://github.com/devlooped/oss/blob/main/Directory.Build.rsp
Expand All @@ -109,13 +109,13 @@
url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.props
sha = dd13ed3334135c30dcb1e3b2295dc7622de298d9

etag = b2b90c6d617db9712cc8be2031b767d3ba951015717984f52b4872cc39f93e72
etag = f1d6384abf18d8d891ce5e835a10c73fe029c42151374be96d7e4af43d189c65
weak
[file "src/Directory.Build.targets"]
url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.targets
sha = 083a37bd9307ec820bac6ee3c7384083151d36d8

etag = 907682e5632a2ba430357e6e042a4ca33cb8c94a3a215d3091aa03f5958a4877
etag = cb83faed0cc8b930a7b6bdc61bea03a54059858cf04353e55fee94d9e3ae0fad
weak
[file "src/Sample/MinimalApi/Ipsum.cs"]
url = https://github.com/devlooped/catbag/blob/main/System/Ipsum.cs
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ OSMF tier. A single fee covers all of [Devlooped packages](https://www.nuget.org
[![Seika Logiciel](https://avatars.githubusercontent.com/u/2564602?v=4&s=39 "Seika Logiciel")](https://github.com/SeikaLogiciel)
[![Andrew Grant](https://avatars.githubusercontent.com/devlooped-user?s=39 "Andrew Grant")](https://github.com/wizardness)
[![eska-gmbh](https://avatars.githubusercontent.com/devlooped-team?s=39 "eska-gmbh")](https://github.com/eska-gmbh)
[![Geodata AS](https://avatars.githubusercontent.com/u/5946299?v=4&s=39 "Geodata AS")](https://github.com/geodata-no)


<!-- sponsors.md -->
Expand Down
3 changes: 3 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
<!-- See https://learn.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#prunepackagereference-specification -->
<RestoreEnablePackagePruning>true</RestoreEnablePackagePruning>

<!-- Needed to improve nuget default for empty PackageId. Workaround for https://github.com/NuGet/Home/issues/14928 -->
<ImportNuGetBuildTasksPackTargetsFromSdk>false</ImportNuGetBuildTasksPackTargetsFromSdk>
</PropertyGroup>

<PropertyGroup Label="Build">
Expand Down
16 changes: 16 additions & 0 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,22 @@
<IsPackable Condition="'$(PackageId)' != ''">true</IsPackable>
</PropertyGroup>

<PropertyGroup>
<!-- Save original PackageId to restore post-import -->
<_PackageId>$(PackageId)</_PackageId>
<!-- Since we set ImportNuGetBuildTasksPackTargetsFromSdk=false, the Sdk.targets doesn't even provide the path for this property :/ -->
<NuGetBuildTasksPackTargets Condition="'$(NuGetBuildTasksPackTargets)' == ''">$(MSBuildSDKsPath)\..\NuGet.Build.Tasks.Pack.targets</NuGetBuildTasksPackTargets>
</PropertyGroup>

<Import Project="$(NuGetBuildTasksPackTargets)" Condition="Exists('$(NuGetBuildTasksPackTargets)')"/>

<PropertyGroup>
<!-- Revert the forced PackageId by the NuGet SDK targets for non-packable projects, see https://github.com/NuGet/Home/issues/14928 -->
<PackageId Condition="'$(IsPackable)' == 'false'">$(_PackageId)</PackageId>
<!-- If no PackageId was originally provided, ensure IsPackable is false -->
<IsPackable Condition="'$(_PackageId)' == ''">false</IsPackable>
</PropertyGroup>

<ItemGroup Condition="'$(IsPackable)' == 'true'" Label="NuGet">
<!-- This is compatible with nugetizer and SDK pack -->
<!-- Only difference is we don't copy either to output directory -->
Expand Down
Loading