??Msbuild??Xunit???????
???????????? ???????[ 2015/1/21 14:11:08 ] ???????????????
????????Visual Studio 2015????????????xUnit????????xUnit.net runner?????VS2015??TestDriven.Net??????VS2015??
?????????????VS2015????????????????????????????????????????????msbuild?????????????????
????nuget?????????????????????xunit.MSBuild????????????????
????????????????а?????nuget package??
????Install-Package xunit.MSBuild
????????????.csproj??????????????μ??????
<Import Project="..packagesxunit.MSBuild.1.9.2.3uildxunit.MSBuild.targets"
Condition="Exists('..packagesxunit.MSBuild.1.9.2.3uildxunit.MSBuild.targets')" />
xunit.MSBuild.targets????е????????£?
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask AssemblyFile="$(MSBuildThisFileDirectory).. oolsxunit.runner.msbuild.dll" TaskName="Xunit.Runner.MSBuild.xunit" />
<PropertyGroup Condition="'$(RunXunitTests)' == ''">
<RunXunitTests Condition="'$(Configuration)' == 'Release'">true</RunXunitTests>
</PropertyGroup>
<PropertyGroup>
<BuildDependsOn>$(BuildDependsOn);ExecuteXUnitTests</BuildDependsOn>
<RebuildDependsOn>$(RebuildDependsOn);ExecuteXUnitTests</RebuildDependsOn>
</PropertyGroup>
<Target Name="ExecuteXUnitTests" Condition="'$(RunXunitTests)' == 'true'" >
<xunit Assembly="$(OutputPath)$(AssemblyName).dll" />
</Target>
</Project>
|
?????????msbuild???????п????????ExecuteXUnitTests???????????msbuild????????????????????Release???????
????????????????.csproj?е??????????????????????ExecuteXUnitTests???????
????<Target Name="AfterBuild">
????ExecuteXUnitTests
????</Target>
???????????ú??????????Visual Studio??Output???????????????????
????37> PostModelTest.PostModel_Required_Validation
????37> Tests: 1?? Failures: 0?? Skipped: 0?? Time: 0.410 seconds
????37>
????37>Build succeeded.
???????????????????????????????
1> Tests: 1?? Failures: 1?? Skipped: 0?? Time: 0.428 seconds
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:03.91
========== Build: 0 succeeded?? 1 failed?? 42 up-to-date?? 0 skipped ==========
Visual Studio????????????Build failed??
|
?????????????Ч???????????????????????????е????????????????????????????????????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11