Build is failing on TFService from entity framework issue

I just tried using the build service on team foundation service today since I noticed that I could deploy directly from there to the Azure websites. I am building a web application along with a number of supporting projects that build perfectly fine locally and that I can deploy to Azure and run without a hitch.

However, on TFS, the build fails. Here the chunk that fails and I can't figure out why that is (except that perhaps something just isn't configured properly for the TFS build for some reason):

Project "C:\a\src\Documents\Projects\*\*\*.csproj" (3) is building "C:\a\src\Documents\Projects\*\*\*.csproj" (4) on node 1 (default targets).
EntityDeployNonEmbeddedResources:
Skipping target "EntityDeployNonEmbeddedResources" because it has no outputs.
EntityDeployEmbeddedResources:
  Processing 1 EDMX files.
  Starting to process input file 'DataModels.edmx'.
  Finished processing input file 'DataModels.edmx'.
  Finished processing 1 EDMX files.
CoreCompile:
  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:C:\a\src\Documents\Projects\*\packages\EntityFramework.5.0.0\lib\net45\EntityFramework.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.ComponentModel.DataAnnotations.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.Entity.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Runtime.Serialization.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Security.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\MyEntities.dll /subsystemversion:6.00 /resource:obj\Debug\edmxResourcesToEmbed\DataModels.csdl,DataModels.csdl /resource:obj\Debug\edmxResourcesToEmbed\DataModels.msl,DataModels.msl /resource:obj\Debug\edmxResourcesToEmbed\DataModels.ssdl,DataModels.ssdl /target:library /utf8output ClassA.cs ClassB.cs ClassC.cs ClassD.cs ClassE.cs "C:\Users\buildguest\AppData\Local\Temp\.NETFramework,Version=v4.5.AssemblyAttributes.cs"
CSC : error CS2001: Source file 'ClassA.cs' could not be found [C:\a\src\Documents\Projects\*\*\*.csproj]
CSC : error CS2001: Source file 'ClassB.cs' could not be found [C:\a\src\Documents\Projects\*\*\*.csproj]
CSC : error CS2001: Source file 'ClassC.cs' could not be found [C:\a\src\Documents\Projects\*\*\*.csproj]
CSC : error CS2001: Source file 'ClassD.cs' could not be found [C:\a\src\Documents\Projects\*\*\*.csproj]
CSC : error CS2001: Source file 'ClassE.cs' could not be found [C:\a\src\Documents\Projects\*\*\*.csproj]
Done Building Project "C:\a\src\Documents\Projects\*\*\*.csproj" (default targets) -- FAILED.

Does anyone have any ideas as to why it might be doing this? Alternatively, if this isn't the proper place to put this question, could someone please link me to an appropriate place?

August 14th, 2013 11:04am

Hi,

I'm glad to hear that you resolve this issue.
Thank you for sharing your solutions and experience here. It will be very beneficial for other community members who have similar questions.
If you have any difficulty in future programming, we welcome you to post in forums again.

Best Regards,

Ming Xu

Free Windows Admin Tool Kit Click here and download it now
August 14th, 2013 11:18am

I regenerated the EF model from the database and the issue has cleared up, so I'm marking this as resolved.
August 14th, 2013 1:13pm

Just want to share one more thing regarding this Issue. Regenerating the entire models might be one of the solution. But would like to explain whats happening behind the scenes.

Normally, When you add a new item or file from your VS 2012 Solution, by default it will be added to your source control. The same happens for the edmx and the automatically generated .cs files. But when you manually delete an entity from the edmx designer and adding them again will create this type of issue.

When you delete them it creates an entry in the source control  and when you add them again it fails to mark them as add.

So the solution is make sure you add those files explicitly to the source control by right clicking and selecting "Add to Source Control"

Hope you understand. 

Free Windows Admin Tool Kit Click here and download it now
September 9th, 2013 7:01am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics