locked
Metro/C# compiling error

    Question

  • VS 2011 compiling error "cannot find the path specified."

    In VS 2011 preview I have a Metro/C# that
    uses the C# file:

    C:\MP_Dev\MP_Code\PBLKe\@SHARED\BTriggerBase.cs

    in the project file I can see:

     <Compile Include="@SHARED\BTriggerBase.cs"

    When Compiling the project I get the following error:

    Error 11 Error opening response file 'c:\MP_Dev\MP_Code\PBLKe\shared\BTriggerBase.cs' -- 'The system cannot find the path specified. ' C:\MP_Dev\MP_Code\PBLKe\CSC PBLKe

    The compiler is changing "@SHARED" to "shared"  !

    This same project compiles ok in VS 2010.

     

     

    Friday, October 21, 2011 7:06 PM

Answers

  • Hello,

     

    I have reproduced the above issue successfully and reported it through the connect site.  If you go to http://connect.microsoft.com/visualstudio and search feedback for the id 696149. (put 696149 in the upper right hand corner search text box on web page.  

    Dev 11 Building in IDE with a foldername that contains @ fails

    As you already know in the msbuild command line, we can specify what is called a response file using @ where the response file contains additional msbuild command line arguments (msbuild /?). 

    @<file>            Insert command-line settings from a text file. To specify
                       multiple response files, specify each response file
                       separately.

    In Visual Studio 11, they are building out of process whereas in Visual Studio 2010, IDE builds were done in process of the devenv process.  The good thing is that Visual Studio 11, IDE builds will be very similar to command line builds now.  Sometimes we would see scenarios where the build works in the IDE but not in an automated command line build scenario.   This is exactly the type of bug where even in 2010 it would work in the IDE but building the project from command line fails.

    I tried to escape out the @ within the csproj file but it is still causing an ambiguity.

    As a temporary workaround, could you rename the folder without the @ symbol?

    much appreciated,

    mike

    Friday, October 21, 2011 10:27 PM
    Moderator