I'm not sure if submitting question in right forum (LightSwitch or TFS). In my company we have a solution developed in Visual Studio 2012 LightSwitch and into App.Server layer we consume an ApplicationDataService.svc (OData) and a WCF Service. I created a build definition into TFS to schedule a daily building and publishing of App. At first Build Definition worked perfectly but for some reasons it runs into an error whose log results shows among others, as follows:
PrepareForBuild:
Creando directorio "bin\Debug\".
LSSvcGenerators:
Quitando el directorio "C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\GeneratedSvcFiles\".
Creando directorio "C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\GeneratedSvcFiles\".
Generación completada
Copiando el archivo de "C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\ApplicationData.svc" en "C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\GeneratedSvcFiles\ApplicationData.svc".
Copiando el archivo de "C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\AggregationsWCFServiceData.svc" en "C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\GeneratedSvcFiles\AggregationsWCFServiceData.svc".
Copiando el archivo de "C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\XtraReportsServiceData.svc" en "C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\GeneratedSvcFiles\XtraReportsServiceData.svc".
Copiando el archivo de "C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\OmniMembershipWCFData.svc" en "C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\GeneratedSvcFiles\OmniMembershipWCFData.svc".
(Out) GeneratedSvcFiles: 'C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\ApplicationData.svc;C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\AggregationsWCFServiceData.svc;C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\XtraReportsServiceData.svc;C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\OmniMembershipWCFData.svc'
LSResourceGenerators:
Generación completada
(Out) GeneratedMetaDataFiles: 'C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\ApplicationData.csdl;C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\AggregationsWCFServiceData.csdl;C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\XtraReportsServiceData.csdl;C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\OmniMembershipWCFData.csdl;C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\ApplicationData.msl;C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\AggregationsWCFServiceData.msl;C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\XtraReportsServiceData.msl;C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\GeneratedArtifacts\OmniMembershipWCFData.msl;C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\Gen...
CoreResGen:
"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\resgen.exe" /useSourcePath /r:C:\TFSAgent\_work\1\s\0-Development\OmniSettlement\AggregationsWCFSer\bin\Debug\AggregationsWCFService.dll /r:"C:\Program Files (x86)\DevExpress\DXperience 12.2\Bin\Framework\DevExpress.Charts.v12.2.Core.dll" /r:"C:\Program Files (x86)\DevExpress\DXperience 12.2\Bin\Framework\DevExpress.Data.v12.2.dll" /r:"C:\Program Files (x86)\DevExpress\DXperience 12.2\Bin\Framework\DevExpress.Office.v12.2.Core.dll" /r:"C:\Program Files (x86)\DevExpress\DXperience 12.2\Bin\Framework\DevExpress.PivotGrid.v12.2.Core.dll" /r:"C:\Program Files (x86)\DevExpress\DXperience 12.2\Bin\Framework\DevExpress.Printing.v12.2.Core.dll" /r:"C:\Program Files (x86)\DevExpress\DXperience 12.2\Bin\Framework\DevExpress.RichEdit.v12.2.Core.dll" /r:"C:\Program Files (x86)\DevExpress\DXperience 12.2\Bin\Framework\DevExpress.Utils.v12.2.dll" /r:"C:\Program Files (x86)\DevExpress\DXperience 12.2\Bin\Framework\DevExpress.Xpf.Printing.v12.2.Cor...
Procesando archivo de recursos "rptMerchantTotals.resx" en "obj\Debug\LightSwitchApplication.rptMerchantTotals.resources".
Procesando archivo de recursos "rptRejectedTransactions.resx" en "obj\Debug\LightSwitchApplication.rptRejectedTransactions.resources".
CompileLicxFiles:
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\LC.exe /target:Application.Server.dll /complist:Properties\licenses.licx /outdir:obj\Debug\ /i:C:\TFSAgent\_work\1\s\0-Development\OmniSettlement\AggregationsWCFSer\bin\Debug\AggregationsWCFService.dll /i:"C:\Program Files (x86)\DevExpress\DXperience 12.2\Bin\Framework\DevExpress.Charts.v12.2.Core.dll" /i:"C:\Program Files (x86)\DevExpress\DXperience 12.2\Bin\Framework\DevExpress.Data.v12.2.dll" /i:"C:\Program Files (x86)\DevExpress\DXperience 12.2\Bin\Framework\DevExpress.Office.v12.2.Core.dll" /i:"C:\Program Files (x86)\DevExpress\DXperience 12.2\Bin\Framework\DevExpress.PivotGrid.v12.2.Core.dll" /i:"C:\Program Files (x86)\DevExpress\DXperience 12.2\Bin\Framework\DevExpress.Printing.v12.2.Core.dll" /i:"C:\Program Files (x86)\DevExpress\DXperience 12.2\Bin\Framework\DevExpress.RichEdit.v12.2.Core.dll" /i:"C:\Program Files (x86)\DevExpress\DXperience 12.2\Bin\Framework\DevExpress.Utils.v12.2.dll" /i:"C:\Program Files (x86)\DevExpress...
GenerateTargetFrameworkMonikerAttribute:
Se omitirá el destino "GenerateTargetFrameworkMonikerAttribute" porque todos los archivos de salida están actualizados respecto a los archivos de entrada.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v3.0\Microsoft.LightSwitch.Build.Tasks.targets(253,5): Error : Faltan los metadatos de DataService 'ApplicationData'.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v3.0\Microsoft.LightSwitch.Build.Tasks.targets(253,5): error : Faltan los metadatos de DataService 'ApplicationData'. [C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\OmniMerchant.Server.csproj]
Generación completada
Compilación del proyecto terminada "C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.Server\OmniMerchant.Server.csproj" (destinos predeterminados) -- ERROR.
Compilación del proyecto terminada "C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.ls3proj" (destinos predeterminados) -- ERROR.
Compilación del proyecto terminada "C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.sln" (destinos predeterminados) -- ERROR.
ERROR al compilar.
Looking at target file, specifically source line of error into
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v3.0\Microsoft.LightSwitch.Build.Tasks.targets(253,5):
<LSCodeGeneratorsTask Inputs="@(LightSwitchModel)"
ServiceModelFiles="@(ServiceMetadataFiles)"
IsRebuild="$(LSCodeGenFromRebuild)"
IsBuildingInsideVisualStudio="$(BuildingInsideVisualStudio)"
LightSwitchProjectType="$(LightSwitchProjectTypeV3)"
LightSwitchProjectSubType ="$(LightSwitchProjectSubType)"
ProjectPath="$(MSBuildProjectFullPath)"
Parameters="Language=$(Language)"
MetadataFiles="@(GeneratedMetadataFiles)"
ProjectOutputPath="$(OutDir)"
ExternalDataSources="@(ServerExternalDataSources)">
<Output ItemName="FileWrites"
TaskParameter="ModelChecksums" />
<Output ItemName="Compile"
TaskParameter="CodeFiles" />
<Output ItemName="GeneratedCodeFiles"
TaskParameter="CodeFiles" />
<Output ItemName="FileWrites"
TaskParameter="CodeFiles" />
</LSCodeGeneratorsTask>
However, ApplicationData.csdl exists in GeneratedArtifacs so I don't understand why is causing the error.
Please need Help, thanks!
I solved it by myself. In LightSwitch VS2012, OData services consumers generate a .edmx file (Entity Framework data model) into the server tier project. Name of the service reference to such services (svc) into my project is ApplicationData. Due to .edmx file was accidentally excluded by somebody else from that project, Team Build was not able to find ApplicationData models, generating before mentioned errors. I adjusted that and I added .edmx file to TFS and everything works fine!
Thanks to all and Cece.