I am trying to add some code to an InfoPath 2013 form for use on a SharePoint 2013 website.
This appears to be working normally after installing Visual Studio 2012 and opening it via InfoPath.
However, after importing some of my old code (which makes use of the string-interpolation introduced in C# 6.0), I now see this error:
Unexpected character '$'
On lines where interpolation is used.
I tried running Install-Package Microsoft.Net.Compilers -Version 1.3.2, but NuGet complains that:
The element 'metadata' in namespace 'http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd' has invalid child element 'developmentDependency' in namespace 'http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd'.
List of possible elements expected: 'iconUrl, summary, title, projectUrl, references, frameworkAssemblies, copyright, releaseNotes, licenseUrl, tags, dependencies, language, description' in namespace 'http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd'.
So I tried update NuGetas per this answer, but then I see:
The term 'nuget' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
What is going on here? Am I wasting my time trying to use C# 6.0 with InfoPath, or is there something wrong with my configuration?
Please note that InfoPath 2013 will only allow custom code if using Visual Studio 2012. Other wise I would be using 2015.