How to compile in Visual Studio 2008 with errors

I have a web application that was created by a previous programmer that I now have to make changes to. Unfortuanatly I get a few annoying errors that arn't actually errors. For example Visual Studio telling me that word-wrap is not a valid in the CSS section, which it is.

As it errors it wont compile the app is there any way to stop this and get visual studio to compile with all errors. Or treat them as warnings.
LVL 1
TheAnvilGroupAsked:
Who is Participating?
 
abelCommented:
> do is turn off the option to not compile if there are errors.

such a thing does not exist. Suppose I would write this in web.config:

<configurationss>
    <config-Sections>

instead of

<configuration>
    <configSections>

how would the compiler possibly know what I meant. Or if I wrote "Dime bla As NoObject", how could the compiler ignore "Dime" and "NoObject"?

Your (a) is not an issue. Like I said, the CSS errors are reported but will not stop compilation. Just fix that line in web.config and you are all set. Most CSS files contain deliberate errors (i.e. to help Microsoft IE to display properly, you use properties like _width etc). Not compiling when CSS errors occur would mean that hardly any project would build.

But you don't have to take my word for it, try it, and check for yourself ;-)
0
 
abelCommented:
For 50p? Must be very easy to solve. Let me try: if your app does not compile, that's not because of any XML, CSS, HTML or related errors, but because of coding errors, which do matter and must be resolved in order to compile. Look lower in the list of errors and/or close any windows that show the CSS (this will remove these errors from the list, making it easier for you to see the wood for the trees).
0
 
TheAnvilGroupAuthor Commented:
It wont compile because of a) the CSS issue, which is not an error just Visual Studio not recognising a valid CSS tag and b) because it doesn't like a setting in the web.config. The only way i can see to stop this error is to spend a fair amount of time setting my development machine up like the previous guys. I really want to avoid this.

To reiterate there are no coding errors in the web application at all and it wont compile because it thinks there are. 50points because all I want to do is turn off the option to not compile if there are errors. If there is one.

0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
abelCommented:
Btw, the opposite is possible. If you are referring to warnings and not errors, you can turn that into errors (they will still display as warnings, but will break compilation). You can set that on the Build-tab of the Properties of the project.

But nothing will help as long as web.config isn't fixed.

ScreenShot299.png
0
 
abelCommented:
If you want to take this one level further, what's often done with Open Source projects is that a prebuild step is used to make intermediate changes to the files that would otherwise not compile on a higher (or lower) version of Visual Studio. A fine example is the Visual Studio configuration of the Apache source, where they added prebuild steps with the awk-tool to manipulate some textfiles and fix them, without breaking backward compatibility.

If you want to go that path, take a deep breath, because it can be tricky to get right, depending on your demands, of course. You can put your custom scripts on the Build Events tab.
0
 
TheAnvilGroupAuthor Commented:
Okay so it's not possible. Thanks.
0
 
abelCommented:
I helped you out, gave you extensive information on how you can deal with it, disregarding the 50p (just as much as I love earning points, I love to learn or help out). What are you missing that you are giving a lower grade (was I slow, not giving enough information, only pointing to a link)?

Please check the 10pts must principle and give us experts the chance to earn that grade by giving feedback. And don't let "cannot be done" situation cloud your judgment.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.