Getting MS BUILD errors

Topics: Build Server Setup, Build Template
Sep 15, 2015 at 2:14 PM
Edited Sep 15, 2015 at 2:14 PM
Hllo Wael,

I was able to create the Build definition and once I queue the build, its always throwing me below error.

I am using VS 2013 and VSO as TFS. Though I am referencing the exact framework, the build is working fine when I try to build the solution in the VS 2013. Using Build definition i am getting below error. I dont even have MSBuild 14.0.

/Uday


Plugin.cs (18): The type or namespace name 'Xrm' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Plugin.cs (23): The type or namespace name 'IPlugin' could not be found (are you missing a using directive or an assembly reference?)
C:\Program Files (x86)\MSBuild\14.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (1819): Could not resolve this reference. Could not locate the assembly "Microsoft.Xrm.Sdk". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.



C:\Program Files (x86)\MSBuild\14.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (1819): Could not resolve this reference. Could not locate the assembly "Microsoft.Crm.Sdk.Proxy". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

Completed MSBUILD Log file:
Build started 9/15/2015 12:07:10 PM.
 1>Project "D:\TFS\SolutionPackagerDemo\HWDemo1\HWDemo1.sln" on node 1 (default targets).
 1>ValidateSolutionConfiguration:
     Building solution configuration "Release|Any CPU".
   The target "AfterGenerateAppxManifest" listed in an AfterTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.Net.CoreRuntime.targets (68,11)" does not exist in the project, and will be ignored.
   The target "_GeneratePrisForPortableLibraries" listed in a BeforeTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.Net.CoreRuntime.targets (177,11)" does not exist in the project, and will be ignored.
   The target "AfterGenerateAppxManifest" listed in an AfterTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets (126,11)" does not exist in the project, and will be ignored.
   The target "AfterGenerateAppxManifest" listed in an AfterTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets (174,11)" does not exist in the project, and will be ignored.
   The target "BeforeGenerateProjectPriFile" listed in a BeforeTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\NuGet\Microsoft.NuGet.targets (149,61)" does not exist in the project, and will be ignored.
 1>Project "D:\TFS\SolutionPackagerDemo\HWDemo1\HWDemo1.sln" (1) is building "D:\TFS\SolutionPackagerDemo\HWDemo1\HWDemo1\CrmPackage\CrmPackage.csproj.metaproj" (2) on node 1 (default targets).
 2>Project "D:\TFS\SolutionPackagerDemo\HWDemo1\HWDemo1\CrmPackage\CrmPackage.csproj.metaproj" (2) is building "D:\TFS\SolutionPackagerDemo\HWDemo1\HWDemo1\Plugins\Plugins.csproj" (3) on node 1 (default targets).
 3>PrepareForBuild:
     Creating directory "obj\Release\".
   ResolveAssemblyReferences:
     Primary reference "Microsoft.Xrm.Sdk".
 3>C:\Program Files (x86)\MSBuild\14.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Xrm.Sdk". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\TFS\SolutionPackagerDemo\HWDemo1\HWDemo1\Plugins\Plugins.csproj]
             For SearchPath "{TargetFrameworkDirectory}".
             Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.Xrm.Sdk.winmd", but it didn't exist.
             Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.Xrm.Sdk.dll", but it didn't exist.
             Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.Xrm.Sdk.exe", but it didn't exist.
             Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Facades\Microsoft.Xrm.Sdk.winmd", but it didn't exist.
             Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Facades\Microsoft.Xrm.Sdk.dll", but it didn't exist.
             Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Facades\Microsoft.Xrm.Sdk.exe", but it didn't exist.
             For SearchPath "{Registry:Software\Microsoft\.NETFramework,v4.5,AssemblyFoldersEx}".
             Considered AssemblyFoldersEx locations.
             For SearchPath "{AssemblyFolders}".
             Considered "C:\Program Files\Microsoft.NET\ADOMD.NET\100\Microsoft.Xrm.Sdk.winmd", but it didn't exist.
             Considered "C:\Program Files\Microsoft.NET\ADOMD.NET\100\Microsoft.Xrm.Sdk.dll", but it didn't exist.
             Considered "C:\Program Files\Microsoft.NET\ADOMD.NET\100\Microsoft.Xrm.Sdk.exe", but it didn't exist.
             Considered "C:\Program Files\Microsoft SQL Server\120\SDK\Assemblies\Microsoft.Xrm.Sdk.winmd", but it didn't exist.
             Considered "C:\Program Files\Microsoft SQL Server\120\SDK\Assemblies\Microsoft.Xrm.Sdk.dll", but it didn't exist.
             Considered "C:\Program Files\Microsoft SQL Server\120\SDK\Assemblies\Microsoft.Xrm.Sdk.exe", but it didn't exist.
             Considered "C:\Program Files\Microsoft SQL Server\100\DTS\Tasks\Microsoft.Xrm.Sdk.winmd", but it didn't exist.
             Considered "C:\Program Files\Microsoft SQL Server\100\DTS\Tasks\Microsoft.Xrm.Sdk.dll", but it didn't exist.
             Considered "C:\Program Files\Microsoft SQL Server\100\DTS\Tasks\Microsoft.Xrm.Sdk.exe", but it didn't exist.
             Considered "C:\Program Files\IIS\Microsoft Web Deploy V3\Microsoft.Xrm.Sdk.winmd", but it didn't exist.
             Considered "C:\Program Files\IIS\Microsoft Web Deploy V3\Microsoft.Xrm.Sdk.dll", but it didn't exist.
             Considered "C:\Program Files\IIS\Microsoft Web Deploy V3\Microsoft.Xrm.Sdk.exe", but it didn't exist.
             Considered "C:\Program Files\Microsoft SQL Server\100\DTS\PipelineComponents\Microsoft.Xrm.Sdk.winmd", but it didn't exist.
             Considered "C:\Program Files\Microsoft SQL Server\100\DTS\PipelineComponents\Microsoft.Xrm.Sdk.dll", but it didn't exist.
             Considered "C:\Program Files\Microsoft SQL Server\100\DTS\PipelineComponents\Microsoft.Xrm.Sdk.exe", but it didn't exist.
             Considered "C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\Microsoft.Xrm.Sdk.winmd", but it didn't exist.
             Considered "C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\Microsoft.Xrm.Sdk.dll", but it didn't exist.
             Considered "C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\Microsoft.Xrm.Sdk.exe", but it didn't exist.
             Considered "C:\Program Files\Microsoft SQL Server\100\DTS\ForEachEnumerators\Microsoft.Xrm.Sdk.winmd", but it didn't exist.
             Considered "C:\Program Files\Microsoft SQL Server\100\DTS\ForEachEnumerators\Microsoft.Xrm.Sdk.dll", but it didn't exist.
             Considered "C:\Program Files\Microsoft SQL Server\100\DTS\ForEachEnumerators\Microsoft.Xrm.Sdk.exe", but it didn't exist.
             For SearchPath "{GAC}".
             Considered "Microsoft.Xrm.Sdk", which was not found in the GAC.
             For SearchPath "{RawFileName}".
             Considered treating "Microsoft.Xrm.Sdk" as a file name, but it didn't exist.
             For SearchPath "d:\a\bin\".
             Considered "d:\a\bin\Microsoft.Xrm.Sdk.winmd", but it didn't exist.
             Considered "d:\a\bin\Microsoft.Xrm.Sdk.dll", but it didn't exist.
             Considered "d:\a\bin\Microsoft.Xrm.Sdk.exe", but it didn't exist.
     Primary reference "Microsoft.Crm.Sdk.Proxy".
 3>C:\Program Files (x86)\MSBuild\14.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Crm.Sdk.Proxy". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\TFS\SolutionPackagerDemo\HWDemo1\HWDemo1\Plugins\Plugins.csproj]
             For SearchPath "{HintPathFromItem}".
             Considered "..\lib\Microsoft.Crm.Sdk.Proxy.dll", but it didn't exist.
             For SearchPath "{TargetFrameworkDirectory}".
             Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.Crm.Sdk.Proxy.winmd", but it didn't exist.
             Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.Crm.Sdk.Proxy.dll", but it didn't exist.
             Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.Crm.Sdk.Proxy.exe", but it didn't exist.
             Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Facades\Microsoft.Crm.Sdk.Proxy.winmd", but it didn't exist.
             Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Facades\Microsoft.Crm.Sdk.Proxy.dll", but it didn't exist.
             Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Facades\Microsoft.Crm.Sdk.Proxy.exe", but it didn't exist.
             For SearchPath "{Registry:Software\Microsoft\.NETFramework,v4.5,AssemblyFoldersEx}".
             Considered AssemblyFoldersEx locations.