Can't create unmanaged dll using C# and Robert Giesecke's Unmanaged Exports tool
.net, c#, unmanaged, visual-studio-2010
Solution
I spent whole day trying to solve this issue and finnaly I found the solution! I also have russian windows and after updating VS2012 to VS2013 my projects started to show the same error:
error : syntax error at token '{' in: {
I tried to change environment variables, but this did not help. The only thing that helped me was changing default language of non-unicode programs. You can find this setting in "Control Panel > Language and Regional Settings > Additional > Change language for applications that dont support Unicode". I changed language to english, rebooted ... and profit!
Problem
I try to create unmanaged dll in C# (VS2010) using Robert Giesecke's Unmanaged Exports. This is my code for test: ``` using RGiesecke.DllExport; namespace UnmanagedDllTest { public class TestClass { [DllExport] public static int Add1(int n) { return n + 1; } } } ``` When I build this, I get an error: ``` UnmanagedDllTest -> D:\Dev\UnmanagedDllTest\UnmanagedDllTest\bin\x86\Debug\UnmanagedDllTest.dll D:\Dev\UnmanagedDllTest\packages\UnmanagedExports.1.2.6\tools\RGiesecke.DllExport.targets(42,5): error : C:\Users\user\AppData\Local\Temp\tmpD5A0\UnmanagedDllTest.il(60) : error : syntax error at token '{' in: { D:\Dev\UnmanagedDllTest\packages\UnmanagedExports.1.2.6\tools\RGiesecke.DllExport.targets(42,5): error : ``` What am I doing wrong?