MSBuild error when trying to compile plugin in 4.7.2

I’m attempting to make a plugin in the latest version of Unreal Engine 4 (4.7.2) but when I go to build the plugin or the project I get an MSBuild error.

The plugin is just a straightforward generic code to test if it gets picked up first.
Software I am currently using is Unreal Engine 4.7.2 and Visual Studio 2013 Ultimate edition alongside ReSharper for InteliSense.

Solution Explorer is as follows:

http://puu.sh/gAuQU/3ce8b6da9e.png

The error log I receive from Visual Studio is listed below:

1>------ Build started: Project: PluginPlayground, Configuration: Development_Game x64 ------
1>EXEC : error : System.FormatException: Input string was not in a correct format.
1>     at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
1>     at fastJSON.JsonParser.ParseNumber()
1>     at fastJSON.JsonParser.ParseValue()
1>     at fastJSON.JsonParser.ParseObject()
1>     at fastJSON.JsonParser.ParseValue()
1>     at fastJSON.JSON.ToObject(String json, Type type)
1>     at fastJSON.JSON.ToObject[T](String json)
1>     at UnrealBuildTool.Plugins.LoadPluginDescriptor(FileInfo PluginFileInfo, LoadedFromType LoadedFrom)
1>     at UnrealBuildTool.Plugins.FindPluginsRecursively(String PluginsDirectory, LoadedFromType LoadedFrom, List`1& Plugins)
1>     at UnrealBuildTool.Plugins.DiscoverAllPlugins()
1>     at UnrealBuildTool.RulesCompiler.FindAllRulesSourceFiles(RulesFileType RulesFileType, List`1 AdditionalSearchPaths)
1>     at UnrealBuildTool.RulesCompiler.ConditionallyCompileAndLoadRulesAssembly()
1>     at UnrealBuildTool.RulesCompiler.CreateTargetRules(String TargetName, TargetInfo Target, Boolean bInEditorRecompile, String& TargetFileName)
1>     at UnrealBuildTool.RulesCompiler.CreateTarget(String TargetName, TargetInfo Target, List`1 InAdditionalDefinitions, String InRemoteRoot, List`1 InOnlyModules, Boolean bInEditorRecompile)
1>     at UnrealBuildTool.UEBuildTarget.CreateTarget(TargetDescriptor Desc)
1>     at UnrealBuildTool.UnrealBuildTool.RunUBT(String[] Arguments)
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command ""D:\Software\Epic Games\4.7\Engine\Build\BatchFiles\Build.bat" PluginPlayground Win64 Development "D:\Projects\Unreal Project Plugins\PluginPlayground\PluginPlayground.uproject" -rocket" exited with code -1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Currently I’m unsure as to what is causing the problem overall.

Hi dale,

Is this still giving you trouble? I tried creating a very basic plugin from scratch in 4.7.2 (built from source code) and 4.7.3 (binary) and didn’t have any problems building the project. If you are still seeing this error, could you zip up the Plugins folder and send that to us?

Hi ,

I’m getting a similar problem when trying to compile 4.7.3 with this plugin

Exactly the same when I try it on 4.6.1

Failed to generate project files. Log output:
Running D:/Epic Games/4.7/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project="C:/Users/Administrator/Documents/Unreal Projects/gardentoy_test/gardentoy_test.uproject" -game -rocket -progress
Discovering modules, targets and source code for game...
UnrealBuildTool Exception: System.Exception: Could not find token at index 0
bij fastJSON.JsonParser.NextTokenCore()
bij fastJSON.JsonParser.ParseValue()
bij fastJSON.JSON.ToObject(String json, Type type)
bij fastJSON.JSON.ToObject[T](String json)
bij UnrealBuildTool.Plugins.LoadPluginDescriptor(FileInfo PluginFileInfo, LoadedFromType LoadedFrom)
bij UnrealBuildTool.Plugins.FindPluginsRecursively(String PluginsDirectory, LoadedFromType LoadedFrom, List`1& Plugins)
bij UnrealBuildTool.Plugins.DiscoverAllPlugins()
bij UnrealBuildTool.RulesCompiler.FindAllRulesSourceFiles(RulesFileType RulesFileType, List`1 AdditionalSearchPaths)
bij UnrealBuildTool.ProjectFileGenerator.DiscoverTargets()
bij UnrealBuildTool.ProjectFileGenerator.AddProjectsForAllTargets(List`1 AllGames, ProjectFile& EngineProject, Dictionary`2& GameProjects, Dictionary`2& ProgramProjects, HashSet`1& TemplateGameProjects)
bij UnrealBuildTool.ProjectFileGenerator.GenerateProjectFiles(String[] Arguments, Boolean& bSuccess)
bij UnrealBuildTool.UnrealBuildTool.GenerateProjectFiles(ProjectFileGenerator Generator, String[] Arguments)
bij UnrealBuildTool.UnrealBuildTool.Main(String[] Arguments)

Would be great if you could point me in the right direction :slight_smile:

Thanks in advance,

best,

Hi ,

I downloaded the OSC plugin and added it to a project, and was able to build the project successfully. Let me outline the steps that I followed, and if you could let me know if you did something differently, that would be great.

  1. Download the OSC plugin zip file to the desktop.
  2. Unzip the plugin into a new folder on the desktop.
  3. Create a new code project using the first person template (4.7.3 built from source code).
  4. Build the project in Visual Studio.
  5. Close Visual Studio.
  6. Open a Windows Explorer window and navigate to where the project is located (in My Documents\Unreal Projects).
  7. Copy the OSC plugin into a newly-created Plugins folder inside the project.
  8. Right-click on the .uproject file and select “Generate Visual Studio project files.”
  9. Open the project solution in Visual Studio (it now includes the plugin source code).
  10. Build the project in Visual Studio.

Do you see the same error message when you follow those steps?

Hi everyone,

We have not heard back from you for a few days. Do you still need help with this issue? I will be marking this post as resolved for internal tracking purposes, but please feel free to reopen the post at any time with any additional information you may have.

Hi ,

Sorry, I was about to write you back and thank you for your help. It worked perfectly. The only added thing I had to do was do the “generate visual studio project files” step before I added the plugin and then again after I added the plugin. Not clear to me why, but otherwise it wouldn’t work.

Anyhow, again thank you for helping me out with this problem!

best,