gui-cs / Terminal.Gui

Cross Platform Terminal UI toolkit for .NET
MIT License
9.65k stars 688 forks source link

Can't build `v2_develop` RELEASE - "The local source 'C:\Users\Tig\s\gui-cs\Terminal.Gui\local_packages' doesn't exist." #3790

Open tig opened 5 days ago

tig commented 5 days ago

image

@BDisp please help!

tig commented 5 days ago

If I md local_packages I get this:

image

BDisp commented 5 days ago

@tig the reason for the error is because you didn't run any of the PackTerminalGui.ps1 for Windows or PackTerminalGui.sh for Linux/Mac, on any of the NativeAot or SelfContained projects, and thus the local_packages folder doesn't been created yet. After you run any of them this doesn't happen again, unless you delete the local_packages folder and the C:\Users\<user>\.nuget\packages\terminal.gui\2.0.0 folder. You are better than me and perhaps you can add some documentation for these particular two projects when a release build is i action. Sorry and thanks.

BDisp commented 5 days ago

The advantage of this is that when NativeAot or SelfContained is being build in release mode it will use a updated local nuget package. Using the project automation, the restore will always run first and the local nuget packages will be outdated. But if you have other better idea for this, advance with it.

tig commented 5 days ago

@tig the reason for the error is because you didn't run any of the PackTerminalGui.ps1 for Windows or PackTerminalGui.sh for Linux/Mac, on any of the NativeAot or SelfContained projects, and thus the local_packages folder doesn't been created yet. After you run any of them this doesn't happen again, unless you delete the local_packages folder and the C:\Users\<user>\.nuget\packages\terminal.gui\2.0.0 folder. You are better than me and perhaps you can add some documentation for these particular two projects when a release build is i action. Sorry and thanks.

Is there some way the Terminal.sln file can have a built-in build step that does all this?

I assert that if a new contributor to the project they should be able to:

git clone https://github.com/gui-cs/Terminal.Gui
cd Terminal.Gui
dotnet build -c Release

Without doing any additional steps or reading documentation.

BDisp commented 4 days ago

Is there some way the Terminal.sln file can have a built-in build step that does all this?

I assert that if a new contributor to the project they should be able to:

git clone https://github.com/gui-cs/Terminal.Gui
cd Terminal.Gui
dotnet build -c Release

Without doing any additional steps or reading documentation.

I did my best. I would preferred to fix this without add the local_packages folder but I couldn't figure how to do that. I spent a lot of time to find that approach without success. Adding the local_packages folder was the working solution I could find. So, this way a user that clone the repository can build without issues in release mode.