Skip to content

Adding install requirement for this package to be v14 rc3 at least#4

Merged
warrenbuckley merged 2 commits intowarrenbuckley:mainfrom
nul800sebastiaan:patch-1
May 8, 2024
Merged

Adding install requirement for this package to be v14 rc3 at least#4
warrenbuckley merged 2 commits intowarrenbuckley:mainfrom
nul800sebastiaan:patch-1

Conversation

@nul800sebastiaan
Copy link
Copy Markdown
Contributor

ExaminePeek has dependencies that you would think should exclude pre-v14 installs https://github.com/warrenbuckley/Examine-Peek/blob/main/ExaminePeek/ExaminePeek.csproj#L33-L35

You can see the requirements: https://www.nuget.org/packages/ExaminePeek#dependencies-body-tab

However, since my Umbraco site doesn't have Umbraco.Cms.Api.Common, Umbraco.Cms.Api.Management nor Umbraco.Cms.Web.Website directly installed, the package installs into v13 without complaining. Of course the v13 site stops building after that.

I found that specifying <PackageReference Include="Umbraco.Cms" Version="14.0.0-rc3" /> in the csproj file will output in the NuGet file the requirement needed, start at v14.0.0-rc3 and allow installs in any version higher than that.

I haven't limited it further @warrenbuckley since I would assume that this package will still work in v15 and 16.. if you want to limit it further, for example exclusively to v14 and anything under v15 then you can use <PackageReference Include="Umbraco.Cms" Version="[14.0.0-rc3,15.0.0]" /> instead. Up to you.

@nul800sebastiaan
Copy link
Copy Markdown
Contributor Author

Unfortunately this will cause these 2 files to be added and 1 to be modified:

image

While you technically don't need the Umbraco.Cms dependency in this project, it helps you avoid having to faff about with a .nuspec file. Adding these files is a fair trade-off for me.

@nul800sebastiaan
Copy link
Copy Markdown
Contributor Author

Turns out the other references were no longer needed, as you noted on Discord @warrenbuckley! Updated the PR.

Also you already had these appsettings files in there, so my previous comment does not affect you, just my own package 😉

@warrenbuckley
Copy link
Copy Markdown
Owner

Thanks @nul800sebastiaan 😍

@warrenbuckley warrenbuckley merged commit d569f43 into warrenbuckley:main May 8, 2024
@nul800sebastiaan nul800sebastiaan deleted the patch-1 branch May 8, 2024 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants