Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-17-2003, 11:15 AM
DHearn DHearn is online now
Registered User
 
Join Date: 06-02-2001
Posts: 8
Unhappy C# Pre-Build step corrupted by Visual Build

If a C# project (using VS.NET 2003) has a pre-build step defined which contains quotes (e.g. dir "c:\windows") and you have 'Set the base address to a random value if not set' selected in the Visual Build Step Properties on the Versions page, then Visual Build replaces the quotes in the project file with ';quote' (converts to valid xml).

Since the pre-build step is executed as a batch file, you get an invalid syntax.

To get around the problem, I changed the Visual Build setting to 'No' since I don't think the option is doing anything for a C# project anyway. But it could pose a problem if my solution also contained C++ projects.
Reply With Quote
  #2  
Old 12-05-2003, 02:37 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
That is due to a bug in the VS.NET C# project file parser in that it doesn't properly parse a double quote char in the project file represented as " (the Make VS.NET action uses the .NET XMLDocument class to modify the base address in the project file, which also results in literal double quote chars in the file getting converted to " when saved).

Not using the base address option is the required workaround for C# and VB.NET projects. VC++.NET correctly writes (and parses) quote chars within project settings to the .vcproj file as " so it won't be a problem for C++ projects. You would need to put the C++ projects in a separate solution or create a C++-only solution and corresponding 'no build' Make VS.NET step to use the base address option.
Reply With Quote
  #3  
Old 12-01-2005, 03:54 AM
wellilein wellilein is online now
Registered User
 
Join Date: 11-30-2005
Posts: 53
Post build event also affected

Independent from the base address setting I get a mistake during the execution of the post build event.

In my case it seems to have problems with newline characters, too. So it says:
Command "quot" is wrong or can't be found.
Command "#xD" is wrong or can't be found.
Command "#xA" is wrong or can't be found.

Is there a workaround for this?
Reply With Quote
  #4  
Old 12-01-2005, 08:39 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
The Make VS.NET Action may also modify the project file if the 'Update the output directory' option on the Project/Solution tab is checked. A workaround might be to uncheck that as well (although I've never seen the error you report caused by VBP).
Reply With Quote
  #5  
Old 12-01-2005, 09:20 AM
wellilein wellilein is online now
Registered User
 
Join Date: 11-30-2005
Posts: 53
Hmm, yes I have set the "Update output directory" flag... but I think I need that one.

Actually I don't want the post build steps to be performed.
I just need them while working with VS.NET. When using VBP, the build script will perform the necessary steps.

Perpaps you can introduce another checkbox like
[ ] Skip post build event
in one of the future versions.

Maybe the messages I posted are not correct. I just translated them from the german version o VBP.
Reply With Quote
  #6  
Old 12-01-2005, 10:08 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Attached is a project that fixes up the .csproj files after modification by VBP so that VS.NET loads build events properly.
Attached Files
File Type: bld quot.bld (2.0 KB, 2111 views)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 05:42 PM.


Copyright © 1999-2023 Kinook Software, Inc.