![]() |
|
StaadPro.Interop NuGet: install, connect and choose the right preview - Printable Version +- StruXllence Community (https://forum.struxllence.com) +-- Forum: Structural Engineering Exchange (https://forum.struxllence.com/forumdisplay.php?fid=1) +--- Forum: Engineering Automation & BIM (https://forum.struxllence.com/forumdisplay.php?fid=5) +--- Thread: StaadPro.Interop NuGet: install, connect and choose the right preview (/showthread.php?tid=2) |
StaadPro.Interop NuGet: install, connect and choose the right preview - cofounder - 11-02-2026 Installing StaadPro.Interop from NuGet: requirements, first connection and version checks This thread covers consuming StaadPro.Interop in an application. It complements the repository overview, which focuses on architecture, source builds and contributions. Package: StaadPro.Interop on NuGet Verified public version, checked 2 November 2026: 1.0.0-preview.20261102.1 Current repository: StruXllence/StaadPro.Interop 1. What is installed? StaadPro.Interop is a strongly typed managed wrapper for STAAD.Pro's OpenSTAAD interface. The verified public archive contains the net481 assembly, XML documentation and accompanying guides. Its metadata declares Newtonsoft.Json 13.0.3 as a dependency. NuGet normally restores the dependency automatically. The package does not install STAAD.Pro, supply a Bentley license or replace the native structural-analysis engine. Installing the DLL successfully does not establish that an OpenSTAAD session is available or that a particular native operation is supported by the installed STAAD build. 2. Requirements before running the sample
The main package's target framework is net481. A recent .NET SDK does not make a net8.0 application compatible with that asset. The separately named Core.Testing preview has a different purpose; do not substitute it silently or reference both packages as if they were independent assemblies. 3. Install an exact public version For a suitable existing project: Code: dotnet add YourApp.csproj package StaadPro.Interop --version 1.0.0-preview.20261102.1 --source https://api.nuget.org/v3/index.json
dotnet restore YourApp.csproj
dotnet build YourApp.csproj -c ReleaseThe relevant project settings are: Code: <PropertyGroup>
<TargetFramework>net481</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="StaadPro.Interop"
Version="1.0.0-preview.20261102.1" />
</ItemGroup>In Visual Studio, open Manage NuGet Packages, select nuget.org, enable Include prerelease, search for StaadPro.Interop and choose the exact version. In Package Manager Console: Code: Install-Package StaadPro.Interop -Version 1.0.0-preview.20261102.1 -Source https://api.nuget.org/v3/index.jsonPinning a preview version makes a build reproducible. Check the release notes before upgrading, then rebuild and restart the consuming application so it actually loads the new DLL. 4. First connection: read the model path Code: using System;
using StaadPro.Interop.Services;
internal static class Program
{
[STAThread]
private static void Main()
{
using (var wrapper = OpenStaadWrapperProvider.GetRunning())
{
if (wrapper == null)
{
Console.WriteLine("No usable running OpenSTAAD session was found.");
return;
}
Console.WriteLine(wrapper.Root.GetStaadFileFullPath());
}
}
}Start with read-only queries, confirm the connected model and make units explicit. Use the selected version's IntelliSense and guides for Geometry, Load, Property, Output and the other adapters. Keep StaadPro.Interop.xml beside the DLL if copying assemblies outside the normal NuGet restore process. 5. How to distinguish a public release from a prepared archive The public feed can be checked directly: Code: $feed = Invoke-RestMethod 'https://api.nuget.org/v3-flatcontainer/staadpro.interop/index.json'
$feed.versionsAt the time of this post, the latest listed public version is 1.0.0-preview.20261102.1. This exact version is listed in the feed and its archive was downloaded for the checks behind this post. For future releases, do not treat a local archive, README or package-cache entry as proof that a version is downloadable from nuget.org. For troubleshooting a feed issue, restore into a fresh package-cache directory with an explicit NuGet.Config containing the intended source. Avoid changing package IDs merely because a version has not been published. 6. Common problems and what to check
7. Preview scope, licensing and responsible use This is a preview. Managed tests and documented examples do not certify all live COM behavior or engineering acceptance. Native model changes can have partial effects; save a separate controlled copy before trying mutation workflows, and do not assume that disposing a wrapper saves or closes STAAD.Pro. The downloaded 1.0.0-preview.20261102.1 archive declares Apache License 2.0 and StruXllence copyright in its NuGet metadata, and retains a notice for MIT-origin code. Earlier public versions, including 1.0.0-preview.20261028.4, shipped under their original terms. Follow the notices shipped with your exact package or source revision rather than assuming that current main-branch metadata describes every older release. StaadPro.Interop is independent of Bentley Systems and is not an officially endorsed Bentley SDK. Bentley software and licensing remain separate. For a package defect, open a reproducible GitHub issue with versions and a minimal nonconfidential example. For workflow questions, continue the discussion here and describe the engineering checks you need. |