更新readme说明

This commit is contained in:
吴长征 2023-01-12 11:10:29 +08:00
parent 203d3a0dea
commit cca4386410

View File

@ -1,25 +1,23 @@
## Falcon.SugarApi
### 引入nuget包可能默认不会包含Falcon.SugarApi.xml文件但是没有这个文件swagger会少很多说明也可能会报错
### 引入包说明
引入nuget包可能默认不会包含Falcon.SugarApi.xml文件但是没有这个文件swagger会少很多说明也可能会报错。
将一下代码包含在.csproj项目文件中可以复制包中的xml文件到输出目录和发布目录。
```xml
<Target Name="CopyReferenceFiles" BeforeTargets="Build">
<ItemGroup>
<XmlReferenceFiles Condition="Exists('$(OutputPath)%(Filename).dll')" Include="%(Reference.RelativeDir)%(Reference.Filename).xml" />
</ItemGroup>
<Message Text="Copying reference files to $(OutputPath)" Importance="High" />
<Copy SourceFiles="@(XmlReferenceFiles)" DestinationFolder="$(OutputPath)" Condition="Exists('%(RootDir)%(Directory)%(Filename)%(Extension)')" />
</Target>
<Target Name="CopyReferenceFilesToPublish" BeforeTargets="PrepareForPublish">
<ItemGroup>
<XmlReferenceFiles Condition="Exists('$(OutputPath)%(Filename).dll')" Include="%(Reference.RelativeDir)%(Reference.Filename).xml" />
</ItemGroup>
<Message Text="Copying reference files to $(OutputPath)" Importance="High" />
<Copy SourceFiles="@(XmlReferenceFiles)" DestinationFolder="$(PublishDir)" Condition="Exists('%(RootDir)%(Directory)%(Filename)%(Extension)')" />
</Target>
<Target Name="CopyReferenceFiles" BeforeTargets="Build">
<ItemGroup>
<XmlReferenceFiles Condition="Exists('$(OutputPath)%(Filename).dll')" Include="%(Reference.RelativeDir)%(Reference.Filename).xml" />
</ItemGroup>
<Message Text="Copying reference files to $(OutputPath)" Importance="High" />
<Copy SourceFiles="@(XmlReferenceFiles)" DestinationFolder="$(OutputPath)" Condition="Exists('%(RootDir)%(Directory)%(Filename)%(Extension)')" />
</Target>
<Target Name="CopyReferenceFilesToPublish" BeforeTargets="PrepareForPublish">
<ItemGroup>
<XmlReferenceFiles Condition="Exists('$(OutputPath)%(Filename).dll')" Include="%(Reference.RelativeDir)%(Reference.Filename).xml" />
</ItemGroup>
<Message Text="Copying reference files to $(OutputPath)" Importance="High" />
<Copy SourceFiles="@(XmlReferenceFiles)" DestinationFolder="$(PublishDir)" Condition="Exists('%(RootDir)%(Directory)%(Filename)%(Extension)')" />
</Target>
```
### WebApi扩展模块 [进入](/Falcon/Falcon.SugarApi/src/branch/master/Falcon.SugarApi/ApiDefinistions)