Solved

How to compile in Visual Studio 2008 with errors

Posted on 2009-05-20
9
395 Views
Last Modified: 2013-11-26
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.
0
Comment
Question by:TheAnvilGroup
  • 5
  • 2
9 Comments
 
LVL 39

Expert Comment

by:abel
ID: 24430762
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
 
LVL 1

Author Comment

by:TheAnvilGroup
ID: 24431494
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
 
LVL 39

Accepted Solution

by:
abel earned 50 total points
ID: 24431597
> 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 39

Expert Comment

by:abel
ID: 24431618
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
 
LVL 39

Expert Comment

by:abel
ID: 24431645
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
 
LVL 1

Author Closing Comment

by:TheAnvilGroup
ID: 31583462
Okay so it's not possible. Thanks.
0
 
LVL 39

Expert Comment

by:abel
ID: 24431858
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

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
egit plugin on eclipse 8 28
vb.net checkbox 7 41
Data is not showing from images 15 36
Run a batch file when a Crystal Report is opened 5 12
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now