I can't create a new C++ project

Hi,

I’ve been trying to create a new C++ project, but I get the following error:

An error occurred while trying to generate project files.

Running C:/Program Files/Epic Games/4.11/Engine/Binaries/DotNET/UnrealBuildTool.exe  -projectfiles -project="M:/Research/RT/testingC/testingC.uproject" -game -progress -2015
Discovering modules, targets and source code for game...
UnrealBuildTool Exception: System.IO.FileLoadException: Could not load file or assembly 'file:///M:\Research\RT\testingC\Intermediate\Build\BuildRules\testingCModuleRules.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///M:\Research\RT\testingC\Intermediate\Build\BuildRules\testingCModuleRules.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence assemblySecurity)
   at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
   at UnrealBuildTool.DynamicCompilation.CompileAssembly(FileReference OutputAssemblyPath, List`1 SourceFileNames, List`1 ReferencedAssembies, List`1 PreprocessorDefines, Boolean TreatWarningsAsErrors)
   at UnrealBuildTool.DynamicCompilation.CompileAndLoadAssembly(FileReference OutputAssemblyPath, List`1 SourceFileNames, List`1 ReferencedAssembies, List`1 PreprocessorDefines, Boolean DoNotCompile, Boolean TreatWarningsAsErrors)
   at UnrealBuildTool.RulesAssembly..ctor(IReadOnlyList`1 Plugins, List`1 ModuleFiles, List`1 TargetFiles, Dictionary`2 ModuleFileToPluginInfo, FileReference AssemblyFileName, RulesAssembly Parent)
   at UnrealBuildTool.RulesCompiler.CreateProjectRulesAssembly(FileReference ProjectFileName)
   at UnrealBuildTool.ProjectFileGenerator.AddProjectsForAllTargets(List`1 AllGames, ProjectFile& EngineProject, Dictionary`2& GameProjects, Dictionary`2& ProgramProjects, HashSet`1& TemplateGameProjects)
   at UnrealBuildTool.ProjectFileGenerator.GenerateProjectFiles(String[] Arguments, Boolean& bSuccess)
   at UnrealBuildTool.UnrealBuildTool.GenerateProjectFiles(ProjectFileGenerator Generator, String[] Arguments)
   at UnrealBuildTool.UnrealBuildTool.DoPostStartupStuffThatCanAccessConfigs(String[] Arguments)

UE 4.11.2
Visual Studio 2015
.NET Framework 4.6.01055

Thank you,
Luigi

Hey -

Are you able to create blueprint projects? If so, can you successfully add a class to it (File->New C+ Class)? If you’re using the binary version of the engine from the Launcher, you may want to also try Verifying the engine install by clicking the dropdown arrow below the engine version in the Library tab and select Verify. Additionally, make sure that the Common Tool for C++ have been installed with VS2015. If you run Repair for VS2015, you should be able to expand the Programming Languages section and select C++. This will ensure that C++ doe and Common Tools are installed properly. Let me know if you still have problems creating a C++ project / class.

Cheers

Hi ,

thank you for getting back to me.

Yes I can create blueprint projects.
I can add classes to the project, and indeed it saves them to disk but they won’t be visible while getting the following message:

Successfully added class 'MyActor', however you must recompile the 'testing' module before it will appear in the Content Browser. Failed to generate project files.

Would you like to open the Output Log to see more details?

and this is what the Output Log says:
[link text][1]

Also, I tried Cooking for Windows and it fails with the following Output Log: [link text][2]

Here is the VS2015 installation:

What am I doing wrong?

Thank you for your help,

Luigi

For clarification, are you attempting to create the new project / class locally on the machine you’re using or on a second computer over a network? If you are doing so over a network, can you try creating a new project directly on the target machine? In either case, can you also update the .NET Framework for your machine (both machines if you’re using a network).

I am trying to create a new project or to add a class to a project that is on a Synology DS716+ NAS server which uses Linux.

Can’t we work from a network location then?

I tried to do the same locally on my computer and it all works fine.

I already have .NET Framework 4.6.1 and I believe it’s the latest one.

Thank you,
Luigi

one more thing, the local drive I am having success creating c++ projects and classes is not C: but a second hard drive installed in the computer that I am using.

The NAS server has been mapped to a letter but UE doesn’t seem to like it.

Today I got a new problem, I can’t package any projects BP or C++ from that same NAS server because of date mismatch. I guess I will have to log that on a separate ticket.

Luigi

Hey -

Sorry for the delayed response. I am still looking into creating a project over a network and will update you when I have more information. For now can you let me know if you have the same error if you use another computer to create the project?

Hi , ok I will try it and let you know.

Thank you,
Luigi

I tried again to create a project on a network drive and was able to create a code project as well as add code to it and a Blueprint project. Were you able to create a project on your network from another computer or do you still have the same errors?

Hi I was finally able to test it from a different computer. I only have a macbook (an old one) from which I have been able to create a C++ project and to add a new C++ variable. Although it was taking ages to cook but that may well be because the machine is old and doesn’t meet the minimum requirements for UE4.

Any idea?

Thank you,
Luigi

Hey Luigi-

I was able to create a project on a network drive locally as well. Seeing that you were able to create a project from a second computer, there may be an issue with the first computer’s access to your network.

Hi ,

is there any known issue with windows and an external HD? Any fix or known workaround for this?

Thank you,
Luigi

There are no If you’re having a problem creating a project on an external drive it may be simplest to instead create the project on an internal drive and then copy the project over to the external.

As an additional note, were you able to check for any differences in network access between the computer that was able to create a project vs the computer that is not able to?

Hi ,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.