Skip to content

Commit

Permalink
Merge pull request #106 from dotnet-campus/t/lindexi-core
Browse files Browse the repository at this point in the history
尝试修复跨平台构建
  • Loading branch information
kkwpsv authored Jan 4, 2021
2 parents 765377b + 43bf289 commit 29fd40d
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/dotnetCampus.SourceYard/Assets/Current/Core.targets
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,19 @@

<!--打包第三步,无论多框架还是单框架只执行一次-->
<Target Name="SourceYardStep3">
<PropertyGroup>

<!-- 开发者自己有指定路径,但是路径里面不存在应用 -->
<Error Text="Can not find SourceYardApplicationFilePath $(SourceYardApplicationFilePath)" Condition="'$(SourceYardApplicationFilePath)' != '' And !Exists($(SourceYardApplicationFilePath))"/>

<PropertyGroup Condition="'$(SourceYardApplicationFilePath)' == ''">
<!-- 给定默认的 SourceYard 路径名 -->
<SourceYardApplicationFilePath Condition="'$(SourceYardApplicationFilePath)' == ''">$(MSBuildThisFileDirectory)..\tools\net45\dotnetCampus.SourceYard.exe</SourceYardApplicationFilePath>
<!-- 我们使用 $(MSBuildRuntimeType) 来判断编译器是 .NET Core 的还是 .NET Framework 的。
然后选用对应的工具。-->
<!--The type of the runtime that is currently executing. Introduced in MSBuild 15. Value may be undefined (prior to MSBuild 15), Full indicating that MSBuild is running on the desktop .NET Framework, Core indicating that MSBuild is running on .NET Core (for example in dotnet build), or Mono indicating that MSBuild is running on Mono.-->
<SourceYardApplicationFilePath Condition=" '$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net45\dotnetCampus.SourceYard.exe</SourceYardApplicationFilePath>
<SourceYardApplicationFilePath Condition=" '$(MSBuildRuntimeType)' == 'Core'">dotnet $(MSBuildThisFileDirectory)../tools/netcoreapp2.0/dotnetCampus.SourceYard.dll</SourceYardApplicationFilePath>
</PropertyGroup>

<Error Text="Can not find SourceYardApplicationFilePath $(SourceYardApplicationFilePath)" Condition="!Exists($(SourceYardApplicationFilePath))"/>

<Exec
Command="$(SourceYardApplicationFilePath) $(SourceMSBuildProjectFullPath) $(SourceIntermediateDirectory) $(SourcePackageOutputPath) $(SourceYardPackageVersion) --Compile $(CompileTextFile) --Resource $(ResourceTextFile) --Content $(ContentTextFile) --Page $(PageTextFile) --ApplicationDefinition $(ApplicationDefinitionTextFile) --None $(NoneTextFile) --EmbeddedResource $(EmbeddedResourceTextFile) $(SourceYardAuthors) $(SourceYardRepositoryUrl) $(SourceYardRepositoryType) $(SourceYardPackageProjectUrl) $(SourceYardCopyright) $(SourceYardDescription) $(SourceYardTitle) $(SourceYardPackageLicenseUrl) $(SourceYardPackageReleaseNotes) $(SourceYardPackageTags) $(SourceYardOwner) $(SourceYardPackageId) $(SourcePackageReferenceVersion) --SourcePackingDirectory $(SourcePackingDirectory) --TargetFrameworks &quot;$(TargetFrameworks) &quot; --TargetFramework &quot;$(TargetFramework) &quot;">
</Exec>
Expand Down

0 comments on commit 29fd40d

Please sign in to comment.