Tagged Questions
1
vote
3answers
151 views
#pragma warning disable & restore
I Used to c# to create a First Project.
I got Many Warning errors and All these Warning error are to be singel Error(Internal compiler error. See the console log for more information.)
For Reducing ...
1
vote
2answers
73 views
Building successfully, yet gives warnings that referenced components cannot be found
When I build my project I keep getting warnings that various referenced components could not be found in multiple projects, however it does say that the build was successful. If I remove/readd the ...
1
vote
2answers
162 views
Deriving from Exception classes warning: CA2237: Mark ISerializable types with SerializableAttribute
I derived several classes from various exceptions. Now vs gives warning as in the title of this question.
1.Could someone explain what implications of suppressing this rule?
2.Could you explain ...
3
votes
1answer
413 views
VB.Net coding guidelines [closed]
We develop small applications for various customers. I now got a task to set up some coding guidelines for in-house and external programmers.
(Management know nothing about development and only see ...
-1
votes
1answer
311 views
How do I prevent the warning about 'System.Web.Mail.SmtpMail' being obsolete?
How to prevent this warning?
Warning: 'System.Web.Mail.SmtpMail' is obsolete: 'The recommended alternative is System.Net.Mail.SmtpClient. http://go.microsoft.com/fwlink/?linkid=14202' ...
2
votes
1answer
1k views
Warning AL1073 when generating satellite assemblies
Under Visual Studio 2010, I am getting a compiler warning when generating a localized satellite assembly for a project. I am running Windows 7 64-bit.
The project is being built in x86 (it has to be ...
13
votes
3answers
5k views
How to ignore compiler warning when using Obsolete attribute on a class used with a Knowntype attribute
So we are trying to deprecate some of our existing classes, and have started marking them as obsolete with the ObsoleteAttribute so they will stop being used. The fact that using the KnownType ...
1
vote
1answer
141 views
How can I see warnings in Linqpad?
When I create C# Programs in LinqPad, I would like to see the warnings from the compiler. It already shows error messages. How can I see the warnings?
2
votes
1answer
722 views
How do I suppress this COM Generics warning?
I'm compiling a VB.Net 2.0 app (created in VS2008) using msbuild, and now I've added a generic return type, it's giving me the following:
Warning: Type library exporter
encountered a generic ...
4
votes
3answers
532 views
How to supress C# warning CS0675 : Bitwise-or operator used on a sign-extended operand
I can't seem to get rid of this warning for the following line of code:
d.word[wrdIndex++] = d.GetWord(english) | (ulong)i;
the warning applies to the code after the assignment operator. the method ...
2
votes
1answer
684 views
How to disable VS compile warning “class or css class is not defined”
In VS 2008, when I compile, I get a large series of The class or CssClass value is not defined messages.
How do I get the error/warning code (something like "C0167") for that message, so I can ...
18
votes
5answers
8k views
C# Compiler Warning 1685
So, (seemingly) out of the blue, my project starts getting compiler warning 1685:
The predefined type
'System.Runtime.CompilerServices.ExtensionAttribute'
is defined in multiple assemblies in
...
9
votes
2answers
1k views
What are the consequences of NON-CLS Compliant code in .NET?
I have a couple of nagging compiler warnings for an app that I ported from VB6 a while back regarding CLS-Compliance including:
Name '_AnIdentifier' is not CLS-Compliant.
Type of parameter 'myType' ...
48
votes
7answers
10k views
Custom Compiler Warnings
When using the ObsoleteAtribute in .Net it gives you compiler warnings telling you that the object/method/property is obsolete and somthing else should be used. I'm currently working on a project that ...