Bug 3824 - xbuild fails to resolve project references if any part of the path contains an @
Summary: xbuild fails to resolve project references if any part of the path contains an @
Status: NEW
Alias: None
Product: Tools
Classification: Mono
Component: xbuild ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2012-03-09 10:44 UTC by David Schmitt
Modified: 2014-01-10 06:03 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

A sample project (6.31 KB, application/x-zip-compressed)
2012-03-09 10:44 UTC, David Schmitt

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 3824 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description David Schmitt 2012-03-09 10:44:15 UTC
Created attachment 1489 [details]
A sample project

When compiling a solution whose location contains an '@', xbuild fails to resolve project references within the solution.

I've attached a small example project to demonstrate the problem. The contents of the project are irrelevant up to the point that they compile with the msbuild (4.0) and xbuild versions I've tested except when the path contains an '@'.

I've tested with the following versions, locally compiled on Debian squeeze:

  * master/2927d27
  * mono-2-10/520065c

Both fail with the same error: 

> Program.cs(5,7): error CS0246: The type or namespace name `ClassLibrary1' could not be found. Are you missing a using directive or an assembly reference?

Increasing verbosity, I've found the cause through this message:

> Primary Reference from AssemblyFiles /.../foo%40bar/ClassLibrary1/bin/Debug//ClassLibrary1.dll, file not found. Ignoring

where the directory actually should be called "/.../foo@bar". This seems to be a rather trivial encoding error.
Comment 1 Greg Najda 2013-12-29 21:47:51 UTC
I run into the same problem when using "bin\Debug (AnyCPU)" and "bin\Debug (x86)" for the output directories of a .exe project and I have a unit test project that references the executable project. The executable project gets built, but then it is not referenced in the compiler command line for the library project.

Running xbuild with /verbosity:diagnostic, I find this line:

Primary Reference from AssemblyFiles /home/greg/dev/dbsc/mongodbsc/bin/Debug %28x86%29//mongodbsc.exe, file not found.

I'm using mono on Ubuntu.