views:

400

answers:

2

I have 2 machines that have the Express version of C# on them.

On one, I can build my solution and my build events execute perfectly. On the other, no matter what is put in the event it always fails. The build output has "C:\Documents in not a valid path" or something to that effect, and points to the line in Microsoft.Common.targets that contains Exec WorkingDirectory="$(OutDir)" whether it is a pre or post build event. I have deleted the targets file along with some of the MSBuild files and then repaired .Net hoping that would fix the problem, but no luck.

Any suggestions on what to do next?

Edit: This is the error that I am getting.

"E:\Programs\Visual Studio 2008\Projects\Work\Brandcode Manager....\Tools\Versioner.exe" "E:\Programs\Visual Studio 2008\Projects\C_Sharp\kjCommonFunctions\kjCommonFunctions\Properties\AssemblyInfo.cs"

'C:\Documents' is not recognized as an internal or external command, operable program or batch file. The system cannot find the path specified.

C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(895,9): error MSB3073: The command ""E:\Programs\Visual Studio 2008\Projects\Work\Brandcode Manager....\Tools\Versioner.exe" "E:\Programs\Visual Studio 2008\Projects\C_Sharp\kjCommonFunctions\kjCommonFunctions\Properties\AssemblyInfo.cs"" exited with code 1.

A: 

At a guess I would say it is missing quotes somewhere - ie folders with spaces in the name, assuming the actual path is in C:\Documents and Settings\... but would need to see the real build output and the path of your solution file to give a definative answer

Chris Ballard
Krakerjak
A: 

Here's what I ended up figuring out.

The username for the autologon account for the computer I was using (generic logon for our shared laptops) included an ampersand (&). I think that may have been causing the problems. When I created another account on that laptop and then compiled from there both my pre & post-build events worked.

KJ

Krakerjak