Skip to content

Commit

Permalink
修复 NuGet 包项目无法修改 AppHost 的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
walterlv committed Jan 27, 2022
1 parent 384ec82 commit 3207fc4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/dotnetCampus.AppHost/Assets/build/Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@

<Error Condition="!Exists($(DCAppHostPatcherToolPath))" Text="工具路径 “$(DCAppHostPatcherToolPath)” 不存在,命令 $(_DCAppHostPatcherTool)。" />
<Error Condition="$(DCAppHostDotnetRoot)!='' and $(_DCTargetFramework)==''" Text="不支持为 $(TargetFramework) 框架修改 AppHost。" />
<Error Condition="$(DCAppHostDotnetRoot)!='' and !Exists('$(_DCAppHostSourceDirectory)') " Text="不支持为($(NETCoreSdkRuntimeIdentifier))运行时修改 AppHost。" />
<Error Condition="$(DCAppHostDotnetRoot)!='' and !Exists('$(_DCAppHostSourceDirectory)') " Text="不支持为($(DefaultAppHostRuntimeIdentifier))运行时修改 AppHost。" />

<Message Importance="high" Condition="$(DCAppHostDotnetRoot)==''" Text="没有为框架 $(TargetFramework) 指定 DCAppHostDotnetRoot,因此不会自定义 AppHost 的 DOTNET_ROOT 路径。" />
<Message Importance="high" Condition="$(DCAppHostDotnetRoot)!=''" Text="已为框架 $(TargetFramework) 指定的自定义 AppHost DOTNET_ROOT 路径为 $(DCAppHostDotnetRoot)。" />
<Message Importance="high" Condition="$(DCAppHostDotnetRoot)==''" Text="项目 $(MSBuildProjectName) 没有为框架 $(TargetFramework) 和运行时 $(DefaultAppHostRuntimeIdentifier) 指定 DCAppHostDotnetRoot,因此不会自定义 AppHost 的 dotnet_root 路径。" />
<Message Importance="high" Condition="$(DCAppHostDotnetRoot)!=''" Text="项目 $(MSBuildProjectName) 已为框架 $(TargetFramework) 和运行时 $(DefaultAppHostRuntimeIdentifier) 指定的自定义 AppHost dotnet_root 路径为 $(DCAppHostDotnetRoot)。" />

<PropertyGroup>
<_DCAppHostSourceFile>$(_DCAppHostSourceDirectory)apphost.exe</_DCAppHostSourceFile>
Expand Down
3 changes: 2 additions & 1 deletion src/dotnetCampus.AppHost/dotnetCampus.AppHost.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<RootNamespace>dotnetCampus.AppHosting</RootNamespace>
<IsTool>true</IsTool>
<IncludeBuildOutput>false</IncludeBuildOutput>
</PropertyGroup>

<!-- 在 GitHub 的 Action 构建会添加 GITHUB_ACTIONS 变量 -->
Expand Down Expand Up @@ -46,6 +46,7 @@
<None Include="Assets\build\Build.props" Pack="True" PackagePath="build\$(PackageId).props" />
<None Include="Assets\build\Build.targets" Pack="True" PackagePath="build\$(PackageId).targets" />
<None Include="Assets\template\**" Pack="True" PackagePath="template" />
<None Include="$(OutputPath)net6.0\**" Pack="True" PackagePath="tools" />
</ItemGroup>
</Target>

Expand Down

0 comments on commit 3207fc4

Please sign in to comment.