I am using CMAKE with CTEST to run my regressions. My application is a console app which outputs in whatever encoding it is presented by it's environment (A feature of Tcl).
How do I tell visual studio that when it runs my application to run it in a utf-8 environment. Right now my regression results are encoded in latin, and it makes it difficult to compare with regressions on my linux builds.
The stdout/stderr streams do not support unicode, so Visual Studio has no way of receiving unicode output from your process. This was an issue MS had to work around when implementing Unicode support in VS 2005, see this blogpost. In short, cl.exe uses a set of pipes to write unicode output to the Visual Studio console window.
Your wrapper could either convert the output of your process into the system code-page, or figure out how to open the Unicode pipes used by cl.exe and write to them instead.
Related
I need Visual C++ 2015 in order to build parts of a different tool that I need (that is, I won't be using visual studio itself), but I only have the Korean installer available
Other than the language of the user interface, can I expect the compiler itself in the Korean version to behave exactly the same way as the English version? The other tool that I am trying to build automatically detects the presence of Visual C++ 2015 and it is supposed to build itself automatically, but it's failing with many errors. Is there anything different between the English version of Visual Studio and Korean (or any non English version in general) at the compiler level, other than the user interface text? Can I expect both of them to behave exactly same at the command line level?
I have a bug in my FAKE script in obscure code were I interface with legacy build infrastructure. I have a bug there and I wanted to debug my script in Visual Studio. I used --break flag to attach Visual Studio 2013 debugger and I could set up a break point. But I cannot inspect any of variables of a FAKE script.
Is there a way to use Visual Studio 2013 debugger to inspect state of FAKE script? There seems to no problems with regular F# programs.
Have you tried using the REPL to invoke your build script a bit at a time?
An example of using VS Code + the ionide plugin to use the FSI interactive Repl
You should be able to highlight and run parts of your script in the REPL.
I have a C#/.Net 4.0 project in Visual Studio 2010. Parts of this project were originally from an old VB6 program that was converted to C#.
Sometimes I need to look at the old VB6 code side-by-side with the C# code, and so it's very convenient to just open and view the file in Visual Studio. V.S. even displays comments and keywords in appropriate colors for easy viewing. To open the VB6 file I'm doing a File>Open>File. The VB6 file has a .cls extension.
The problem is that when I do that it also tries to do background compilation of it, so as soon as I open it, it registers hundreds of errors because VB6 isn't a supported language and even if I do a Build Solution or Rebuild Solution it includes those results in the build so I can't build my C# project when the VB6 file is open.
1. Why does it do this, considering that the VB6 file is not part of the current solution or project?
2. How do I turn it off so I can view the file but not have Visual Studio try to compile it?
Why does it do this?
The cls extension is mapped to the Visual Basic language service. It will interpret any file with that extension as a VB.Net file and process it as such.
The Visual Basic Language service is always compiling files to a degree in the background. It doesn't actually produce EXE / DLL but will go far enough to provide semantic information to the front end. This is used in intellisense, code highlighting, error squiggles, etc ...
How do I turn it off?
Unfortunately you can't. Visual Basic background compilation is not configurable. Hence any file which it believes to be VB.Net code will be processed in the background and errors will be displayed.
The only way to view it without errors is to rename the file to an extension not thought to be VB.Net code (like txt)
I am a big fan of Microsoft Visual Studio. I like the code folding, auto-completion, auto-formatting, and many more.
I am thinking that it will be good if I can abuse MS Visual Studio as an IDE for LaTeX users. Shortly speaking, is it possible? For the first step, I think making me possible to invoke LaTeX compiler and invoke PDF viewer from within Visual Studio is more than enough. But you can step further by allowing me to use auto-completion, etc.
Is there any idea?
LaTeX editors usually have setting to invoke LaTeX compilers and PDF viewers as follows. It might be useful for you.
For Visual Studio Code (VSC) use extension: "LaTeX Workshop".
On Windows: Install MiKTeX, then over MiKTeX Console install package "latexmk". Finally install Perl http://strawberryperl.com/
PDF gets rebuilt automatically on saving the .tex file with VSC.
For viewing the changing .pdf file in Windows "TeXworks" did work best from multiple viewers tried, because it does not lock the .pdf file against changes and quickly refreshes the view on changing pdf output.
Yes. It is possible. Use Visual Studio Code with LaTeX extension. And it is free of charge.
Are there gdb (or similar) for F#?
What tools/programs do F# programmers normally use for tracing F# code in Mono?
Does Visual Studio 2010 provides some integrated debugging tools for F#?
Visual Studio 2010 provides a fantastic debugging experience for F#, including breakpoints, tracepoints, call stacks, locals, stepping, set next statement, threads window, poking new values into variables, debugger visualizers, conditional breakpoints, immediate window, ... the only caveat is that the last two use the C# expression evaluator (F# does not have its own debugger EE), which means you must type e.g. C# syntax into the 'immediate window'.
(Everything I mentioned above is available for free if you download the free VS2010 Integrated Shell and the F# CTP.)
I am not sure what is available right now for Mono, but would not be surprised if there is something decent already, and something even better coming in the not-too-distant future.
Mono has its own debugger. The debugging format situation is slightly confusing because Visual Studio will generate pdb files which are needed for their debugger. Mono uses the alternative mdb format. fsc.exe (The f# compiler) will generate the appropriate ones for whichever platform it is run on.
The Monodevelop IDE can be used for general debugging of .net assemblies, even though it doesn't support a released f# version yet. You'll need to refer to your project's generated assemblies in the project.
Note that you also have to pass '--debug' to mono if you're executing it on the command line and want, for example, file names and line numbers in stack traces.
Any .NET debugger should work on F# code. The Visual Studio debugging experience is basically the same as for any other language (e.g. you can set breakpoints in the editor, etc.). I can't speak to what tools people use on Mono.
LinqPad understands F# code but I did not try it. A paid version gives you debugging.