locked
Error after installing the VS2012 update CTP4 and creating a new html client (To Lightswitch Team) RRS feed

  • Question

  • Hi,

    Made a fresh install (not a upgrade project from preview 2).

    All works nice and project builds and runs.

    When I create a html client and build I get the following errors. What to do?

    Pleace Help

    Sven


    Zoom in image

    SE1969


    Tuesday, March 5, 2013 7:57 AM

All replies

  • Got the same error here. For me it seems to be related to the RIA service used by DevExpress Reports which I use in the upgraded project.

    Regards

    JensBo

    Tuesday, March 5, 2013 11:02 AM
  • Yes,

    Found out that too.

    Not good because I'm using it much.

    Any suggestion?

    Sven


    SE1969

    Tuesday, March 5, 2013 3:38 PM
  • Similar error here, though not exactly.  The error occurs on both a manually upgrade CPT2 project and a newly generated CTP4 project:

    Thanks,
    David


    Efficiently read and post to forums with newsreaders: http://communitybridge.codeplex.com

    Tuesday, March 5, 2013 5:35 PM
  • No response from the LightSwitchteam......


    Would really like to have an answer if the problem lies in the extensions or the HTML client.

    Since all extensions work after the upgrade but not after you added the HTML clientis probably not the fault of incompatible extensions.

    Please answer this if you know the answer.

    regards
    Sven


    SE1969

    Wednesday, March 6, 2013 11:44 AM
  • Hey Sven,

    Can you delete the contents of these 2 folders and let me know if it helps.

    1. %localappdata%\Microsoft\MSBuild\VSLS\11.3
    2. %localappdata%\Microsoft\VisualStudio\11.3

    We seen an issue like this where the contents of a cache we use to optimize some performance get out of date. When LS then attempts to load the assemblies it gets a little confused.

    Thanks,

    Kris

     

    Kris Langohr | Senior SDET | LightSwitch QA

    • Proposed as answer by David Ching Wednesday, March 6, 2013 5:52 PM
    • Marked as answer by Sven Elm Wednesday, March 6, 2013 6:49 PM
    • Unmarked as answer by Sven Elm Wednesday, March 6, 2013 6:52 PM
    Wednesday, March 6, 2013 4:38 PM
  • Thanks for the information Kris. I have the same issue but can't find the folders, any further information about the location?

    Thank you very much,

    Jesús


    • Edited by Jesus77 Wednesday, March 6, 2013 5:36 PM
    Wednesday, March 6, 2013 5:35 PM
  • Hey Jesús,

      How far down the path can you get before the folders no longer exist?

    Thanks,

    Kris


    Kris Langohr | Senior SDET | LightSwitch QA

    Wednesday, March 6, 2013 5:43 PM
  • @Kris - Thanks, this fixed my problem.  The builds succeed now!  :-)

    @Jesus77 - the folders are typically e.g. c:\users\<login name>\AppData\Local\Microsoft\...

      where <login name> is the name you log into the Windows desktop as

    BTW:  I don't have any extensions.

    -- David


    Efficiently read and post to forums with newsreaders: http://communitybridge.codeplex.com


    • Edited by David Ching Wednesday, March 6, 2013 5:51 PM
    Wednesday, March 6, 2013 5:47 PM
  • Thanks Jesús,

    You can find the folder at c:\users\<loginname>\AppData\Local\Microsoft. These settings are saved on a per user basis so rather than being placed under program files they are put under your local AppData folder.

    As an additional note if you open windows explorer and go to the c:\users\<loginName> folder you won't see AppData listed, it is hidden. You will need to specifically type in the AppData part. Once you have gotten into the AppData folder Windows Explorer will once again start showing you the subfolder listings.

    Hope that helps,

    Thanks,

    Kris


    Kris Langohr | Senior SDET | LightSwitch QA

    Wednesday, March 6, 2013 6:03 PM
  • Thank you very much David and Kris for your help, I found the folders and delete it.

    After that I still having the same problem, then I deleted the ManifestCache of folder 11.0 and now it works right.

    C:\Users\<login name>\AppData\Local\Microsoft\VisualStudio\11.0\ManifestCache

    Thanks and regards,

    Jesús

    Wednesday, March 6, 2013 6:38 PM
  • No.

    It did not work.

    Found only VSLS and took away the content.

    Not working...


    SE1969


    • Edited by Sven Elm Wednesday, March 6, 2013 6:54 PM
    Wednesday, March 6, 2013 6:49 PM
  • Hi,

    Done Everything and deleted all but it still throws the same exceptions.

    PLEACE HELP!

    Need to get it work.

    It must have to do with extensions because if I remove them it works.

    How can it be possible when every extension work just Before I add a html client?

    regards

    sven


    SE1969

    Wednesday, March 6, 2013 9:12 PM
  • Hi SE1969_SWE,  

    I deleted the ManifestCache on folders VSLS and VisualStudio\11.3 and 11.0. After that, when I run the project it worked well without errors, but the extensions (many to many and bing maps) where disabled or missing. Then I went to the extensions menu and changed their state (I think to enable them), after that I closed Lightswitch and restarted, then it worked well and the extensions too. I wish I could be more helpful, I don't understand why in my case it worked because I'm really amateur, 

    Regards and good luck,

    Jesus

    Thursday, March 7, 2013 12:01 AM
  • Hi sven

    I have been in contact with DevExpress support and as I understand their answer there is basicly no backwards support for XtraReports going from VS2012 Lightswitch to CTP4. Their proposed answer is to build a new project with HTML client and then make the report initialization anew.

    I suppose one could remove all traces of XtraReports in the current project. Get it to compile. Add a HTML Client. Compile. And then add the DevExpress Extension again.

    Actual reports could be saved as files and loaded again.

    I am not sure this works (and i know a hotfix to DevExpress is needed (2012.2.7). I plan to try myself this friday.

    Br

    JensBo

    Thursday, March 7, 2013 12:57 PM
  • Hi

    Thanks.

    I try it out.

    I made it work, just not with Devexpress.

    regards

    Sven


    SE1969

    Thursday, March 7, 2013 1:30 PM
  • Hey Sven,

    We have been able to repro the problem that you are seeing internally and are working on a fix for the issue. It is related to the use of extensions. I will provide an update when I have some additional details.

    Thanks,

    Kris


    Kris Langohr | Senior SDET | LightSwitch QA

    Thursday, March 7, 2013 4:40 PM
  • Thank you.
    I really appreciate it.

    I Think the new HTML client looks great and you have really listened to what we want.

    I am very Confident that this will be a great Product so continue to develop at the same speed.

    Lightswitch is a great product that allows us developers to focus on the user and not just the code.

    Quick and Clean!

    Good work!

    regards

    sven


    SE1969





    • Edited by Sven Elm Thursday, March 7, 2013 6:25 PM
    Thursday, March 7, 2013 6:19 PM
  • Hello,

    Just wondering if you know when you fixed the problem. Will it take long?

    Do not want to rush you but am very interested to get started.

    regards
    Sven


    SE1969

    Saturday, March 9, 2013 5:25 AM
  • Morning Sven,

    We have fixed the issue that you were seeing and it will be available when our final bits release. Thanks again for reporting the issue.

    Thanks,
    Kris


    Kris Langohr | Senior SDET | LightSwitch QA

    Monday, March 11, 2013 3:33 PM
  • Hi

    Okey,

    What do you mean with our final bits release. Do you mean we have to wait to next release??

    Or will you release an update now, soon, when?

    Regards

    sven


    SE1969

    Monday, March 11, 2013 3:58 PM
  • Morning,

    The fix will be included in the final release of Visual Studio Update 2. I can't give an exact final date for the release at this time unfortunately.

    Thanks,

    Kris


    Kris Langohr | Senior SDET | LightSwitch QA

    Monday, March 11, 2013 4:23 PM
  • Can you clarify please is if there's an update now or in the next version?

    In your previous post you said that you notify when there's an update. Would really need to know when as I would otherwise have to return to preview two and then I can plan when I can again try CTP4.

    regards

    Sven


    SE1969

    Monday, March 11, 2013 4:26 PM
  • If an intermediate fix won't be issued and this issue will only be fixed in the final bits, I still would be interested to know more about the fix or whether there's a workaround that won't require us to disable all extensions.

    Thanks.

    Monday, March 11, 2013 4:42 PM
  • Thanks again to everyone for working with us to report issues like this. It if very helpful. You can find details of the fix in the link below. As a reminder CTP4 is a preview release and does not provide a Go-Live license. Please be cautious in using the fix outlined.

    Link to Additional Details: http://social.msdn.microsoft.com/Forums/en-US/lightswitchhtml/thread/3edc8a5d-2933-40f6-8ae4-e5d0f1e1a2ab

    Thanks,

    Kris


    Kris Langohr | Senior SDET | LightSwitch QA

    Monday, March 11, 2013 5:08 PM
  •  
    Thanks,
    David
     

    Efficiently read and post to forums with newsreaders: http://communitybridge.codeplex.com
    Monday, March 11, 2013 5:52 PM
  • Hi,

    Thanks for this but it does not work.

    The error remains.

    Were so happy for a second but now I'm sad again.

    Back to Preview 2 again.

    Maby It's time to close this issue and get on with our lives.

    :-(

    Signing off

    Sven


    SE1969

    Monday, March 11, 2013 7:09 PM
  • I concur, the proposed fix does not work for the issue as posted by SE1969_SWE. Hopefully a valid workaround is available, else I just go back to Preview 2. Would be nice to check out CTP4 though.
    Monday, March 11, 2013 7:56 PM
  • Hey David,

    Brian's message was referring to TFS. The LightSwitch bits are not Go Live for CTP4. We have also made some changes to the runtime between CTP4 and what will be available with our final release. We expect people will want to wait for those changes to be available for any apps they plan to put into production.

    Thanks,

    Kris


    Kris Langohr | Senior SDET | LightSwitch QA

    Tuesday, March 12, 2013 8:12 PM
  • Sven and Mr. Schutten,

    Are you both still hitting exactly the same error you were seeing in the original report? With the fix that Huy mentioned in the linked post we are no longer seeing that issue.

    Thanks,

    Kris


    Kris Langohr | Senior SDET | LightSwitch QA

    Tuesday, March 12, 2013 8:13 PM
  • Hi

    Did Everything you said. The error remains.

    See image. Image of my extension too:

    Any thoughts?


    SE1969

    Wednesday, March 13, 2013 6:37 AM
  • Here comes the third image too (cannot add more then 2 images a time)


    SE1969

    Wednesday, March 13, 2013 6:38 AM
  • Here comes a larger image of the error:


    SE1969

    Wednesday, March 13, 2013 6:39 AM
  • I, too, still have this issue. My extensions are listed below. Except from the default Cosmopolitan Shell and Microsoft Lightswitch Extensions Sven and I don't share the same extensions.

    Wednesday, March 13, 2013 9:04 AM
  • I also have this issue. Removed DevExpress Reports (which I suspected to be the cause) but the build error prevails.

    Tried also the fix given in http://social.msdn.microsoft.com/Forums/en-US/lightswitchhtml/thread/3edc8a5d-2933-40f6-8ae4-e5d0f1e1a2ab but that doesn't solve the issue in my case.

    Regards

    JensBo


    • Edited by JensBo Wednesday, March 13, 2013 4:21 PM
    Wednesday, March 13, 2013 2:06 PM
  • Hi.

    How did you get in image button.

    Cannot find a build for vs2012.

    Do you have it?

    regards

    Sve


    SE1969

    Wednesday, March 13, 2013 7:09 PM
  • Thanks for the clarification Kris.  I think my confusion was in thinking CTP4 for Update 2 was all one package.
     
    -- David
     

    Efficiently read and post to forums with newsreaders: http://communitybridge.codeplex.com
    Thursday, March 14, 2013 12:51 AM
  • I hope this thread isn't dried up, since the issue is still relevant. Especially considering the release bits. Does the Lightswitch team have an update on this?
    Friday, March 15, 2013 7:55 AM
  • Hey Sven,

    It appears that you are hitting a different issue that we discovered while fixing up the first one. The Pixata and Component One controls that you are using expose a second issue that we have addressed in our final bits. Unfortunately there isn't an easy way for me to give you a workaround for those as the error is in our core product bits not one of the runtime libraries.

    Thanks,

    Kris


    Kris Langohr | Senior SDET | LightSwitch QA

    Friday, March 15, 2013 3:21 PM
  • hi kris,

    okey. I understand, then there will be a solution with the final release and nothing now?

    Regards

    sven


    SE1969

    Friday, March 15, 2013 3:59 PM
  • Kris,

    I develop LightSwitch extensions for ComponentOne, and can verify that this issue was fixed in Update 2. However, it seems to have surfaced again in Update 3. If I create a desktop client app that uses one of our extensions, then add an HTML client to the project (no screens), then set the desktop client to be the startup client, when I build the solution I get:

    The "LSResourceGeneratorsTask" task failed unexpectedly.
    Microsoft.LightSwitch.BaseServices.InternalException: Model loading failed. Cannot cast the underlying exported value of type 'C1.LightSwitch.FlexGrid.Metadata.ModuleLoader (ContractName="Microsoft.LightSwitch.Model.IModuleDefinitionLoader")' to type 'Microsoft.LightSwitch.Model.IModuleDefinitionLoader'. ---> System.ComponentModel.Composition.CompositionContractMismatchException: Cannot cast the underlying exported value of type 'C1.LightSwitch.FlexGrid.Metadata.ModuleLoader (ContractName="Microsoft.LightSwitch.Model.IModuleDefinitionLoader")' to type 'Microsoft.LightSwitch.Model.IModuleDefinitionLoader'.
       at System.ComponentModel.Composition.ExportServices.CastExportedValue[T](ICompositionElement element, Object exportedValue)
       at System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export export)
       at System.ComponentModel.Composition.ExportServices.<>c__DisplayClass4`2.<CreateStronglyTypedLazyOfTM>b__1()
       at System.Lazy`1.CreateValue()
       at System.Lazy`1.LazyInitValue()
       at System.Lazy`1.get_Value()
       at Microsoft.LightSwitch.Model.Implementation.ModelServiceBase.<get_ModuleLoaderExports>b__9(Lazy`2 ex)
       at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
       at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
       at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
       at Microsoft.LightSwitch.Model.Implementation.ModelServiceBase.get_ModuleLoaderExports()
       at Microsoft.LightSwitch.Model.Implementation.ModelServiceBase.LoadItems()

    Should I decorate my class with a different attribute (InheritedExport instead of Export, for example)?


    John Juback ComponentOne

    Tuesday, July 16, 2013 5:50 PM
  • Hey John,

    Thanks for reporting this issue. I am working on investigating and will let you know as soon as I have some additional information. Just to confirm did you install the extensions from the latest version of StudioEnterprise available from the C1 website or the LightSwitch Extensions - ComponentOne Studio for LightSwitch from the Extensions dialog in VS?

    Thanks,

    Kris


    Kris Langohr | Senior SDET | LightSwitch QA

    Wednesday, July 17, 2013 4:10 PM
  • Kris,

    I installed this version:

    http://sdrv.ms/18Ql963

    This contains extensions for both desktop and HTML clients, but the desktop extensions alone are sufficient to reproduce the problem. The FlexGrid extension is the easiest one to set up.


    John Juback ComponentOne

    Wednesday, July 17, 2013 4:30 PM
  • Hey John,

    I just tried this out and was unable to reproduce the problem. Do you have a project that repros the issue that you wouldn't mind forwarding to me?

    Thanks,

    Kris


    Kris Langohr | Senior SDET | LightSwitch QA

    Thursday, July 18, 2013 9:30 PM
  • OK, I'm using a slightly more recent version of the extensions, which you can get here:

    http://sdrv.ms/16JfrNk

    And the project that fails to build is here:

    http://sdrv.ms/15POM4t


    John Juback ComponentOne

    Thursday, July 18, 2013 9:55 PM
  • Kris,

    Something that just occurred to me is that I still build my extensions with VS2010 so that they can run in any version of LightSwitch. I was in ildasm comparing the types used in the ExportAttribute and I saw that Microsoft.LightSwitch.Extensions references the IModuleDefinitionLoader interface in Microsoft.LightSwitch version 10.0.11.0, while the C1 extensions reference the same interface in version 10.0.0.0. Perhaps this accounts for the load error. I can try building with VS2012 next week.


    John Juback ComponentOne

    Friday, July 19, 2013 4:06 PM
  • Kris,

    The error goes away if I build the extensions with VS2012 instead of VS2010. This also fixes another similar issue I was having with the VS2013 Preview. Thanks for taking the time to look into this.


    John Juback ComponentOne

    Monday, July 22, 2013 1:10 PM
  • Glad to hear that you were able to solve the problem John. I am a little surprised that you were seeing the original issue as we have some infrastructure in place that should be assembly redirection for the VS2010 built extensions when running against a newer version of VS. I am going to take a look at the project you sent me and see if I can track down why you were seeing that behavior. That said it sounds like you are unblocked. If you run into any additional issues please do let us know.

    Thanks,

    Kris


    Kris Langohr | Senior SDET | LightSwitch QA

    Monday, July 22, 2013 3:04 PM