Skip to content

Add Sample Projects Overview to README and fix CI build pipeline#684

Open
Copilot wants to merge 3 commits intomasterfrom
copilot/add-descriptions-to-sample-projects
Open

Add Sample Projects Overview to README and fix CI build pipeline#684
Copilot wants to merge 3 commits intomasterfrom
copilot/add-descriptions-to-sample-projects

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 14, 2026

Users had no quick way to identify which sample project matched their use case (e.g., already have an external OPC UA server running and just need a client). Additionally, the "Build Solutions" CI job was failing due to a NuGetCommand@2 restore limitation with OS-conditional MSBuild properties.

Proposed changes

  • README.md: Added a new ## Sample Projects Overview section with two scannable tables:

    • Core Samples (Samples/) — ReferenceServer, ReferenceClient, UA Sample Server/Client (.NET 4.6), GDS Server/Client variants; each row has project link, Server/Client type badge, and a one-line description of purpose
    • Quickstart Workshop Samples (Workshop/) — all 25 workshop projects (Aggregation, AlarmCondition, Boiler, DataAccess, DataTypes, HistoricalAccess, HistoricalEvents, Methods, PerfTest, SimpleEvents, UserAuthentication, Views, Empty) with the same format
    • Added a callout block directly addressing the common case: if you already have an external OPC UA server (e.g. KepServerEX), skip the server samples and point ReferenceClient at your endpoint
  • .azurepipelines/sln.yml: Fixed the "Build Solutions" CI job failure by replacing NuGetCommand@2 command: restore (classic nuget.exe CLI) with MSBuild@1 /t:Restore /p:RestoreForceEvaluate=true. The classic nuget.exe CLI does not reliably evaluate OS-conditional MSBuild properties (specifically $([MSBuild]::IsOsPlatform('Windows')) in targets.props), causing Opc.Ua.Sample.csproj to be resolved without its net48 target framework, making it incompatible with the net48-targeting Client.Net4 and Server.Net4 projects (NU1201). Using MSBuild's native restore target ensures all property imports are correctly evaluated. The now-unused NuGetToolInstaller@1 step was also removed.

Related Issues

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which adds functionality)
  • Test enhancement (non-breaking change to increase test coverage)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected, requires version increase of Nuget packages)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc.
  • I have signed the CLA.
  • I ran tests locally with my changes, all passed.
  • I fixed all failing tests in the CI pipelines.
  • I fixed all introduced issues with CodeQL and LGTM.
  • I have added tests that prove my fix is effective or that my feature works and increased code coverage.
  • I have added necessary documentation (if appropriate).
  • Any dependent changes have been merged and published in downstream modules.

Further comments

Table entries were verified against actual directories in the repo; references to NetCoreConsoleServer/NetCoreConsoleClient (present in existing README prose but no longer in the repo) were intentionally excluded from the new tables.

The CI fix uses MSBuild@1 /t:Restore instead of NuGetCommand@2 command: restore because MSBuild's restore target fully evaluates all MSBuild property imports — including the OS-conditional DotNetTargetFramework property that adds net48; to LibTargetFrameworks on Windows — whereas classic nuget.exe restore may not evaluate these conditions consistently across tool versions.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add some brief to each project</issue_title>
<issue_description> Add some descriptions to sample projects,so can quick find the project you need.
Like I have open KepServer as a UPCUA server,don't need to open a server again. which project should I run?</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

…s for each project

Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
Copilot AI changed the title [WIP] Add brief descriptions to each project Add Sample Projects Overview to README for quick project discovery Mar 14, 2026
Copilot AI requested a review from romanett March 14, 2026 09:18
@romanett romanett marked this pull request as ready for review March 14, 2026 09:36
@romanett
Copy link
Copy Markdown
Contributor

@copilot please fix the build Pipelines so CI passes

Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Mar 14, 2026

@copilot please fix the build Pipelines so CI passes

Fixed in commit 178878d.

The "Build Solutions" job was failing because NuGetCommand@2 command: restore (classic nuget.exe CLI) does not reliably evaluate OS-conditional MSBuild properties — specifically $([MSBuild]::IsOsPlatform('Windows')) in targets.props. This caused Opc.Ua.Sample.csproj to be seen as only targeting netstandard2.1;net8.0;net10.0 (missing net48), making it incompatible with the net48-targeting Client.Net4 and Server.Net4 projects and producing NU1201.

The fix replaces both NuGetCommand@2 command: restore steps in .azurepipelines/sln.yml with MSBuild@1 /t:Restore /p:RestoreForceEvaluate=true, which uses MSBuild's native restore target and correctly evaluates all MSBuild property imports including OS-conditional ones. The now-unused NuGetToolInstaller@1 step was also removed.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • crl.entrust.net
    • Triggering command: /usr/bin/dotnet dotnet build UA Sample Applications.sln --configuration Release (dns block)
  • ocsp.entrust.net
    • Triggering command: /usr/bin/dotnet dotnet build UA Sample Applications.sln --configuration Release (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Add Sample Projects Overview to README for quick project discovery Add Sample Projects Overview to README and fix CI build pipeline Mar 14, 2026
Copilot AI requested a review from romanett March 14, 2026 14:39
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.

Add some brief to each project

2 participants