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?
Forums
win32manifest error
6 posts
• Page 1 of 1
Re: win32manifest error
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:
I haven't tried that before with a newer csc. Let us know how things work out.
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.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: win32manifest error
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.
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.
- arisawa
- Posts: 51
Re: win32manifest error
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.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: win32manifest error
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: 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.
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"
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.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: win32manifest error
This is now fixed and a test case in place to ensure it does not regress.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 16 guests