cancel
Showing results for 
Search instead for 
Did you mean: 

Higher .NET version referenced than assembly in code stages

OlavReppen
Level 3
I have built a dll in .NET 7 that I want to target in a code stage. Everything seems to work. Check code even returned sensible error messages when I made a typo referencing a class name. But when I had fixed all errors I had and my code invoking the dll should work fine, I got the following error message when clicking check code:

Description: Compiler error at line 3: Assembly 'ABCDEF' with identity 'ABCDEF, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version than referenced assembly 'System.Runtime' with identity 'System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
Repairable: No

We are using Blue Prism version 6.10.5. Can I make blue prism target .NET 7 for my code stage?

I saw an old post saying Blue Prism was only tested up to .NET 4.8, but the error message seems to indicate we are targeting 4.1.2.

I have .NET runtime version 6 and 7 installed on the computer I am testing on.

------------------------------
Olav Reppen
------------------------------
2 REPLIES 2

ewilson
Staff
Staff
Hello @Olav Reppen,

While you could technically change the .NET target of Blue Prism, I imagine you would void any warranty/support claims. Blue Prism is built with a specific target in mind. If you check the Blue Prism installation folder you'll see there are version-specific instances of various .NET core libraries installed and the various config files are set up with lots of binding redirect statements. 

I'd say you're better off changing the target of your DLL.

Cheers,

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

Downgrading gave me a few issues but I got there in the end. Not being able to run on the latest version was a real gotcha for somebody making their first library to import in BluePrism.

When I finally had something that could run that worked outside BluePrism I experienced that BluePrism froze when I ran it from a code stage. If I tried to close object studio and selected to return to object studio it returned sucessfully and was waiting on the next stage. The problem seems to be that it froze on the first code line where the code in the background ran something async, even though it was not returning it as Task<SomeClassName>. Making my code wait for the result by using .GetAwaiter().GetResult() before returning to BluePrism fixed the issue.

------------------------------
Olav Reppen
------------------------------