DllExporterNet4 seems to work on dotNET 4.0. PWE uses 3.5 and 4.5.
Unless I'm missing something DllExporterNet4 should use the latest installed version or something.
But I ended up just using COM-Interop and is easy to setup anyway.
I'm not sure if you tried the sample code I provided here: https://github.com/DanWilliamsAtBentleyDotCom/Sample-Calling-CSharp-Code-From-Mrr-File
And I'm not sure what you mean by "DllExporterNet4 seems to work with dotNET 4.0. PWE uses 3.5 and 4.5."
Does DllExporterNet4 not work with 4.0? Not sure if that actually matters as I have my sample set to compile the managed code part with .NET 4.5.2 and it works, and the results interact with PWE just fine, at least the last time I tested it.
What versions of ProjectWise are you using? (PWE, SDK, and Server)
What version and edition of Visual Studio are you using? I used VS 2015 Pro for my testing. Any version of VS 2015 or higher should work, but officially, VS 2015 is the supported version for the current release of ProjectWise SDK. Perhaps there is some dependency issues if you are using something earlier or later?
Looking at my sample code, I see this configuration, and it compiles and runs:
COM is an option, but I haven't used it since the very early days of .NET, so I can't really help on that topic.
I got an error while using DllExporterNet4. I bet you have the path on you computer:
Cannot locate C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\ildasm.exe
PWE 10.00.03.280 SDK 10.00.3140
So far COM is working fine with OLE.