troubleshooting Question

Team Foundation Build warning, and not creating binaries?

Avatar of WilliamKillion
WilliamKillionFlag for United States of America asked on
Microsoft Development
1 Comment1 Solution2118 ViewsLast Modified:
So I've installed Team Foundation Build on its own server, and I have a solution (C#) that contains 2 projects that i'm trying to build. One is a Website, the other is a class/object library. I setup the build agent, and create a new build definition. The build runs and is all successful - but with one warning.

"C:\Users\TFSBUILD\AppData\Local\Temp\DKBB\DKTest4\Sources\solution\DKSLN\DKSLN.sln(0,0): warning MSB4126: The specified solution configuration "Debug|.NET" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration."

it happens when I use Release instead of debug also. If I use "Any CPU" instead of .NET, it creates an error and completely fails. Also, when doing it with "Debug|.NET", it is not compiling the dll's from the object library. It only copies all of the aspx files from the website to the drop folder.

i'm all kinds of confused, as I've never used TFS build before. Anyone have any ideas?
<?xml version="1.0" encoding="utf-8"?>
<!-- DO NOT EDIT the project element - the ToolsVersion specified here does not prevent the solutions 
     and projects in the SolutionToBuild item group from targeting other versions of the .NET framework. 
     -->
<Project DefaultTargets="DesktopBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
 
  <!-- Do not edit this -->
  <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets" />
 
  <ProjectExtensions>
 
    <!-- Team Foundation Build Version - DO NOT CHANGE -->
    <ProjectFileVersion>2</ProjectFileVersion>
 
    <!--  DESCRIPTION
     This property is included only for backwards compatibility. The description of a build definition 
     is now stored in the database. For compatibility with V1 clients, keep this property in sync with 
     the value in the database.
    -->
    <Description></Description>
 
    <!--  BUILD MACHINE
     This property is included only for backwards compatibility. The default machine used for a build 
     definition is now stored in the database, as the MachineName property of the definition's 
     DefaultBuildAgent. For compatibility with V1 clients, keep this property in sync with the value 
     in the database.
    -->
    <BuildMachine>devtfsbuild.dev.myserver.local</BuildMachine>
 
  </ProjectExtensions>
 
  <PropertyGroup>
 
    <!--  TEAM PROJECT
     This property is included only for backwards compatibility. The team project for a build 
     definition is now stored in the database. For compatibility with V1 clients, keep this property in 
     sync with the value in the database.
    -->
    <TeamProject>dKB</TeamProject>
 
    <!--  BUILD DIRECTORY
     This property is included only for backwards compatibility. The build directory used for a build 
     definition is now stored in the database, as the BuildDirectory property of the definition's 
     DefaultBuildAgent. For compatibility with V1 clients, keep this property in sync with the value 
     in the database.
    -->
    <BuildDirectoryPath>C:\Users\jay-b\AppData\Local\Temp\dKBB\DKTest4</BuildDirectoryPath>
 
    <!--  DROP LOCATION
     This property is included only for backwards compatibility. The drop location used for a build 
     definition is now stored in the database. For compatibility with V1 clients, keep this property 
     in sync with the value in the database.
    -->
    <DropLocation>\\UNKNOWN\drops</DropLocation>
 
    <!--  TESTING
     Set this flag to enable/disable running tests as a post-compilation build step.
    -->
    <RunTest>false</RunTest>
 
    <!--  CODE ANALYSIS
     Set this property to enable/disable running code analysis. Valid values for this property are 
     Default, Always and Never.
 
         Default - Perform code analysis as per the individual project settings
         Always  - Always perform code analysis irrespective of project settings
         Never   - Never perform code analysis irrespective of project settings
     -->
    <RunCodeAnalysis>Never</RunCodeAnalysis>
 
    <!-- Additional Properties -->
 
    <!--  WorkItemType
     The type of the work item created on a build failure. 
     -->
    <WorkItemType>Bug</WorkItemType>
 
    <!--  WorkItemFieldValues
     Fields and values of the work item created on a build failure.
     
     Note: Use reference names for fields if you want the build to be resistant to field name 
     changes. Reference names are language independent while friendly names are changed depending 
     on the installed language. For example, "System.Reason" is the reference name for the "Reason" 
     field.
     -->
    <WorkItemFieldValues>System.Reason=Build Failure;System.Description=Start the build using Team Build</WorkItemFieldValues>
 
    <!--  WorkItemTitle
     Title of the work item created on build failure.
     -->
    <WorkItemTitle>Build failure in build:</WorkItemTitle>
 
    <!--  DescriptionText
     History comment of the work item created on a build failure. 
     -->
    <DescriptionText>This work item was created by Team Build on a build failure.</DescriptionText>
 
    <!--  BuildLogText
     Additional comment text for the work item created on a build failure.
     -->
    <BuildlogText>The build log file is at:</BuildlogText>
 
    <!--  ErrorWarningLogText
     Additional comment text for the work item created on a build failure. 
     This text will only be added if there were errors or warnings.
     -->
    <ErrorWarningLogText>The errors/warnings log file is at:</ErrorWarningLogText>
 
    <!--  UpdateAssociatedWorkItems
     Set this flag to enable/disable updating associated workitems on a successful build.
     -->
    <UpdateAssociatedWorkItems>true</UpdateAssociatedWorkItems>
 
    <!--  AdditionalVCOverrides
     Additional text for the VCOverrides file generated for VC++ projects.
     -->
    <AdditionalVCOverrides></AdditionalVCOverrides>
 
    <!--  CustomPropertiesForClean
     Custom properties to pass to the MSBuild task while calling the "Clean" target for all solutions.
     The format should be: PropertyName1=value1;PropertyName2=value2;...
     -->
    <CustomPropertiesForClean></CustomPropertiesForClean>
 
    <!--  CustomPropertiesForBuild
     Custom properties to pass to the MSBuild task while calling the default targets for all solutions.
     The format should be: Property1=value1;Property2=value2;...  To pass custom properties to
     individual solutions, use the Properties metadata item of the SolutionToBuild ItemGroup.
     -->
    <CustomPropertiesForBuild></CustomPropertiesForBuild>
 
  </PropertyGroup>
 
  <ItemGroup>
    <!--  SOLUTIONS
     The paths of the solutions to build. Paths can be server paths or local paths, but server paths
     relative to the location of this file are highly recommended.  To add/delete solutions, edit this 
     ItemGroup. For example, to add a solution MySolution.sln, add the following line:
         
         <SolutionToBuild Include="$(BuildProjectFolderPath)/path/MySolution.sln" />
 
     To change the order in which the solutions are built, modify the order in which the solutions 
     appear below.
     
     To call a target (or targets) other than the default, add a metadata item named Targets.  To pass 
     custom properties to the solution, add a metadata item named Properties.  For example, to call 
     the targets MyCustomTarget1 and MyCustomTarget2, passing in properties Property1 and Property2, 
     add the following:
         
         <SolutionToBuild Include="$(BuildProjectFolderPath)/path/MySolution.sln">
             <Targets>MyCustomTarget1;MyCustomTarget2</Targets>
             <Properties>Property1=Value1;Property2=Value2</Properties>
         </SolutionToBuild>
    -->
    <SolutionToBuild Include="$(BuildProjectFolderPath)/../../solution/DKSLN/DKSLN.sln">
        <Targets></Targets>
        <Properties></Properties>
    </SolutionToBuild>
 
  </ItemGroup>
 
  <ItemGroup>
    <!--  CONFIGURATIONS
     The list of configurations to build. To add/delete configurations, edit this value. For example, 
     to add a new configuration, add the following lines:
         
         <ConfigurationToBuild Include="Debug|x86">
             <FlavorToBuild>Debug</FlavorToBuild>
             <PlatformToBuild>x86</PlatformToBuild>
         </ConfigurationToBuild>
 
     The Include attribute value should be unique for each ConfigurationToBuild node.
    -->
    <ConfigurationToBuild Include="Debug|.NET">
        <FlavorToBuild>Debug</FlavorToBuild>
        <PlatformToBuild>.NET</PlatformToBuild>
    </ConfigurationToBuild>
 
  </ItemGroup>
 
  <ItemGroup>
    <!--  TEST ARGUMENTS
     If the RunTest property is set to true then the following test arguments will be used to run 
     tests. Tests can be run by specifying one or more test lists and/or one or more test containers.
     
     To run tests using test lists, add MetaDataFile items and associated TestLists here.  Paths can 
     be server paths or local paths, but server paths relative to the location of this file are highly 
     recommended:
     
        <MetaDataFile Include="$(BuildProjectFolderPath)/HelloWorld/HelloWorld.vsmdi">
            <TestList>BVT1;BVT2</TestList>
        </MetaDataFile>
 
     To run tests using test containers, add TestContainer items here:
     
        <TestContainer Include="$(OutDir)\HelloWorldTests.dll" />
        <TestContainer Include="$(SolutionRoot)\TestProject\WebTest1.webtest" />
        <TestContainer Include="$(SolutionRoot)\TestProject\LoadTest1.loadtest" />
 
     Use %2a instead of * and %3f instead of ? to prevent expansion before test assemblies are built
    -->
 
  </ItemGroup>
 
  <PropertyGroup>
    <!-- TEST ARGUMENTS
     If the RunTest property is set to true, then particular tests within a
     metadata file or test container may be specified here.  This is
     equivalent to the /test switch on mstest.exe.
 
     <TestNames>BVT;HighPriority</TestNames>
    -->
 
  </PropertyGroup>
 
  <ItemGroup>
    <!--  ADDITIONAL REFERENCE PATH
     The list of additional reference paths to use while resolving references. For example:
     
         <AdditionalReferencePath Include="C:\MyFolder\" />
         <AdditionalReferencePath Include="C:\MyFolder2\" />
    -->
  </ItemGroup>
</Project>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 1 Comment.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros