How to automate lightswitch application build while using extensions?
-
Monday, August 27, 2012 2:42 PM
Hi,
We are developing a Lightswitch app (using vs 2012 RTM and TFS 2012 RTM as SCM). External extensions have been installed on dev environment (component one). We are configuring a build server to adress automatic building, test, and packaging.
As we do not want to install project specific librairies on build server, I'm looking for a way to have the lightswitch project reference extensions that will be put in source control management (this was a common thing we used on web app for this kind of things).
I've looked for it, but did not found any help googling.
Could anyone give me some clues on the subject?
Edit: For testing purpose, I installed the extension library on build server. It succeds in building the xap file, so it's better, but I have the following error on BuildSchema task. It seems to be a missing assembly or something similar. How can I find the name of the missing type?
Begin schema build to directory: Mypath\Bin\Data
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: The "BuildSchema" task failed unexpectedly. [D:\Builds\1\TfsTests\....Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. [D:\Builds\1\TfsTests\....Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) [D:\Builds\1\TfsTests\xxx.Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: at System.Reflection.RuntimeModule.GetTypes() [D:\Builds\1\TfsTests\xxx.Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: at System.Reflection.Assembly.GetTypes() [D:\Builds\1\TfsTests\....Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: at System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog() [D:\Builds\1\TfsTests\....Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: at System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetEnumerator() [D:\Builds\1\TfsTests\....Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: at System.Linq.Buffer`1..ctor(IEnumerable`1 source) [D:\Builds\1\TfsTests\....Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) [D:\Builds\1\TfsTests\....Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: at System.ComponentModel.Composition.Hosting.ComposablePartCatalogCollection.<>c__DisplayClass1.<Add>b__0() [D:\Builds\1\TfsTests\....Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: at System.Lazy`1.CreateValue() [D:\Builds\1\TfsTests\....Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: at System.Lazy`1.LazyInitValue() [D:\Builds\1\TfsTests\....Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: at System.Lazy`1.get_Value() [D:\Builds\1\TfsTests\....Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: at System.ComponentModel.Composition.Hosting.ComposablePartCatalogCollection.RaiseChangingEvent(Lazy`1 addedDefinitions, Lazy`1 removedDefinitions, AtomicComposition atomicComposition) [D:\Builds\1\TfsTests\....Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: at System.ComponentModel.Composition.Hosting.ComposablePartCatalogCollection.Add(ComposablePartCatalog item) [D:\Builds\1\TfsTests\....Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: at Microsoft.LightSwitch.BuildTasks.Common.CommandLineBuildContainerFactory.AddAssemblyToGlobalCatalog(String assemblyPath, AggregateCatalog aggregateCatalog) [D:\Builds\1\TfsTests\....Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: at Microsoft.LightSwitch.BuildTasks.Common.CommandLineBuildContainerFactory.LoadExtensions(IList`1 extensions, String rootProjectFile, AggregateCatalog aggregateCatalog) [D:\Builds\1\TfsTests\....Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: at Microsoft.LightSwitch.BuildTasks.Common.CommandLineBuildContainerFactory.LoadExtensionsIntoGlobalCatalog(String projectPath, AggregateCatalog aggregateCatalog) [D:\Builds\1\TfsTests\....Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: at Microsoft.LightSwitch.BuildTasks.Common.CommandLineBuildContainerFactory.Create(IEnumerable`1 inputStreams, IEnumerable`1 commonStreams, IEnumerable`1 serviceStreams, String projectPath, IEnumerable`1 externalDataSources) [D:\Builds\1\TfsTests\....Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: at Microsoft.LightSwitch.BuildTasks.Common.BuildTaskBase.EnsureCommandLineBuildContainer() [D:\Builds\1\TfsTests\....Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: at Microsoft.LightSwitch.BuildTasks.SchemaManagement.BuildSchema.Execute() [D:\Builds\1\TfsTests\....Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [D:\Builds\1\TfsTests\....Application.lsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v2.0\Microsoft.LightSwitch.targets(146,9): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() [D:\Builds\1\TfsTests\....Application.lsproj]
- Edited by gcourtin Wednesday, August 29, 2012 9:52 AM
All Replies
-
Friday, October 12, 2012 6:54 PMI'm having the same problem. Did you ever get an answer to this? Thanks.
Thanks, Mike
- Edited by MikeH-2 Friday, October 12, 2012 7:01 PM
-
Friday, November 09, 2012 12:19 AM
Did you ever make in progress in solving this?
Thanks,
nick
-
Monday, November 19, 2012 2:45 AM
Yes, we're also interested in this one as we try to hook up a Lightswitch project to our build server
Thanks!
-
Wednesday, November 28, 2012 5:46 PM
Folks, can you take a look at this documentation regarding Team Build and LightSwitch projects and see if this helps?
-Robert
- Proposed As Answer by Robert Schoen [MSFT]Microsoft Employee Wednesday, November 28, 2012 5:46 PM
-
Sunday, December 02, 2012 12:13 PM
Robert,
Is it not more easy to just install visual studio 2012 on the build server. By doing so, it should have all reference material needed, no?
paul van bladel
-
Sunday, December 02, 2012 10:15 PM
I have VS 2012 installed on the build server but it still errors.
Nick
-
Monday, December 03, 2012 4:16 PM
Paul, if you installed VS 2012 on the build machine, the references should be correct and likely and easier way to go than all those file copies. However installing VS on the same box as the build machine is not always an option for folks.
Nick, what are the errors you are encounting? Please read the bottom of the Team Build doc regarding "Build a LightSwitch Project" where it talks about the what files to check in as well as build definition settings...
Hope this helps!
-Robert
Robert Schoen (Microsoft Visual Studio LightSwitch Team)

