Avalonia
Avalonia copied to clipboard
A special target for testing local nuget builds
It is sometimes needed to quickly test local changes against an app that consumes nuget packages.
This PR allows to quickly update 9999.0.0-localbuild
version in nuget cache from the current source.
(incremental build)
═══════════════════════════════════════════════════════
Target Status Duration
───────────────────────────────────────────────────────
GenerateCppHeaders Skipped // SkipReason: skipping CompileNative
Clean Skipped // SkipReason: via --skip parameter
CompileNative Skipped // SkipReason: EnvironmentInfo.IsOsx
CompileHtmlPreviewer Skipped // SkipReason: via --skip parameter
Compile Skipped // SkipReason: via --skip parameter
CreateIntermediateNugetPackages Succeeded 0:31
CreateNugetPackages Succeeded 0:09
BuildToNuGetCache Succeeded < 1sec
───────────────────────────────────────────────────────
Total 0:41
═══════════════════════════════════════════════════════
You can test this PR using the following package version. 11.1.999-cibuild0044309-beta
. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.1.999-cibuild0044733-beta
. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.1.999-cibuild0045477-beta
. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
@kekekeks:
- does this allow to locally debug into Avalonia code?
- how would I run this locally to have the version in the local nuget cache?
- The app itself - I guess - I would then target to
9999.0.0-localbuild
, right?
@llfab
You need to run nuke BuildToNuGetCache
in the repository root to get these packages.
After that - just include Avalonia as you usually do from nuget, but with 9999.0.0-localbuild
version.
The main point of this feature is to be able to quickly debug local Avalonia code changes, without waiting for Nightly NuGet builds. Debugging experience shouldn't be really different from typical NuGet (though, not sure how SourceLink symbols would work here).
Updated build instructions to include this command https://github.com/AvaloniaUI/Avalonia/blob/master/Documentation/build.md
Indeed I am looking for an Option to debug into Avalonia code and set breakpoints there. Seems this would not be possible with this option right?
I also thought about .props magic to easily switch between nuget packs and Avalonia repo csproj. That would be easy but then the Avalonia csproj would need to be "injected" into the solution. Not sure if that can be done.
So: would the above local packs option allow for setting breakpoints into Av code?
You can debug your app directly from Avalonia solution that way.
- open avalonia desktop slnf
- build to nuget cache
- add your executable like this:
- remove "build solution":
- run
Breakpoints should work.
I came up with this here which works nicely for me: https://github.com/AvaloniaUI/Avalonia/discussions/14819