Mono Migration Analyzer: What are all of the command line switches? - mono

So I'm looking here and I see the command line switches. http://mono-project.com/Command_Line_MoMA
This is what I see as the total amount of switches from the site:
MoMA.exe --nogui --out C:\app\momareport\report.html C:\app\myapp.exe
One thing I see is the submit.xml going to a place I don't want during my automated build. Since it is a generated file, I want to change where it goes. Is there a switch for that?
Also, what are all of the switches for it?
If there is not a switch for moving the submit.xml to a reporting location, please consider it for future versions.
EDIT: The argument --help does not work. I tried that and a host of others to try to get some dialog from MoMA on the command line. I'm on Windows to help alleviate any confusion.

Those are the only command line switches supported by MoMA. You can see the code here.
"MoMA.exe --help" does not work because MoMA is compiled as a winforms application so that the command window is not shown. As a result, MoMA disconnects from the command window, and therefore things like Console.WriteLine will not work.
To answer your actual question, there is currently not a way to change where the .xml file gets put.

You might want to try:
MoMA.exe --help
On Linux, there should also be a manpage.
If you can't find the feature, and want to submit it to Mono, you'll want to go via the Bugzilla page.

Related

nuget command Source Add started to fail out of nowhere with a warning asking for a unique source

I have an c# wpf application and an additional installer project to create an installer of the application. Among many other files, the installer project has a installer.cmd file (I took over it from someone else) and a Product.wxs file. I was able to create an installer by running msbuild tools\installer.cmd /P:Library=net461 /P:Platform=x64 command on the developper comand prompt.
I was trying to create a desktop shortcut in all user's desktops and was playing with *.wxs file for that. I know you guys will roast me because of the following sentence but I don't know what else can I say. Something I did break something and somehow the msbuild starts to give error. I cannot say what I did because I tried many different things.. I went back to original project but it didn't help. So what is done is done. I will talk about the error now.
The error itself doesn't tell much:
C:\workspace\QToolInstaller\tools\installer.cmd(117,5): error MSB3073: The command "nuget Source Add -Name PkgSrc_638107674121812897 -Source C:\workspace\QToolInstaller\exports" exited with code 1.
I checked online to understand this error code but there wasn't much. However there is another line just before this erorr line:
The source specified has already been added to the list of available package sources. Provide a unique source.
Well, this wasn't in usual warning color or marked as a warning. But I think it is worth to investigate.
So the "source" mentioned here is PkgSrc_638107674121812897. I scanned the installer.cmd to see where is this coming form and saw that this file is named by using time ticks as:
<LocalSource>PkgSrc_$([System.DateTime]::UtcNow.Ticks)</LocalSource>
Although I ran the msbuild command multiple times, the name of the source is always different. I ran the command in diagnostic mode by using -verbosity:diag option. And I checked the file name among all the logs. There is no match. I tried to change the name to something ridicolous that cannot be listed anywhere but got the same error. Removed alll the files, created them again, restarted the PC etc. Nothing have changed. This name is really unique and but still I am getting this message. I wish I had logs form previous successfull runs. I cannot tell if this is the cause of the failure or not. Does any of these ring any bell fellas?
It is solved! Luckily a colleague of mine have faced with this before. I hope no one will have to deal with this problem again.
So apparently there is a bug(?). Altought that name is unique it thinks the opposite. When I do list the sources with thw followng command
nuget source
among the one that should be there, there is one extra line as PkgSrc_638107643440982987. Although my installer.cmd suppose to remove the source every time after it is done, it didn't for once. And although the new source is named differently, it doesn't care and gives that non-warning, non-error message followed by a meaningless error code 1 message. How to solve it?
We tried to remove the source by command prompt like this:
nuget source delete -Name PkgSrc_638107643440982987
But it is not deleted. So we went to the Visual Studio->Tools->NuGet Package Manager->Package Manager Settings->Package Sources. Found the guilty source and remove it. And then it is resolved.

Trying to perform a diff using netbeans and its Git repository

I have two different version of a website, an older version, and a newer version that is supposed to have some sort of virus on it (or malicious code of some kind). I need to perform a diff between the two sites and try to eliminate the virus in the newer one.
After some searching I found netbeans 7.1 is able to do this using it's Git Repository. I was following this tutorial http://netbeans.org/kb/docs/ide/git.html but I am not getting the same options on my screen as in the tutorial. I am using netbeans 7.1 RC1 and downloaded the jdk from the link on that same page. The jdk download itself says jdk7 but the folder it creates on my computer is named jdk1.7.0_01 . I'm assuming jdk7 is short for jdk1.7 .
I get as far as the very end of the "Initializing a Git Repository" step. The end when it says "All the project files are marked Added in your Working Tree. To view a file status, place the cursor over the file name in the Projects window. The status of the file in the Working Tree displays in green to the right of the slash like shown in the following picture." does not happen.
I tried going further anyway, but there is just more and more options that do not show up for me.
I am also open to another way to perform a diff operation between the sites, it doesn't have to be with using netbeans. I should note however I do not have access to a unix box. So the solution has to work for windows, or I guess I can go on a coworkers mac if I need to.
Thank you.
From your question, it sounds like you did not already have your web site code under version control. If that's the case then I'd suggest doing so, and git is a very good choice. It is what I use.
Your goal, however, is to diff the older version of your site with the "newer" (possibly infected) version, and that can be done without having to deal with a version control system. There are several good diff tools for Windows. I mainly use WinMerge, as I like its user interface and simplicity. KDiff3 is another good one, and I use that one in conjunction with git merge operations, because it supports a three-way-merge comparison (which WinMerge does not).
If you were to use WinMerge for your diff, and you had the code from the old version in Q:\example.com\old-version and the "new" version in Q:\example.com\current-version, then you would start WinMerge, and either choose File|Open... from the menu, or click on the open icon in the toolbar. You would get a dialog like the following, and would fill it in as shown:
If you filled everything in correctly, then you would be able to click on the OK button, and would get a list of file differences. Depending on the default settings, you might also see files that have not changed at all in that list. You can hide those using the View menu. Double-clicking on a file with differences will open the two versions and show you the differences.
Explore the WinMerge options. I have mine set, for example, to compare white-space differences, but to ignore different line endings (Unix's LF versus Windows' CR/LF).

Script TFS Powertools shell extension getter

Is there a simple way to script the TFS powertools "get latest version" feature ?
I am refering to this window:
I just want to get it via a script, rather than by right clicking on a folder. I am aware of tf get but I like the powertools window better
The window you are showing above is not specific to TFS Powertools. That is the basic get window that comes packaged with TFS. Based on that fact, I am not 100% sure I understand your question.
Do you mean to say "How can I, using tfpt, do a get latest version and show this window." Maybe you are simply asking how to display the TFS window from the command line or via script?
TFPT has getcs if you know the latest changeset but that doesn't display in a window. TFPT adds features that TF doesn't have so obviously TFPT will not have a basic get.
I am unaware of a way, via a script (which would rely on tfpt or tf) to get latest in TFS and then display the aforementioned TFS get window. I can't think of any reason why there would be a need for this either. There is command line syntax to handle the gets.
Of course there are commands that will display in the viewer because it wouldn't make sense in plain text; however, since the get command simply gets files it wouldn't make sense to pop the viewer.

Batch file doubts

I have a .bat file shown below in which I want to redirect the whole contents present in my IDE to some text file.
D:\WindRiver\wrenv.exe -p vxworks653-2.2.3 run
D:\WindRiver\wrenv.exe -p vxworks653-2.2.3>C:\ThreePartition\output.txt
PAUSE
I am able to just get some partial output i.e I am unable to get the errors which are thrown during compilation or building process.
Is this correct or Can anyone suggest any other way??
Thanks a lot
Maddy
You can try this:
D:\WindRiver\wrenv.exe -p vxworks653-2.2.3 > C:\ThreePartition\output.txt 2>&1
You can find a good explanation here. Basically you need to redirect both stdout AND stderr to your file.
Best regards.
Your batch is redirecting all messages from wrenv.exe that are sent to the standard output.
I never used WinRiver but usually IDEs manage the console internally and don't log any messages on the standard output/error stream.
It is maybe possible to set the output of the console of the IDE though. If it is, try to set it to the standard output.
I think you want to combine both those lines into one:
D:\WindRiver\wrenv.exe -p vxworks653-2.2.3 run >C:\ThreePartition\output.txt
OK, looking at your posts here, here and here, it seems you want to log the compilation process. The command for that will be something like (all on one line):
make ThreePartition.mak >C:\ThreePartition\output.txt
Assuming there's a file called ThreePartition.mak.
The command you've been using so far is designed to simply open an interface where you can type commands, which is why you get no output. If you want to log simulation, or a kernel build, there is a file called vxworks_cli_tools_users_guide_6.6.pdf which describes the command line interface, including vxprj in full detail.
Also, are you really using a nant script to call a .vbs to call a .bat to call wrenv.exe? I'm sure there's a simpler way to do that.

OpenAs_RunDLL in Vista

This isn't strictly a programming question, but hopefully someone here has the knowledge to help me.
Running Vista x64, the "Open File With" dialog takes forever to appear when trying to open a file with unknown type.
To be specific, the prompt giving the choice between "Use the web service to find the correct program" and "Select a program from a list of installed programs" appears immediately, but there is about a 10 second delay between pressing OK here and the next window (with a list of installed programs) appearing.
The same delay is present when I run "rundll32 shell32.dll,OpenAs_RunDLL" from a command line.
I'm guessing that this is not common behaviour, because I find it incredibly annoying, and I couldn't find any mention of it anywhere.
So..does anyone have any ideas what it might be? Or what I could do to try and find out?
VonC could be correct.
Read this article:
http://blogs.technet.com/markrussinovich/archive/2005/08/28/the-case-of-the-intermittent-and-annoying-explorer-hangs.aspx
You should use process explorer to watch the stack when you initiate the action. You should be able to tell what sort of operation is timing out.
Download process explorer here:
http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
You could check if you do not have have network connection declared (net use), or more generally any network paths which may be used by your list of program listed to "Open File With".
If a network path is unavailable, a 'timeout' delay can affect the GUI responsiveness, especially if that GUI must explore/list those paths.