We are currently using BizTalk 2006 R2 to build Enterprise Integration solutions. We use BizTalk maps extensively, but when you build a solution in Visual Studio 2005, it produces the following warning against maps:
Warning Double-click here to show/hide compiler links.
In my opinion, these are not real warnings and can be ignored, but I don't like that strategy because ignoring warnings is a bad habit to get into.
Using a \nowarn property does not seem to be an option because the message does not have an associated number.
Also, when the project is built using a build script the warning disappears, suggesting that this is a feature of Visual Studio rather than a real compiler warning.
So I was wondering if there is a way to suppress this type of warning in Visual Studio.
I don't believe there's a way to suppress these for BizTalk projects. BizTalk gurus just learn to ignore them.
You can use the /nowarn option to suppress warnings.
See MSDN: /nowarn (Suppress Specified Warnings) (C# Compiler Options).
Related
There has been more than one occasion where I have mistakenly left a debugger keyword in a javascript file, and rather than finding these (or not) in code reviews, I'd quite like the Visual Studio build process to warn me about this so I remember to remove them - especially in a Release Mode build.
Likewise, maybe some warnings about console.log type of code.
How can I generate an MSBuild warning/error for this?
MSBuild compiler warning for javascript debugger statement
Just like as mentioned in the previously deleted answer, this issue should be more related to the Visual Studio extension rather than MSBuild.
You can use the Visual Studio extensions:
JSLint for Visual Studio
JSHint for Visual Studio
I'm currently using the JSLint from the link above and it works great.
Here are some screen shots of the settings / and my code with an
error. It won't prevent you from checking in, there would likely need
to be a check-in policy on the TFS server, but it will notify you of
the error when you build and save.
Here is the initial page where you can specify how to display the
JSLint validation messages. All of the options across the top you can
set to your liking. You can cancel the build and run the lint process
during save and / or build.
These are all of the specific JSLint rules that you can turn on or
off. I have highlighted the debugger rule that you asked about in your
question.
Certificate: Don't let check in with “debugger” in Visual Studio 2012
Hope this helps.
I was wondering if anyone knows how to use a new compiler within visual studio, and how the interface between compiler and IDE works to make error messages and source code locations "work" (eg double click goes to location).
Context: trying to integrate clang
I am using NMake for "integrating" clang with Visual Studio. You get the convenience of syntax highlighting and intellisense with the power of LLVM. You have to manually make an nmake buildscript file though (which is quite cumbersome).
There is a clang switch called -fdiagnostics-format=msvc that will output the error and warnings in a format that Visual Studio understands (so you can quickly jump to errors or warnings in your code).
Microsoft provides a Visal Studio Integration SDK which presumably is used by Intel. The Intel compilers can add themselves to the VS IDE and replace the Microsoft compilers.
Windows SDK is installed. I built N++ successfully with Visual C++ 2008 Express before. But now with 2010 I have a lot of error messages about sprintf_s:
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(676): error C2039: 'sprintf_s' : is not a member of '`global namespace''
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\string(676): error C3861: 'sprintf_s': identifier not found
Please help.
There's a property sheet included with the project named no_ms_shit.props (after conversion). There's a fair amount of hate expressed in that sheet for what MS has been trying to do for the past 5 years.
They went a little too over-board with turning everything off, they even disabled linking to sprintf_s(). Which is the source of your error, the stdio.h header omits the declaration but the string header uses it. Not sure if the Express edition supports editing project property sheets, but the step in the retail edition are:
View + Property Manager
Open one of the nodes and locate "no ms shit"
Right-click it, Properties
C/C++, Preprocessor, Preprocessor Definitions
Change __STDC_WANT_SECURELIB__=0 to 1
Add _CRT_SECURE_NO_WARNINGS to those definitions
The project compiles clean now. I do get a build error for copying files, it is a post-build event. Start another question if you can't figure out how to fix it.
Strange. I have Visual Studio 2010 Ultimate, and it even doesn't allow me to access the View->Property Pages menu item. It is disabled for me.
But I just went to the file no_ms_shit.props and edited that in Notepad++ only :). Then went to Project->Properties->Configuration Properties->General, and selected 'No' for treat warnings as Errors, and added _CRT_SECURE_NO_WARNINGS in the preprocessor definitions.
Don Ho should go with the flow than cursing the ms shit when he is developing in Windows and Visual Studio.
This worked for me when using Visual Studio 2012 Professional:
You have to edit no_ms_shit.vsprops (*.vsprops, not only *.props!):
Replace __STDC_WANT_SECURE_LIB__=0 by __STDC_WANT_SECURE_LIB__=1
Add _CRT_SECURE_NO_WARNINGS to the preprocessor definitions.
A closer look at the source would show that most of the library calls that cause endless noise unless you use this property sheet come from the SciLexer.dll project. Scintilla is cross platform, so it doesn't need all the Windows specific cruft.As you mentioned, Microsoft went overboard with their replacing the standard string library, as legitimate as their attempt to avoid buffer overruns may be.
So you may direct this criticism to Neil Hodgson (main developer of Scintilla) rather than Don Ho.
CChris
I just installed VS on another PC, but this time, while I am coding, it is not marking syntax errors while I am coding..... I need to press F6 to get the errors.
Normally when for example typing the line below, I get 's' underlined saying that there is a mismatch. Any ideas how I can enable this option?
string s = 4;
In order to enable background compilation for C#, which checks you code while typing for many types of errors that are usually only reported when you build the project, you will have to install Service Pack 1 for Visual Studio 2008. If you use the offline MSDN, you will also want to install the updated MSDN Library for Visual Studio 2008 SP1, since there were framework changes from .NET 3.5 RTM to .NET 3.5 SP1 (such as the addition of Entity Framework).
Have you recently deinstalled ReSharper?
(see responses in the same link for other possibilities).
C# has never been as consistent about finding errors while i type as VB.net has. I always assumed it was just due to the freeform nature of the language, which would also explain why C++ never found errors either til build time.
I just moved from Visual Studio 2008 to Visual Studio 2010 (final) and noticed one major flaw:
When I try to use AutoComplete in a C++ source file for managed C++, a small note in the footer appears:
IntelliSense for C++/CLI is not available
Uh, has IntelliSense for C++/CLI been dropped from Visual Studio 2010? Is there any way to get this back? It is rather useful...
You are correct. Unfortunately it has been dropped. You can check this opened issue on Microsoft's Connect website.
I'll just quote them for the sake of the answer:
Unfortunately in this release we had to cut the intellisense support for C++/CLI due to time constraints. If you want to get some intellisense like quick info and memberlist on the native classes you can get it by choosing no /clr support in the project properties.
About getting back intellisense, your best chances for now are using third-party tools like VA Assist for example. I've tried it with Visual Studio 2008 and its IntelliSense is a whole lot better than the default one.
It is available again in Visual Studio 2012.
If you want to get IntelliSense back, install Visual Assist X from Whole Tomato Software. Here you can get a 30-days trial to check the intellisense.
According to the Visual C++ Team Blog, C++/CLI Intellisense will be in the next version of Visual Studio, but not in a service pack for VS2010. That blog post also gives some detail as to what went wrong and led to this sad state.
I don't know if you can use this settings but it work for me. I only check the Common Language RunTime Support for the cpp files that use it. I do not check it for the whole project and I've got intellisense for all the files that don't use the CLI.
Yes! you can enable the IntelliSence, but in a tricky way. Follow these instructions:
Go to your project properties. (Right click on your project name in
Project Explorer, and select Properties. or simply Alt + Enter)
From Configuration Properties, select General
In the right-hand section, find "Common Language Runtime Support"
and change it to "No Common Language Runtime Support".
Click the OK Button.
Now the IntelliSence is working. But a problem is an error when you compile your code! (The error is: error LNK1123: failure during conversion to COFF: file invalid or corrupt)
You can simply go back to Project Properties an change Common Language Runtime Support to "Common Language Runtime Support, Old Syntax (/clr:oldSyntax)".
Good luck.
This solution is only if you don't want Common Language Runtime
It worked for me in VS2010
Go to Project Propreties > Configuration Properties > General > Common Language Runtime Support and set it to No Common Language Runtime Support.
This will work fine just after hitting Apply button.
As mentioned you could install some paid software such as "Visual Assist X from Whole Tomato Software".
or
You could use open source tools that contain intellisense*, one such tool is Qt Creator 3.3.1 (opensource). You have two options, either setup your entire project with Qt to compile using VS2010 compiler, or use Qt to link to your source files and compile with VS2010. You write your code in Qt, save, flip windows to vs2010 and compile and debug.
When changes are saved in Qt, vs2010 will automatically reload the source file in the project and you can compile.