locked
Lightswitch Build Failure RRS feed

  • Question

  • I am using Visual Studio Pro 2010 SP1 with Lightswitch Beta 2. OS is Windows 7 x64

    I have built a 3 table app and built and run the app no problems. I then started to add  custom code to the Client User Code to load an image resource. When I rebuild the solution I get  a warning and three errors (detailed below) that cause the build to fail.

    I have already checked the following:-

    1) checked full control permissions for admin users on the dev folder (below).

    2) Tried adding granted permissions to the lsproj.user,  as suggested (from another forum article)  - failed and doesn't make much sense

    3) iso installed is VSLSBETA2ENU1.iso. Beta 1 was never installed.

    I am not concerned about error 3 and error 4. These are easily rectified, but I am concerned about warning 1 and error 2 as these appear to have some issues with shared components.

    Please advise how I should proceed?

    --------------------------------------------------------------------------------------------------------

    Warning 1 Unable to delete file "C:\dev\Apps\Visual Studio 2010\Projects\TimeRecording16\TimeRecording16\bin\Debug\vslshost.exe". Access to the path 'C:\dev\Apps\Visual Studio 2010\Projects\TimeRecording16\TimeRecording16\bin\Debug\vslshost.exe' is denied. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets 3607 10 TimeRecording16

    Error 2 Unable to copy file "C:\dev\Apps\Visual Studio 2010\Projects\TimeRecording16\TimeRecording16\ClientGenerated\bin\Debug\TimeRecording16.Client.xap" to "bin\Debug\web\TimeRecording16.Client.xap". Could not find file 'C:\dev\Apps\Visual Studio 2010\Projects\TimeRecording16\TimeRecording16\ClientGenerated\bin\Debug\TimeRecording16.Client.xap'. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v1.0\Microsoft.LightSwitch.targets 149 10 TimeRecording16

    Error 3 Type 'ImageLoader' is not defined. C:\dev\Apps\Visual Studio 2010\Projects\TimeRecording16\TimeRecording16\Client\UserCode\SServLoadImage.vb 10 76 Client

    Error 4 'myimage' is not a member of 'LightSwitchApplication.Start'. C:\dev\Apps\Visual Studio 2010\Projects\TimeRecording16\TimeRecording16\Client\UserCode\Start.vb 8 13 Client

     

    Tuesday, July 26, 2011 3:46 AM

Answers

  • Thanks Yann, your comments on the errors and a possible namespace error put me on the right track. I ignored the Warning 1 and error 2 which sent me off in the wrong direction and focused on error 3 and 4.

    I found two errors in my code. The first was an incorrect reference to my public class and the second was a type Image used in the public class instead of a binary read. I guess these would have been more noticeable if I was more familiar with LS and SilverLight code. Still the debug errors were a bit misleading. Something I will have to get used to in VSLS.

    The build completed with no errrors but I still have a general fatal error HRESULT = ox80070005. I have had these before and they are usually solved with a clean and rebuild, but I still don't know exactly what causes them which is another concern. If anyone has any ideas I would be grateful.

    Once again thank you.

    Jay

    ______________________________________________________

     

    Tuesday, July 26, 2011 9:58 AM

All replies

  • Warning 1 is very common, & doesn't seem to affect anything really. I get it all the time. I remember reading that someone "solved" it, but seeing as it hasn't been causing me a problem, I haven't worried about it.

    Error 2 is probably due to errors 3 & 4, though I must admit it's different to what I usually see when some project hasn't managed to compile properly due to a code error. The build process continues on & of course fails when it can't find the project that didn't compile.

    Error 3 *might* be caused by a lack of the LightSwitchApplication NameSpace that usually gets added automatically for code that is generated by LS. If you added the code file yourself, which it looks like you might have, just add the namespace, & ImageLoader should then become visible, which should make error 3 & 4 go away.

    Once they're fixed, the others *should* disappear as well.


    Yann

    (plus ça change, plus c'est la même chose!)

    Tuesday, July 26, 2011 4:46 AM
  • I would close and restart Visual Studio, reload your solution, clean and rebuild it.
    Simon Jones
    Tuesday, July 26, 2011 7:24 AM
  • Thanks Yann, your comments on the errors and a possible namespace error put me on the right track. I ignored the Warning 1 and error 2 which sent me off in the wrong direction and focused on error 3 and 4.

    I found two errors in my code. The first was an incorrect reference to my public class and the second was a type Image used in the public class instead of a binary read. I guess these would have been more noticeable if I was more familiar with LS and SilverLight code. Still the debug errors were a bit misleading. Something I will have to get used to in VSLS.

    The build completed with no errrors but I still have a general fatal error HRESULT = ox80070005. I have had these before and they are usually solved with a clean and rebuild, but I still don't know exactly what causes them which is another concern. If anyone has any ideas I would be grateful.

    Once again thank you.

    Jay

    ______________________________________________________

     

    Tuesday, July 26, 2011 9:58 AM
  • You're very welcome! I'm glad I could at least point you in the direction you needed.

    Yann

    (plus ça change, plus c'est la même chose!)

    Tuesday, July 26, 2011 10:41 AM