Can't build C++ project located on network drive

On a Windows 8.1 machine, I mapped a network drive (a mac with file sharing enabled) to M:\

I was able to create and play a new BP project on this drive from the Windows machine with no issues.

If I try to create a C++ project, I get the error message below, when UE tries to build the source.

Sorry about the language, my Windows only speaks German.

This is the relevant error in english: http://docs.telerik.com/teststudio/troubleshooting-guide/test-execution-problems-tg/network-dll-access-net4-0

My reason for trying to do this:
The mac is my main dev machine. Occassionally I’d like to playtest or debug on Windows too. To avoid having to copy the project every time, I set up the network drive.

An error occurred while trying to generate project files.

Running C:/Program Files/Epic Games/4.9/Engine/Binaries/DotNET/UnrealBuildTool.exe  -projectfiles -project="M:/Desktop/CPPTest/CPPTest.uproject" -game -rocket -progress
Discovering modules, targets and source code for game...
UnrealBuildTool Exception: System.IO.FileLoadException: Die Datei oder Assembly "file:///M:\Desktop\CPPTest\Intermediate\Build\BuildRules\RocketUE4ModuleRules.dll" oder eine Abhängigkeit davon wurde nicht gefunden. Der Vorgang wird nicht unterstützt. (Ausnahme von HRESULT: 0x80131515)
Dateiname: "file:///M:\Desktop\CPPTest\Intermediate\Build\BuildRules\RocketUE4ModuleRules.dll" ---> System.NotSupportedException: Es wurde versucht, eine Assembly von einer Netzwerkadresse zu laden, was in früheren Versionen von .NET Framework zum Ausführen der Assembly als Sandkastenassembly geführt hätte. In dieser Version von .NET Framework wird die CAS-Richtlinie standardmäßig nicht aktiviert, dieser Ladevorgang kann daher gefährlich sein. Wenn Sie nicht beabsichtigen, durch diesen Ladevorgang eine Sandkastenassembly zu erstellen, aktivieren Sie den loadFromRemoteSources-Schalter. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkId=155569".
   bei System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   bei System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   bei System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence assemblySecurity)
   bei System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
   bei UnrealBuildTool.DynamicCompilation.CompileAssembly(String OutputAssemblyPath, List`1 SourceFileNames, List`1 ReferencedAssembies, List`1 PreprocessorDefines, Boolean TreatWarningsAsErrors)
   bei UnrealBuildTool.DynamicCompilation.CompileAndLoadAssembly(String OutputAssemblyPath, List`1 SourceFileNames, List`1 ReferencedAssembies, List`1 PreprocessorDefines, Boolean DoNotCompile, Boolean TreatWarningsAsErrors)
   bei UnrealBuildTool.RulesCompiler.ConditionallyCompileAndLoadRulesAssembly()
   bei UnrealBuildTool.RulesCompiler.CreateTargetRules(String TargetName, TargetInfo Target, Boolean bInEditorRecompile, String& TargetFileName)
   bei UnrealBuildTool.ProjectFileGenerator.AddProjectsForAllTargets(List`1 AllGames, ProjectFile& EngineProject, Dictionary`2& GameProjects, Dictionary`2& ProgramProjects, HashSet`1& TemplateGameProjects)
   bei UnrealBuildTool.ProjectFileGenerator.GenerateProjectFiles(String[] Arguments, Boolean& bSuccess)
   bei UnrealBuildTool.UnrealBuildTool.GenerateProjectFiles(ProjectFileGenerator Generator, String[] Arguments)
   bei UnrealBuildTool.UnrealBuildTool.DoPostStartupStuffThatCanAccessConfigs(String[] Arguments)

I may have found a workaround. Not 100% sure, but it seems to work. I created a link to the network drive: mklink /D C:\Users\Me\Desktop\Remote \\192.168.6.100\Me. Then, while creating a new C++ project, I set C:\Users\Me\Desktop\Remote\Desktop as the base location for the project, which is essentially my Desktop on the mac machine.

1 Like

Hey Bajee-

I’m glad you were able to find a workaround that works for you. I have entered a bug report to investigate creating a project on a network drive (UE-21787).

Cheers

Doug Wilson

Hey,
had just the same issue. Here is how I was able to fix it:

Creating or Running a C++ Project from a Networkstorage won´t work. UE4 needs .net Framework, which with version 4.0 got a security update to not allow files from untrusted sources (every networkstorage and maybe external drives).
To fix this, you need to allow these.

Visual Studio:

-Go to C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE

-Open the files XDesProc.exe.config, devenv.exe.config, and XDesProc.exe.appx.config using a text editor (likely requires administrator mode)

-Find </runtime> and before it, add <loadFromRemoteSources enabled="true"/> (If you copy/paste, make sure the doublequotes come through as ASCII or VS will have a fit)

Unreal Engine:

-Go to C:\Program Files (x86)\Epic Games\4.13\Engine\Binaries\DotNET

-Open the file UnrealBuildTool.exe.config using a text editor (likely requires administrator mode)

-Find </configuration> and before it, add 	<runtime>   <loadFromRemoteSources enabled="true"/>  </runtime> 	(If you copy/paste, make sure the doublequotes come through as ASCII or VS will have a fit)

Thank-you! Some more details:
If you mklink /d folder //network/share it won’t work even with the perms mods you mentioned.
But it does work if you the regular map the network share to a drive letter.