# Is it possible to use .net assemblies in ue4 like this?

**URL:** <https://forums.unrealengine.com/t/is-it-possible-to-use-net-assemblies-in-ue4-like-this/455759>\
**Category:** Community & Industry Discussion\
**Tags:** dll, Networking, buildcs, linker-error, unreal-engine, CPP, question\
**Created:** [September 21, 2019, 7:16pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-use-net-assemblies-in-ue4-like-this/455759 "2019-09-21T19:16:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JackJack321](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JackJack321](https://forums.unrealengine.com/u/JackJack321)\
**Post date:** [September 21, 2019, 7:16pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-use-net-assemblies-in-ue4-like-this/455759/1 "2019-09-21T19:16:06Z")

</div>

I’m linking to the page that shows what I want to do:

> **[\#using directive (C++/CLI)](https://docs.microsoft.com/en-us/cpp/preprocessor/hash-using-directive-cpp?view=msvc-170&viewFallbackFrom=vs-2019)**
>
> Learn more about: #using directive (C++/CLI)

basically I have a few .net assemblies that I want to be able to use types and functions from in a cpp actor in ue4.  
How would I enable the /clr flag in ue4? I’ve looked into the build.cs file briefly but I’m pretty confused as to where to go from there since it seems I need to set "CompileEnvironment.Config.CLRMode == CPPCLRMode.CLREnabled " somewhere but not sure where exactly.

I’ve also followed the linking dll tutorial on the ue4 wiki and it works but unfortunately I also need to use types from the dll not just call functions that exist in it.

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

Thanks any help is greatly appreciated.

---

<div class="post-metadata">

**Author:** ![JackJack321](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JackJack321](https://forums.unrealengine.com/u/JackJack321)\
**Post date:** [September 21, 2019, 7:18pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-use-net-assemblies-in-ue4-like-this/455759/2 "2019-09-21T19:18:38Z")

</div>

to clarify there are no header files or .lib files

---

<div class="post-metadata">

**Author:** ![JackJack321](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JackJack321](https://forums.unrealengine.com/u/JackJack321)\
**Post date:** [October 8, 2019, 3:40pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-use-net-assemblies-in-ue4-like-this/455759/3 "2019-10-08T15:40:10Z")

</div>

Figured out a work around for now. I’m using unreal engine python plugin in addition to pythonnet to import the .net assemblies and do what I need with them in a python script that sends the data back to a pyactor blueprint. If anybody can figure out a way to do it in just cpp though that’d be more ideal since now I have to include embedded python and etc in my binaries folder for packaging.
