我正在尝试在正在进行的开发项目中采用持续集成实践,因此我正在使用Travis CI。我正在从事的项目是一款可以在Visual Studio中完美构建的游戏。但是在推动我在GitHub上进行的任何更改后,当Travis尝试构建它时,它总是失败。以下是我在Travis CI上的“作业日志”中得到的错误消息。
构建于11/11/2018 11:59:03 AM开始。 在节点1上的项目“ /home/travis/build/Jeryxem/Escapade/MyGameWin.sln”(默认目标)。 /home/travis/build/Jeryxem/Escapade/MyGameWin.sln.metaproj:错误MSB4126:指定的解决方案配置“ Release | x86”无效。请使用“配置”和“平台”属性(例如MSBuild.exe Solution.sln / p:Configuration = Debug / p:Platform =“ Any CPU”)指定有效的解决方案配置,或将这些属性留空以使用默认解决方案配置。 [/home/travis/build/Jeryxem/Escapade/MyGameWin.sln] 完成的建筑项目“ /home/travis/build/Jeryxem/Escapade/MyGameWin.sln”(默认目标)-失败。 构建失败。
我的.travis.yml
文件中仅包含以下内容:
language: csharp
solution: Escapade.sln
根据我所做的一些研究,我认为我需要编辑csproj
文件来更改平台和/或配置详细信息。以下是我的csproj
文件的全部内容。
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug-Windows</Configuration>
<ProjectGuid>{A9DCAC72-BC77-4C33-BE70-BBFD31D7C798}</ProjectGuid>
<RootNamespace>Escapade</RootNamespace>
<MonoMacResourcePrefix>Resources</MonoMacResourcePrefix>
<AssemblyName>Escapade</AssemblyName>
<SuppressXamMacUpsell>True</SuppressXamMacUpsell>
<SuppressXamMacMigration>True</SuppressXamMacMigration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<OutputType>WinExe</OutputType>
<ApplicationIcon>Resources\SwinGame.ico</ApplicationIcon>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug-Windows|x86' ">
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<EnableCodeSigning>false</EnableCodeSigning>
<CreatePackage>false</CreatePackage>
<EnablePackageSigning>false</EnablePackageSigning>
<IncludeMonoRuntime>false</IncludeMonoRuntime>
<UseSGen>false</UseSGen>
<UseRefCounting>false</UseRefCounting>
<Profiling>false</Profiling>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<OutputType>WinExe</OutputType>
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PrepareForRunDependsOn>$(PrepareForRunDependsOn);CopyLibsToOut</PrepareForRunDependsOn>
</PropertyGroup>
<ItemGroup>
<Content Include="Resources\panels\meta.txt" />
</ItemGroup>
<ItemGroup>
<Reference Include="SwinGame">
<HintPath>lib\SwinGame.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<WinLibs Include="lib\win32\*.dll" />
<None Include="Resources\images\tiles\overlay_diamond.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\overlay_emerald.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\overlay_ruby.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\overlay_sapphire.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\rock_east.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\rock_inner_1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\rock_inner_2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\rock_inner_3.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\rock_north.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\rock_northeast.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\rock_northwest.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\rock_south.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\rock_southeast.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\rock_southwest.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\rock_vertex_northeast.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\rock_vertex_northwest.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\rock_vertex_southeast.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\rock_vertex_southwest.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\rock_wall_horiz.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\rock_wall_vert.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\rock_west.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\animations\startup.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\bundles\FileDialog.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\bundles\splash.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\fonts\arial.ttf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\fonts\cour.ttf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\fonts\maven_pro_regular.ttf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\fdFile.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\fdFolder.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\FileDialog_Active.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\FileDialog_Background.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\FileDialog_Inactive.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\FileDialog_Scroll.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\FileDialog_ScrollSmall.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\Swinburne.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\SwinGameAni.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\panels\FileDialog.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\sounds\error.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\sounds\SwinGameStart.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\SwinGame.icns">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\SwinGame.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\rock_pointnorth.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\rock_pointsouth.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\rock_pointwest.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\images\tiles\rock_pointeast.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Compile Include="Countdown.cs" />
<Compile Include="GameLevel.cs" />
<Compile Include="src\Entry.cs" />
<Compile Include="src\gui\MetaHandler.cs" />
<Compile Include="src\Location.cs" />
<Compile Include="src\mineral\gemstone\Sapphire.cs" />
<Compile Include="src\mineral\gemstone\Ruby.cs" />
<Compile Include="src\mineral\gemstone\Emerald.cs" />
<Compile Include="src\mineral\gemstone\Diamond.cs" />
<Compile Include="src\mineral\gemstone\Gemstone.cs" />
<Compile Include="src\mineral\Mineral.cs" />
<Compile Include="src\MovableObject.cs" />
<Compile Include="src\Entity.cs" />
<Compile Include="src\Path.cs" />
<Compile Include="src\PathNode.cs" />
<Compile Include="src\Player.cs" />
<Compile Include="src\Tile.cs" />
<Compile Include="src\TileType.cs" />
<Compile Include="src\World.cs" />
<Compile Include="src\Item.cs" />
<Compile Include="src\Inventory.cs" />
<Compile Include="src\gui\GuiEnvironment.cs" />
<Compile Include="src\gui\Renderer.cs" />
<Compile Include="src\gui\Frame.cs" />
<Compile Include="src\gui\GuiEvent.cs" />
<Compile Include="src\Escapade.cs" />
<Compile Include="src\BitmapMask.cs" />
<Compile Include="src\gui\Button.cs" />
<Compile Include="Weapon.cs" />
<Compile Include="WeaponType.cs" />
<Compile Include="AttackDirection.cs" />
<Compile Include="GlobalConstants.cs" />
<Compile Include="Enemy.cs" />
<Compile Include="Projectile.cs">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Compile>
</ItemGroup>
<ItemGroup />
<Target Name="CopyLibsToOut">
<Copy SourceFiles="@(WinLibs)" DestinationFolder="$(OutDir)" />
</Target>
</Project>
我需要更改什么以确保我的解决方案可以在Travis CI上构建而不会出现任何错误?知道如何提供有效的解决方案配置,以使我不再出现错误MSB4126了吗?