Solved

How to compile in Visual Studio 2008 with errors

Posted on 2009-05-20
9
394 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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

758 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

22 Experts available now in Live!

Get 1:1 Help Now