From 5119e8dffcbef00641f8e569ee9ec5646c0a1dc1 Mon Sep 17 00:00:00 2001 From: Recolic <git@me.recolic.net> Date: Tue, 7 May 2024 22:19:48 +0000 Subject: [PATCH] Update README.md --- README.md | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 467df42..7099dfe 100644 --- a/README.md +++ b/README.md @@ -28,26 +28,15 @@ To avoid the annoying login, goto `DevOps -> TopRightCorner -> Settings -> Perso then create a new token, select `All accessible organizations`, and allow permission `Packaging/read`. Save the token for future usage. -> It's ok to use `nuget` instead of dotnet 5.0. Just give my a valid `nuget.config` and openxt is happy! +> It's ok to use `nuget` instead of dotnet 5.0. Just give a valid `nuget.config` and openxt is happy! Then use `dotnet nuget add` to add all sources your need. This is an example: ```bash -dotnet nuget add source "https://msazure.pkgs.visualstudio.com/_packaging/Official/nuget/v3/index.json" --name MSAzure --username bensl --password "xbwejuparq4ighqs_Your_Token_Here_qshql2uy3woi73ew6iq" --store-password-in-clear-text +dotnet nuget add source "https://msazure.pkgs.visualstudio.com/_packaging/Official/nuget/v3/index.json" --name MSAzure --username YOUR_ALIAS --password "xbwejup___Your_DevOps_PAT_Token_Here___73ew6iq" --store-password-in-clear-text ``` -For convenience, this is some common nuget source for O365 developers: - -```xml -<packageSources> - <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> - <add key="MSAzure" value="https://msazure.pkgs.visualstudio.com/_packaging/Official/nuget/v3/index.json" /> - <add key="Official@Local" value="https://msazure.pkgs.visualstudio.com/_packaging/Official%40Local/nuget/v3/index.json" /> - <add key="O365Core" value="https://o365exchange.pkgs.visualstudio.com/_packaging/Common/nuget/v3/index.json" /> - <add key="M365FleetAGC" value="https://o365exchange.pkgs.visualstudio.com/959adb23-f323-4d52-8203-ff34e5cbeefa/_packaging/M365FleetAGC/nuget/v3/index.json" /> - <add key="Skype" value="https://skype.pkgs.visualstudio.com/DefaultCollection/_packaging/csc/nuget/v3/index.json" /> -</packageSources> -``` +Refer to `corext.config` for repo URLs used by your project. Good. Check your `~/.nuget/NuGet/NuGet.Config` to make sure nothing goes wrong. @@ -58,14 +47,19 @@ Good. Check your `~/.nuget/NuGet/NuGet.Config` to make sure nothing goes wrong. Init or sync your `local nuget repo` with the following command: ```bash +# load package list from csproj files openxt sync --project-dir "~/code/Azure-Deployment-Builder" --local-repo-dir "/mnt/hdd/CxCache" +# or load from packages.config +openxt sync2 --project-dir "~/code/vfp/windows" --local-repo-dir "/mnt/hdd/CxCache" ``` +Refer to FAQ to learn the difference between sync/sync2. + > It's OK for multiple projects to share one local-repo-dir. > It's OK to set --project-dir to a small sub-project, instead of the huge ControlPlane. -#### 3. Use OpenXT to develop or build your project +#### 3. Use OpenXT to develop or build your project (C-Sharp project only) > There's outdated syntax in many csproj files, which prevents your project to build in .NET 5. > This IS NOT a OpenXT issue, read [doc/csproj-compliance-net5.md](doc/csproj-compliance-net5.md) for more detail. @@ -105,6 +99,14 @@ Linux Bare-Metal (W-2123, 32G-DDR4-2666MHz, SATA SSD). Windows defender has been ## FAQ +- What's the difference of sync / sync2? + +`openxt sync` parse package list from csproj files, which can be inaccurate, and unuseable for non-csharp project. + +`openxt sync2` parse package list from `packages.config`, which is more universal and reliable. But some team didn't maintain it correctly. + +If your package list are maintained in `corext.config`, just extract `packages.config` with `sed -n '/<packages>/,/<\/packages>/p' $filename`. + - How do I build ControlPlane with OpenXT? OpenXT is not a build management tool, and we use dotnet 5.0 to build projects. -- GitLab