enlight / klawr

A set of Unreal Engine 4 plugins that enable the use of C# (and other CLI languages) in game projects targeting the Windows platform.
MIT License
83 stars 22 forks source link

You cant create new c++ project if Klawr plugin enabled #50

Open ihavenick opened 8 years ago

ihavenick commented 8 years ago

I tried to open new c++ project and get this error.

Running D:/4.10/Engine/Binaries/DotNET/UnrealBuildTool.exe  -projectfiles -project="C:/Users/ihavenick/Documents/Unreal Projects/MyProject3/MyProject3.uproject" -game -engine -progress -2015
Discovering modules, targets and source code for game...
KlawrClrHostNative Target.Configuration: Release
Klawr libnamakesme: Klawr.ClrHost.Native-x64-Release.lib
ERROR: Exception thrown while processing dependent modules of KlawrRuntimePlugin
ERROR: Unable to instantiate instance of 'KlawrClrHostNative' object type from compiled assembly 'MyProject3ModuleRules'.  Unreal Build Tool creates an instance of your module's 'Rules' object in order to find out about your module's requirements.  The CLR exception details may provide more information:  System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.IOException: The process cannot access the file '../../Engine/Binaries\Win64\Klawr.ClrHost.Managed.dll' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
   at KlawrClrHostNative..ctor(TargetInfo Target) in d:\4.10\Engine\Source\ThirdParty\Klawr\ClrHostNative\KlawrClrHostNative.Build.cs:line 72
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, Object[] args)
   at UnrealBuildTool.RulesCompiler.RulesAssembly.CreateModuleRules(String ModuleName, TargetInfo Target, String& ModuleFileName) in D:\4.10\Engine\Source\Programs\UnrealBuildTool\System\RulesCompiler.cs:line 1417
Algorithman commented 8 years ago

And it doesnt happen to blueprint projects. Interesting. But a try/catch should work. It wants to overwrite the dll in use. At this point there shouldnt be any differences in the dll.

Algorithman commented 8 years ago

You can use this commit ( https://github.com/Algorithman/klawr/commit/8a2a43ce9dba153f5b3df4eea2f6cc9ce77cf18e )