none
Build failed, but no errors! What do I do?

    Question

  • Just installed the release version of LS, and started to play. Been using the beta on another machine, so I have a good diea what to do. This machine has Windows 7 Pro 64 bit SP1, VS Pro SP1, SQL Server 2008 R2 latest SP.

    I added a new LS C# project to an existing solution I have, added a datasource (database on the local SQL Server 2008 R2), and added a screen. I messed around with the screen designer a bit, but only there, I didn't write any code at all.

    When I try to run the project, I get the following in the output window...

    ------ Build started: Project: Client, Configuration: Debug Any CPU ------
    ------ Build started: Project: ServerGenerated, Configuration: Debug Any CPU ------
    ------ Build started: Project: ClientGenerated, Configuration: Debug Any CPU ------
    ------ Build started: Project: JBD.WebSite.AdminLS, Configuration: Debug Any CPU ------
            Done building project "ServerGenerated.csproj" -- FAILED.
    Done building project "JBD.WebSite.AdminLS.lsproj" -- FAILED.

    Build FAILED.
    ========== Build: 0 succeeded, 4 failed, 2 up-to-date, 0 skipped ==========

    ...and a message box telling me there were errors. However, the error list is completely empty, no errors, warning or messages.

    Any idea how I find out what went wrong? As I said, I haven't done enough to cause build errors. All I did was some dragging and dropping around the screen designer. I did far more than this on the test machine, and it worked fine.

    Thanks for any help.


    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/
    Tuesday, July 26, 2011 5:59 PM

All replies

  • If you didn't already, you might try Build - Rebuild Solution.
    Tuesday, July 26, 2011 6:17 PM
  • Just to follow up to my own post, I just tried a new LS solution, not part of an existing one, and did basically the same thing as before, and it worked fine.

    Is there any reason why a LS project can't live in the same solution as other projects? Specifically, my solution has a few class libraries, and an ASP.NET web site. All the other projects in the solution build fine, as you can see from the output window when I compile the full solution...

    ------ Build started: Project: JBD.Entities, Configuration: Debug Any CPU ------
      JBD.Entities -> C:\Users\AY Silver\Pixata\JBD\JBD.WebSite\JBD.Entities\bin\Debug\JBD.Entities.dll
    ------ Build started: Project: Common, Configuration: Debug Any CPU ------
      Common -> C:\Users\AY Silver\Pixata\JBD\JBD.WebSite\JBD.WebSite.AdminLS\Common\Bin\Application.Common.dll
    ------ Build started: Project: JBD.Data, Configuration: Debug Any CPU ------
      JBD.Data -> C:\Users\AY Silver\Pixata\JBD\JBD.WebSite\JBD.Data\bin\Debug\JBD.Data.dll
    ------ Build started: Project: Server, Configuration: Debug Any CPU ------
      Server -> C:\Users\AY Silver\Pixata\JBD\JBD.WebSite\JBD.WebSite.AdminLS\Server\bin\Debug\Application.Server.dll
    ------ Build started: Project: Client, Configuration: Debug Any CPU ------
    ------ Build started: Project: ServerGenerated, Configuration: Debug Any CPU ------
    ------ Build started: Project: ClientGenerated, Configuration: Debug Any CPU ------
    ------ Build started: Project: JBD.Data.ForLinqPad, Configuration: Debug Any CPU ------
      JBD.Data.ForLinqPad -> C:\Users\AY Silver\Pixata\JBD\JBD.WebSite\JBD.Data.ForLinqPad\bin\Debug\JBD.Data.ForLinqPad.dll
    ------ Build started: Project: JBD.WebSite.AdminLS, Configuration: Debug Any CPU ------
            Done building project "ServerGenerated.csproj" -- FAILED.
    Done building project "JBD.WebSite.AdminLS.lsproj" -- FAILED.

    Build FAILED.
    ------ Build started: Project: Postcodes, Configuration: Debug x86 ------
      Postcodes -> C:\Users\AY Silver\Pixata\JBD\JBD.WebSite\Postcodes\bin\Debug\Postcodes.exe
    ------ Build started: Project: WebFormsMvp.AysUtils, Configuration: Debug Any CPU ------
      WebFormsMvp.AysUtils -> C:\Users\AY Silver\Pixata\JBD\JBD.WebSite\WebFormsMvp.AysUtils\bin\Debug\WebFormsMvp.AysUtils.dll
    ------ Build started: Project: JBD.Repositories, Configuration: Debug Any CPU ------
      JBD.Repositories -> C:\Users\AY Silver\Pixata\JBD\JBD.WebSite\JBD.Repositories\bin\Debug\JBD.Repositories.dll
    ------ Build started: Project: JBD.WebSite, Configuration: Debug Any CPU ------
      JBD.WebSite -> C:\Users\AY Silver\Pixata\JBD\JBD.WebSite\JBD.WebSite\bin\JBD.WebSite.dll
    ------ Build started: Project: JBD.Repositories.Test, Configuration: Debug Any CPU ------
      JBD.Repositories.Test -> C:\Users\AY Silver\Pixata\JBD\JBD.WebSite\JBD.Repositories.Test\bin\Debug\JBD.Repositories.Test.dll
    ------ Build started: Project: JBD.WebSite.Test, Configuration: Debug Any CPU ------
      JBD.WebSite.Test -> C:\Users\AY Silver\Pixata\JBD\JBD.WebSite\JBD.WebSite.Test\bin\Debug\JBD.WebSite.Test.dll
    ========== Build: 11 succeeded or up-to-date, 4 failed, 0 skipped ==========

    Any ideas? Thanks


    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/
    Tuesday, July 26, 2011 6:18 PM
  • Hi,

    While it's possible to add multiple projects to a LightSwitch solution using Visual Studio Pro and above, it isn't an officially supported scenario. It may work with some combinations of project types, and as you have discovered, it may not work with other combinations.

    I would expect that adding class libraries wouldn't be a problem, but I would also expect that an ASP.NET web project would be an issue since you essentially have two projects fighting for the use of LocalHost.

    Hope this helps,


    Steve Hoag Microsoft aka the V-Bee
    Tuesday, July 26, 2011 6:35 PM
  • Ah, I never thought of that Steve. Although, I've never had a problem with multiple web sites and/or services, as each one uses a different port on the VS development server. I'm surprised that I had a problem here.

    I'm also a bit puzzled as I ran the LS project after starting the solution from fresh, so there shouldn't have been any active instances of the VS development server. When I ran the project, it should have only started the one for the LS project shouldn't it? Or am I missing something?

    Finally, why did it give build errors if the problem was to do with the server. Isn't that a run-time issue?

    Thanks for the reply. Like most of us, I'm quite new with LS, and would appreciate any background info you can give.


    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/
    Tuesday, July 26, 2011 7:35 PM
  • Just a guess that it might have something to do with LocalHost. Since it isn't a supported scenario, it isn't something that we would have tested.

    Is there a reason that you need both the LightSwitch project and the web project in the same solution? As you note, you can't run them both at the same time.

    Regards,


    Steve Hoag Microsoft aka the V-Bee
    Tuesday, July 26, 2011 7:56 PM
  • This should work. 

    Are there dependencies between the LightSwitch project and your class library?  If so, which LightSwitch child project did you add the refrence to?


    John Hart (Microsoft)
    Wednesday, July 27, 2011 8:37 PM
  • Just a guess that it might have something to do with LocalHost. Since it isn't a supported scenario, it isn't something that we would have tested.

    Is there a reason that you need both the LightSwitch project and the web project in the same solution? As you note, you can't run them both at the same time.

    Hi Steve,

    I have a public-facing web site that is well under development, and was interested in using LS for the back-end admin. I assumed I could add a LS project to the solution, then deploy it to a subfolder of the main site, and add security so only the admin people can get in.

    I'm not worried about running them together during development. I can live with that restriction, but I would like to be able to have the LS app in the same solution, so it can share the source control.


    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/
    Thursday, July 28, 2011 9:26 AM
  • This should work. 

    Are there dependencies between the LightSwitch project and your class library?  If so, which LightSwitch child project did you add the refrence to?


    Confused! Was this an answer to my post? If so, to which point? It looks like an answer to another post I made about testing a class library. Did you reply in the wrong thread?

    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/
    Thursday, July 28, 2011 9:28 AM
  • Sorry for the confusion. My response was to your original post. You should be able to have more than one project in your solution alongside a LightSwitch project. This shouldn't affect the ability to build your LightSwitch project. My question for you regarding the dependencies was an attempt to try and narrow down why you’re seeing the build issues. Does the LightSwitch project have any dependencies on the class library? In other words, have you added any references to your LightSwitch project? Based on your response to Steve it sounds like there may not be.

     
    John Hart (Microsoft)
    Thursday, July 28, 2011 6:20 PM
  • No, the original solution was for an ASP.NET web site, which has several supporting classes and test projects. The web site depends on those classes, but the Lightswitch project I added was totally independent of any other project. I only added it to the same solution, as it was to be for an admin application for the main web site so it seemed logical to put them in the same solution. It also kept them together for source control.

    Hope that clarifies it.


    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/
    Thursday, July 28, 2011 6:33 PM
  • In order to better determine what is causing the failure it would be helpful to see a little more information while the build is occurring.

     

    There is a Visual Studio option that we can turn on that should help.

     

    To turn this on can you please try doing the following:

     

    1) In Visual Studio Open Tools/Options Menu

    2) Check "Show all Settings" if it's not checked

    3) Expand the Project and Solutions Node

    4) Select Build and Run under Project and Solutions

    5) Under the “MSBuild project build output verbosity” drop/down Select “Diagnostics”

    6) Rebuild the LightSwitch Project

    7) Copy all of the Build Output

     

    Since this will probably be a lot of information go ahead and email it to me directly (JohnHart @Microsoft.com).

     

    You may want to go back after collecting this information and resetting the verbosity to Minimal.


    John Hart (Microsoft)
    Thursday, July 28, 2011 11:14 PM
  • Well, the really odd thing is that I just added a LS project to the same solution as I did before (I'd deleted it since then as I was having problems), and it worked fine! I could even run the main web site and the LS app at the same time.

    I have no idea what went wrong before, but since then I've had a boat load of trouble with VS, and ended up uninstalling and reinstalling it (several times actually, but that's another story). Looks like this might have sorted out the problem.

    I'll keep an eye on it and see what happens. Thanks for the help.
    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/
    Sunday, July 31, 2011 8:41 PM
  • Just try restarting Visual Studio IDE. It worked for me.
    Monday, September 12, 2011 8:07 PM
  • Thanks, but that wasn't it. The problem was persistent even across reboots.

    Anyway, as I said, it seems to have been fixed by a complete reinstall.


    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at http://dotnetwhatnot.pixata.co.uk/
    Monday, September 12, 2011 10:55 PM
  • I experienced something simular. No errors but the solution build fails. I cannot run the application anymore. After some digging around I discovered that there was something wrong with the datasource. I tried updating it but it only gave me a 'Could not determine storage version; a valid storage connection or a version hint is required.'

    I googled for the message but only got a handfull of posts. It seems to be an EF4 message and none of the posts was really helpfull. I had to revert back to an old backup, losing quite some work :(

    Thursday, September 22, 2011 8:35 PM
  • Genius!
    Thursday, December 20, 2012 3:57 PM