error MSB3073: Visual studio 2010, windows7 - msbuild

error MSB3073: The command "
if "%OS%"=="" goto NOTNT
if not "%OS%"=="Windows_NT" goto NOTNT
"EventController.exe" /RegServer
echo regsvr32 exec. time > "UnicodeDebug\regsvr32.trg"
echo Server registration done!
goto end
:NOTNT
echo Warning : Cannot register Unicode EXE on Windows 95
:end
:VCEnd"
exited with code 9009.
How to handle this error. Help is appreciated, thanks

OK, this is mostly guesswork, but I'm feeling adventurous today :-)
Based on the bad formatting of your code fragement (which I liberally adjusted) it is a bit hard to tell, but the most likely cause is that a command was not found.
Background:
What you have here is not c++ code and has as such nothing to do with compilation. Again I took the liberty to change the tags accordingly. It is a batch (fragment), which from the error code MSB.... seems to be executed by MSBuild during your build process, which might be the reason why you "assumed" it has something to do with C++ or the compiler.
Now, the actual clue lies in the exit code "9009" which is the same error code that you get when you try to invoke a command / executable, that does not exist or cannot be found, from the command prompt.
So, most likely one of the commands in the fragment you show does not exist or cannot be found. I would assume it is the "EventController.exe" executable.

Related

java does not run with j-grasp on my iMac

I am getting this error when I try to run Java with j-grasp:
----jGRASP wedge: exit code for process is 1.
----jGRASP: operation complete.
----jGRASP exec: javac -g Palindrome.java
The operation couldn’t be completed. Unable to locate a Java Runtime that supports javac.
Please visit http://www.java.com for information on installing Java.
----jGRASP wedge: exit code for process is 1.
----jGRASP: operation complete.
The simplest solution is to download and install one of the "bundled" versions of jGRASP, which comes with Java and will prefer that java and javac over all others.
If you are unable to do that, you can turn on "Settings" > "Verbose Messages" in jGRASP then compile to see what "javac" is actually running ("actual command sent" in the verbose output). Most likely it is not a "normal" javac, since the error message doesn't look like I would expect - I don't know what this "java.com" website is. If you do have a normal Java installation, deleting that rogue "javac" may fix the problem.

"Compilation failed but no error lines" on working java program (jGRASP)

I'm an amateur programmer. I use jGRASP.
I made a lot of functional, running, zero-error programs and copied them to a new computer. Now, when I try to run them, I get that message: "compilation failed but no error lines."
What's going on here? I'd like any help as soon as possible, I have an assignment due.
Do you have the JDK installed (not just JRE)?
What is the compiler output? Any general messages there (not related to your code, but something like a missing javac or javac crashing)?
Is the source code in the correct package structure?
Are the source files in a directory where your login account does not have write access?

JGRASP won't run C program after successful compile and link

Using JGRASP for c++ program. The program compiles and links with no errors. When I try to run I get "wedge2 error: could not run ("c:\mplot\mplot.exe").
The .exe file exists in that directory ! Anyone understand this error?
What happens if you try to run it from Windows Explorer or from the command prompt?

VB.NET Process.Start failing

A problem that has been plaguing me for nearly a week now.
I am trying to get an install of IIS to take place through the command line in VB. I understand that i need to be setting up an Unattended xml script to call, but here is a fundamental bit that is confusing me:
If i run the command : ' start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer; ' it executes perfectly within CMD.exe.
If i add the command to a batch file and run the batch file, it runs perfectly.
If i call the command using : Dim myProcess As Process = Process.Start("cmd.exe", "/k start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;"), then it fails with an error of:
////////////////////////////////////////////////////////////////////////////////////////////////////////////
Operation failed with 0x8007000B ////
////
An attempt was made to run the program in an incorrect format ////
////////////////////////////////////////////////////////////////////////////////////////////////////////
If i call the batch file mentioned earlier, then i get the exact same error.
How can it work perfectly with the two first examples but fail when it is called through VB?
Thanks for any help!
Your VB.NET program is very likely to be running in 32-bit mode and will start the 32-bit version of cmd.exe. The one from c:\windows\syswow64 instead of the one from c:\windows\system32 that you used before. Getting BadImageFormatException starts to become likely.
Project + Properties, Compile tab, set the Target CPU to AnyCPU and untick the "Prefer 32-bit" option. On older versions of VS click the Advanced Compile Options button to get to the setting.

Running grunt from MSBuild

This thread (Problem capturing error output) gives you a taste of the problem I'm struggling with. I'm trying to run grunt from MSBuild and the grunt errors are not displayed in the Visual Studio output window. I have a .NET project in Visual Studio Express 2012 for Web. I have imported an external project into the project build file with the IMPORT tag and in the imported project I have an Exec task attempting to run grunt. I obviously want to see the error messages that grunt outputs in my Visual Studio output window without too much fuss.
I found an extremely simple workaround that at least sends the output to a text file.
grunt.cmd > grunt-output.txt
This output file is in my .NET project folder somewhere so a quick refresh and double click allows me to open the output file and see a slightly garbled version of the grunt output in Visual Studio.
As an example I'm running a lint task on the grunt.js file, which contains things which JSHint would object to. I deliberately didn't put a semi-colon after var hello and so you get the error message Missing semicolon.
From the command line I get a nicely formatted error message.
Running "lint:files" (lint) task
Linting grunt.js...ERROR
[L2:C10] Missing semicolon.
var hello
<WARN> Task "lint:files" failed. Use --force to continue. </WARN>
Aborted due to warnings.
When I run it from Visual Studio, the output file contains this cluttered format:
[4mRunning "lint:files" (lint) task[24m
Linting grunt.js...[31mERROR[39m
[31m[[39m[33mL2[39m[31m:[39m[33mC10[39m[31m][39m [33mMissing semicolon.[39m
var hello[31m[7m [27m[39m
[31m<[39m[33mWARN[39m[31m>[39m [33mTask "lint:files" failed. Use --force to continue. [39m [31m</[39m[33mWARN[39m[31m>[39m
[31mAborted due to warnings.[39m
Does anyone recognise what all those square brackets and numbers are doing, and can anyone think of a command line switch or grunt switch or node.js switch that would interpret them and turn them into formatting? The don't look like some kind of encoding, they look more like tags to suggest to the command line environment how to format the message. Please don't suggest running some kind of regular expression replace function. I want something quick and easy otherwise it would become more trouble than it's worth.
UPDATE: this link Output gets cut off if piped into another application is pointing to a problem further upstream in node dating back 10 months. While that's getting sorted out it would be nice to at least get a more readable output file.
This thread on the grunt message board Pipe-redirecting Grunt's output is broken addresses this issue perfectly and provides a quick workaround while we wait for the overall issue to get fixed. They are escape codes to colour the output and the workaround is to use the --no-color option to remove colouring.
When I run this command from MSBuild
grunt.cmd --no-color > grunt-output.txt
I get nicely formatted output with exactly the same content as the command line:
Running "lint:files" (lint) task
Linting grunt.js...ERROR
[L2:C10] Missing semicolon.
var hello
<WARN> Task "lint:files" failed. Use --force to continue. </WARN>
Aborted due to warnings.
I can live without the colour. It would be nice if this could be sent to the output window, though, because MSBuild throws what seems like an error in the build process when in fact it's just JSHint tactfully hurting my feelings about my JavaScript.
In response to "I obviously want to see the error messages that grunt outputs in my Visual Studio output window without too much fuss."
I'd have a look at VsCommandBuddy ... it helps you integrate your grunt (and any other command for that matter) right inside visual studio. Commands are configured per solution/project, and at the time of this writing are being made available via menus, toolbar, shortcuts and the quicklaunch ...
http://visualstudiogallery.msdn.microsoft.com/f5da988e-2ec1-4061-a569-46d09733c668
It's a scratch-my-own-itch project. It helps me getting thins done. In every solution I open in visual studio, I simply get presented al the external commands I put togheter for that solution / or porject.
Output goes thorugh the outputwindow as desired. The no-color option for grunt removes all the noise.
Hope it helps!!