Page 1 of 1

win32manifest error

PostPosted: Sat Aug 01, 2009 5:12 pm
by arisawa
does not -sharp-args option correspond to "win32manifest" ?

>cobra -sharp-args:/win32manifest:test.cobra.xml test.cobra
got
error: fatal error CS2007: cannot be recognized option: "/win32manifest:test.cobra.xml"

is there a substitution way?

Re: win32manifest error

PostPosted: Sat Aug 01, 2009 6:29 pm
by Charles
I don't see this option under .NET 2.0 / VS 2005 csc.exe. I do see it for .NET 3.5 / VS 2008 csc.exe.

Currently, Cobra is using .NET 2.0, so unfortunately this option is not available.

I haven't really resolved how to get Cobra to use the csc.exe from .NET 3.5. Or how we'll continue if we plan to support both. Investigations and contributions in this area are welcome.

You could try -native-compiler:file-system-path and pointing Cobra to the csc.exe for .NET 3.5. Something like:
Code: Select all
cobra -native-compiler:C:\WINDOWS\Microsoft.NET\Framework\v3.5\csc.exe -sharp-args:...


I haven't tried that before with a newer csc. Let us know how things work out.

Re: win32manifest error

PostPosted: Sun Aug 02, 2009 5:24 pm
by arisawa
because I am not a specialist though it is too unreliable ;)
actually now I tried it.
a simple console application to demand the manager authority by UAC dialog was able to be compiled.
but, including System.Windows.Forms obtains a error CS1703. I hear that the reference overlapped.

Re: win32manifest error

PostPosted: Sun Aug 02, 2009 7:24 pm
by Charles
I'm not sure what the problem is. If you want to send me the code to contact@cobralang.com I can try to take a look.

Re: win32manifest error

PostPosted: Mon Aug 03, 2009 3:44 am
by Charles
So I got your files and compiled and received the same error. By turning on verbosity with -v:2, I can see the csc.exe invocation:

C:\WINDOWS\Microsoft.NET\Framework\v3.5\csc.exe "/r:Cobra.Lang.dll" "/r:C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll" "/out:x-uno-win-form.exe" /nologo /nowarn:0108,0162,0169,0183,0184,0219,0414,0429,1717,1718 /main:MainWrapper /win32manifest:addUAC.xml -lib:"C:\Documents and Settings\Chuck\My Documents\Projects\Cobra\Workspace-B\Source" "x-uno-win-form.cobra.cs" "MainWrapper.cobra.cs"

I then cut it down my making the /r: to WinForms use its simple name rather than the full path:

C:\WINDOWS\Microsoft.NET\Framework\v3.5\csc.exe "/r:Cobra.Lang.dll" "/r:System.Windows.Forms.dll" "/out:x-uno-win-form.exe" /nologo /nowarn:0108,0162,0169,0183,0184,0219,0414,0429,1717,1718 /main:MainWrapper /win32manifest:addUAC.xml -lib:"C:\Documents and Settings\Chuck\My Documents\Projects\Cobra\Workspace-B\Source" "x-uno-win-form.cobra.cs" "MainWrapper.cobra.cs"

And that compiled with no errors. Then I tried with:
@args native-compiler:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe"
And had the same problem with the same fix.

So at least we know this is not caused by .NET 3.5 nor by /win32manifest. I don't have a workaround (given that you want to invoke the csc.exe of .NET 3.5). I have major client work Monday, but will try to get a fix in with a test case to lock it down, as soon as possible. Or patches are welcome. :-D

Re: win32manifest error

PostPosted: Tue Aug 04, 2009 1:44 am
by Charles
This is now fixed and a test case in place to ensure it does not regress.