Skip to content

Commit 191140a

Browse files
committed
默认只有在Debug开启
1 parent 3767b3f commit 191140a

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

Code/UsingMSBuildCopyOutputFileToFastDebug/Build/dotnetCampus.UsingMSBuildCopyOutputFileToFastDebug.targets

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,32 @@
66
<NuGetUsingMSBuildCopyOutputFileToFastDebugTaskFolder Condition=" '$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net48\</NuGetUsingMSBuildCopyOutputFileToFastDebugTaskFolder>
77
</PropertyGroup>
88

9+
<!--默认只有在 Debug 下开启-->
10+
<PropertyGroup Condition="$(EnableUsingMSBuildCopyOutputFileToFastDebug)==''">
11+
<EnableUsingMSBuildCopyOutputFileToFastDebug Condition="'$(Configuration)' == 'Debug'">true</EnableUsingMSBuildCopyOutputFileToFastDebug>
12+
<EnableUsingMSBuildCopyOutputFileToFastDebug Condition="'$(Configuration)' != 'Debug'">false</EnableUsingMSBuildCopyOutputFileToFastDebug>
13+
</PropertyGroup>
14+
915
<UsingTask TaskName="UsingMSBuildCopyOutputFileToFastDebug.SafeOutputFileCopyTask"
1016
AssemblyFile="$(NuGetUsingMSBuildCopyOutputFileToFastDebugTaskFolder)\UsingMSBuildCopyOutputFileToFastDebug.dll" />
1117
<UsingTask TaskName="UsingMSBuildCopyOutputFileToFastDebug.LaunchSettingsParser"
1218
AssemblyFile="$(NuGetUsingMSBuildCopyOutputFileToFastDebugTaskFolder)\UsingMSBuildCopyOutputFileToFastDebug.dll" />
1319

1420
<Target Name="ParseLaunchSettings" AfterTargets="AfterBuild"
15-
BeforeTargets="CopyOutputLibToFastDebug" Condition="$(MainProjectPath)==''">
21+
BeforeTargets="CopyOutputLibToFastDebug" Condition="$(MainProjectPath)=='' and $(EnableUsingMSBuildCopyOutputFileToFastDebug)==true">
1622
<Message Text="当前使用的复制方法 $(NuGetUsingMSBuildCopyOutputFileToFastDebugTaskFolder)" />
1723
<LaunchSettingsParser>
1824
<Output TaskParameter="LaunchMainProjectPath" PropertyName="LaunchMainProjectPath" ></Output>
1925
</LaunchSettingsParser>
2026
</Target>
2127

28+
<Target Name="BanCopyOutputLibToFastDebug" AfterTargets="AfterBuild"
29+
Condition="$(EnableUsingMSBuildCopyOutputFileToFastDebug)!=true">
30+
<Message Text="禁用 UsingMSBuildCopyOutputFileToFastDebug 因为 EnableUsingMSBuildCopyOutputFileToFastDebug 不为 true 值"/>
31+
</Target>
2232

2333
<Target Name="CopyOutputLibToFastDebug" AfterTargets="AfterBuild"
24-
Condition="$(MainProjectPath)!='' or $(LaunchMainProjectPath)!=''">
34+
Condition="($(MainProjectPath)!='' or $(LaunchMainProjectPath)!='') and $(EnableUsingMSBuildCopyOutputFileToFastDebug)==true">
2535
<Message Text="当前使用的复制方法 $(NuGetUsingMSBuildCopyOutputFileToFastDebugTaskFolder)" />
2636
<ItemGroup>
2737
<OutputFileToCopy Include="$(OutputPath)$(AssemblyName).dll"></OutputFileToCopy>

build/Version.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Project>
22
<PropertyGroup>
3-
<Version>1.3.63</Version>
3+
<Version>1.3.67</Version>
44
</PropertyGroup>
55
</Project>

0 commit comments

Comments
 (0)