Would not package, now cannot generate Visual Studio project files

Hello,

We have a project whose release version would package without problem. After about two months of not touching the project, we made a small bug fix to our project, and the packager would error out extremely quickly. We tried several workarounds, eventually deleting the .vs, Binaries, DerivedDataCache, Intermediate, and Saved folders. However, when we try to generate the Visual Studio project files, we are met with the following error:

Running C:/Program Files/Epic Games/UE_4.16/Engine/Binaries/DotNET/UnrealBuildTool.exe
-projectfiles -project="Y:/LabVR/Chem VR/UE4/Chem VR Model Kit
4.16/ChemVRModelKit.uproject" -game -rocket -progress Discovering modules, targets and source code for project... UnrealBuildTool Exception: System.IO.FileLoadException: Could not load file or assembly 'file:///Y:\LabVR\Chem VR\UE4\Chem VR Model Kit
4.16\Intermediate\Build\BuildRules\ChemVRModelKitModuleRules.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) File name: 'file:///Y:\LabVR\Chem VR\UE4\Chem VR Model Kit
4.16\Intermediate\Build\BuildRules\ChemVRModelKitModuleRules.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)

I have tried everything I can think of to fix this problem, including:

  • Reinstalling Visual Studio (including the modules for C++ and C++ for game programming).
  • Reinstalling UE4.16.3.
  • Reverting back to a previous, working copy of the project in source control.
  • Generating the files on different computers.
  • Upgrading the project to 4.17.2.

Reinstalling Visual Studio and UE4 both resulted in the same error occurring.
Reverting back in source control to a working copy resulted in the same error (my .gitignore includes visual studio files)
Performing the same actions on a different computer results in the same error message.
Trying to upgrade to 4.17.2 results in the following error:

Project files could not be generated. Log output:

Running C:/Program Files/Epic Games/UE_4.17/Engine/Binaries/DotNET/UnrealBuildTool.exe
-projectfiles -project="Y:/LabVR/Chem VR/UE4/Chem VR Model Kit
4.17/ChemVRModelKit.uproject" -game -rocket -progress Discovering modules, targets and source code for project... UnrealBuildTool Exception: System.IO.FileLoadException: Could not load file or assembly 'file:///Y:\LabVR\Chem VR\UE4\Chem VR Model Kit
4.17\Intermediate\Build\BuildRules\ChemVRModelKitModuleRules.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) File name: 'file:///Y:\LabVR\Chem VR\UE4\Chem VR Model Kit
4.17\Intermediate\Build\BuildRules\ChemVRModelKitModuleRules.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, ProjectFile& EnterpriseProject, Dictionary`2& GameProjects, Dictionary`2& ModProjects, Dictionary`2& ProgramProjects, Dictionary`2& TemplateGameProjects, Dictionary`2& SampleGameProjects)    at UnrealBuildTool.ProjectFileGenerator.GenerateProjectFiles(String[] Arguments)    at UnrealBuildTool.UnrealBuildTool.GuardedMain(String[] Arguments)

Any help would be greatly appreciated.