1 Star 0 Fork 0

星语笙箫/YoloDev.Sdk

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Directory.Build.targets 2.57 KB
一键复制 编辑 原始数据 按行查看 历史
Aleksander Heintz 提交于 2021-07-15 23:50 . Start on roslyn analyzer sdk
<Project>
<PropertyGroup Condition=" '$(ProjectType)' == 'SdkProject' ">
<EnableDefaultNoneItems>false</EnableDefaultNoneItems>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageType>MSBuildSdk</PackageType>
<PackageTags>MSBuild MSBuildSdk</PackageTags>
<IncludeSymbols>false</IncludeSymbols>
<BeforePack>
_BuildSdkItems;
$(BeforePack);
</BeforePack>
</PropertyGroup>
<ItemGroup Condition=" '$(ProjectType)' == 'SdkProject' ">
<AvailableItemName Include="SdkItem" />
<SdkItem Include="Sdk\**\*.props" />
<SdkItem Include="Sdk\**\*.targets" />
</ItemGroup>
<!-- Dogfooding -->
<Import Project="$(MSBuildThisFileDirectory)src\YoloDev.Sdk\Sdk\Sdk.targets" />
<Target Name="_PrepareSdkItems" Condition="'@(SdkItem->Count())' > 0">
<PropertyGroup>
<_SdkItemsDir>$([System.IO.Path]::GetFullPath('Sdk\'))</_SdkItemsDir>
<SdkItemsIntermediateOutputPath>$(IntermediateOutputPath)sdk\</SdkItemsIntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<_SdkItem Include="@(SdkItem)">
<RelativePath>$([MSBuild]::MakeRelative($(_SdkItemsDir), '%(SdkItem.FullPath)'))</RelativePath>
<TargetPath>$(SdkItemsIntermediateOutputPath)%(_SdkItem.RelativePath)</TargetPath>
</_SdkItem>
<SdkItem Remove="@(SdkItem)" />
<SdkItem Include="@(_SdkItem)" />
</ItemGroup>
<RemoveDir Directories="$(SdkItemsIntermediateOutputPath)" Condition="Exists('$(SdkItemsIntermediateOutputPath)')" />
</Target>
<Target Name="_UpdateSdkItems" Inputs="@(SdkItem)" Outputs="%(SdkItem.TargetPath)">
<Error Text="The file '%(SdkItem.Identity)' is located outside the Sdk folder '$(_SdkItemsDir)'" Code="YOLOSDK0001"
Condition="$([System.String]::new('%(SdkItem.RelativePath)').StartsWith('..'))" />
<Error Text="The file '%(SdkItem.Identity)' could not be found" Code="YOLOSDK0002"
Condition="!Exists('%(SdkItem.FullPath)')" />
<PropertyGroup>
<FileContent>$([System.IO.File]::ReadAllText('%(SdkItem.FullPath)'))</FileContent>
<FileContent>$(FileContent.Replace('$$VERSION$$', '$(PackageVersion)'))</FileContent>
</PropertyGroup>
<WriteLinesToFile File="%(SdkItem.TargetPath)" Lines="$(FileContent)" Overwrite="true" />
</Target>
<Target Name="_BuildSdkItems" Condition="'@(SdkItem->Count())' > 0" DependsOnTargets="_PrepareSdkItems;_UpdateSdkItems">
<ItemGroup>
<_PackageFiles Include="@(SdkItem -> '%(TargetPath)')" PackagePath="Sdk\">
<BuildAction>None</BuildAction>
</_PackageFiles>
</ItemGroup>
</Target>
</Project>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/null_039_6059/YoloDev.Sdk.git
git@gitee.com:null_039_6059/YoloDev.Sdk.git
null_039_6059
YoloDev.Sdk
YoloDev.Sdk
main

搜索帮助