Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hard to get the samples to work. #615

Open
1 of 5 tasks
jvanlangen opened this issue Jun 12, 2024 · 6 comments
Open
1 of 5 tasks

Hard to get the samples to work. #615

jvanlangen opened this issue Jun 12, 2024 · 6 comments

Comments

@jvanlangen
Copy link

jvanlangen commented Jun 12, 2024

Type of issue

  • Bug
  • Enhancement
  • Compliance
  • Question
  • Help wanted

Current Behavior

Cloning the repo, launch VS and load an example. Compiler errors....

Expected Behavior

Cloning the repo, launch VS and load an example. No compiler errors.

Steps To Reproduce

Clone the repo, open (for example) the UA Sample Server

Environment

- OS: Windows 11
- Environment: Warm
- Runtime: ones
- Nuget Version: 1.5.374.54
- Component: Server
- Server: yes
- Client: no

Anything else?

Does it look, that this sample is dependend on other samples? Still trying to get it compiled..

@jvanlangen
Copy link
Author

A, found solutions outside the sample directory 🤡

@jvanlangen
Copy link
Author

Too bad:

Metadata file 'C:\Users.....nuget\packages\microsoft.extensions.logging.abstractions\3.1.32\analyzers\dotnet\roslyn4.0\cs\Microsoft.Extensions.Logging.Generators.dll' could not be found.

Why is this needed?

@bbmmcodegirl
Copy link

What's your vs version? Best use the newest one (VS2022 17.x.x, but the solution I checked out was made with 16.0.32901.82).
Open UA SampleApplications.sln .

VS can restore the packages if you use nuget.org as the package source.

Make the server the startup project and just build, it should work.

@NenadSteric
Copy link

NenadSteric commented Jul 19, 2024

With Rider JetBrains Rider 2024.1.4 I cannot compile the UA Sample Applications solution at all.
nuget restore is apparently not able to find the nugets

With VS 2022 i get this errors for the UA Sample Applications solution

Severity Code Description Project File Line Suppression State
Error Two output file names resolved to the same output path: "obj\Debug\Opc.Ua.Client.Controls.BrowseTreeCtrl.resources" UA Client Controls
Error Two output file names resolved to the same output path: "obj\Debug\Opc.Ua.Server.Controls.ExceptionDlg.resources" UA Server Controls
Error Two output file names resolved to the same output path: "obj\Debug\Quickstarts.ReferenceClient.MainForm.resources" Reference Client
Error Two output file names resolved to the same output path: "obj\\Quickstarts.ReferenceServer.MonitoredItemEventLogDlg.resources" Reference Server
Error The target "GetTargetPath" does not exist in the project. UA Sample Client C:\develop\UA-.NETStandard-Samples\Samples\Opc.Ua.Sample\Opc.Ua.Sample.csproj
Error The target "GetTargetPath" does not exist in the project. UA Sample Client C:\develop\UA-.NETStandard-Samples\Samples\Opc.Ua.Sample\Opc.Ua.Sample.csproj

For UA Quickstart Applications I get this error for every project :

Severity Code Description Project File Line Suppression State
Warning Found conflicts between different versions of "Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets" that could not be resolved.
There was a conflict between "Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets, Version=2.1.40.0, Culture=neutral, PublicKeyToken=adb9793829ddae60" and "Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets, Version=2.2.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60".
"Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets, Version=2.1.40.0, Culture=neutral, PublicKeyToken=adb9793829ddae60" was chosen because it was primary and "Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets, Version=2.2.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60" was not.
References which depend on "Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets, Version=2.1.40.0, Culture=neutral, PublicKeyToken=adb9793829ddae60" [C:\Users\nest.nuget\packages\microsoft.aspnetcore.server.kestrel.transport.sockets\2.1.40\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.dll].
C:\Users\nest.nuget\packages\microsoft.aspnetcore.server.kestrel.transport.sockets\2.1.40\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.dll
Project file item includes which caused reference "C:\Users\nest.nuget\packages\microsoft.aspnetcore.server.kestrel.transport.sockets\2.1.40\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.dll".
C:\Users\nest.nuget\packages\microsoft.aspnetcore.server.kestrel.transport.sockets\2.1.40\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.dll
References which depend on or have been unified to "Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets, Version=2.2.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60" [].
C:\Users\nest.nuget\packages\microsoft.aspnetcore.server.kestrel\2.1.3\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.dll
Project file item includes which caused reference "C:\Users\nest.nuget\packages\microsoft.aspnetcore.server.kestrel\2.1.3\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.dll".
C:\Users\nest.nuget\packages\microsoft.aspnetcore.server.kestrel\2.1.3\lib\netstandard2.0\Microsoft.AspNetCore.Server.Kestrel.dll
C:\Users\nest.nuget\packages\opcfoundation.netstandard.opc.ua.bindings.https\1.5.374.78\lib\net48\Opc.Ua.Bindings.Https.dll Boiler Server

can be fixed by removing this from App.config



This warning leads to an runtime error, and the server(s) cannot start.
Why is this included ?

@romanett
Copy link
Contributor

@NenadSteric Can you please try to clone the repository into a clean new folder. I can`t reproduce any of the errors unfortunately

@mregen
Copy link
Contributor

mregen commented Sep 13, 2024

@NenadSteric and @jvanlangen, we bumped to the latest Nuget packages and tested the build of all apps. There were some issues but should be resolved now. Please use the latest VS 2022. Are you maybe using community version or additional add ons (JetBrains)? (Those are not regularly tested)
The build relies on a preview package feed from the opc foundation, defined in Nuget.Config? Could you chekc it works for you?

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

No branches or pull requests

5 participants