IoTSharp.csproj 7.7 KB
Newer Older
麦壳饼's avatar
麦壳饼 已提交
1 2 3 4
<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
5
    <RuntimeIdentifiers>win7-x64;rhel.7-x64;ubuntu.18.04-x64</RuntimeIdentifiers>
6 7 8
    <PreserveCompilationContext>true</PreserveCompilationContext>
    <CreateUser>true</CreateUser>
    <InstallService>true</InstallService>
麦壳饼's avatar
isca  
麦壳饼 已提交
9
    <TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
麦壳饼's avatar
麦壳饼 已提交
10 11 12 13
    <Company>IoT#</Company>
    <Product>IoTSharp</Product>
    <Authors>IoT#</Authors>
    <PackageProjectUrl>https://github.com/IoTSharp/IoTSharp</PackageProjectUrl>
14
    <PackageLicenseUrl></PackageLicenseUrl>
麦壳饼's avatar
麦壳饼 已提交
15
    <RepositoryUrl>https://github.com/IoTSharp/IoTSharp</RepositoryUrl>
16
    <PackageReleaseNotes>Open-source IoT Platform - Device management, data collection, processing and visualization.   https://www.iotsharp.net</PackageReleaseNotes>
麦壳饼's avatar
麦壳饼 已提交
17
    <Description>Open-source IoT Platform - Device management, data collection, processing and visualization.</Description>
麦壳饼's avatar
麦壳饼 已提交
18
    <PackageId>IoTSharp</PackageId>
麦壳饼's avatar
麦壳饼 已提交
19
    <UserSecretsId>18970590-05bf-4a1f-a70b-3c8a120d12cb</UserSecretsId>
麦壳饼's avatar
麦壳饼 已提交
20 21 22 23 24 25 26
    <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
    <TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
    <IsPackable>false</IsPackable>
    <SpaRoot>ClientApp\</SpaRoot>
    <DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>

    <!-- Set this to true if you enable server-side prerendering -->
麦壳饼's avatar
isca  
麦壳饼 已提交
27
    <BuildServerSideRenderer>false</BuildServerSideRenderer>
28 29 30 31 32
    <Version>0.1.99</Version>
    <PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
    <RepositoryType>git</RepositoryType>
    <PackageTags>IoT</PackageTags>
    <PackageIconUrl>https://avatars2.githubusercontent.com/u/44353254?s=200&amp;v=4</PackageIconUrl>
麦壳饼's avatar
麦壳饼 已提交
33
  </PropertyGroup>
34 35 36 37 38 39

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
    <DocumentationFile>D:\GitHub\IoTSharp\IoTSharp\IoTSharp\IoTSharp.xml</DocumentationFile>
    <NoWarn>1701;1702;1591</NoWarn>
  </PropertyGroup>
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
  <ItemGroup>
    <Content Update="appsettings.json">
      <LinuxPath>/etc/iotsharp/appsettings.json</LinuxPath>
    </Content>
    <Content Update="appsettings.Development.json">
      <LinuxPath>/etc/iotsharp/appsettings.Development.json</LinuxPath>
    </Content>
    <Content Include="iotsharp.service" CopyToPublishDirectory="PreserveNewest">
      <LinuxPath>/etc/systemd/system/iotsharp.service</LinuxPath>
    </Content>
    <LinuxFolder Include="/var/log/iotsharp" Group="iotsharp" Owner="iotsharp" RemoveOnUninstall="true" />
    <LinuxFolder Include="/var/run/iotsharp" Group="iotsharp" Owner="iotsharp" RemoveOnUninstall="true" />
    <LinuxFolder Include="/var/lib/iotsharp" Group="iotsharp" Owner="iotsharp" RemoveOnUninstall="true" />
    <RpmDependency Include="libunwind" Version="1.1" />
    <RpmDependency Include="libicu" Version="50.1.2" />
  </ItemGroup>
  <ItemGroup>
57
    <PackageReference Include="CoAP.NET.Core" Version="1.1.0" />
58
    <PackageReference Include="Microsoft.AspNetCore.Hosting.WindowsServices" Version="2.2.0" />
麦壳饼's avatar
麦壳饼 已提交
59
    <PackageReference Include="MQTTnet.AspNetCoreEx" Version="3.0.2.1" />
60
    <PackageReference Include="MQTTnet.Extensions.ManagedClient" Version="3.0.2" />
麦壳饼's avatar
78  
麦壳饼 已提交
61
    <PackageReference Include="Packaging.Targets" Version="0.1.78" />
麦壳饼's avatar
麦壳饼 已提交
62

63
  </ItemGroup>
麦壳饼's avatar
麦壳饼 已提交
64 65 66 67 68
  <ItemGroup>
    <Compile Remove="Migrations\**" />
    <Content Remove="Migrations\**" />
    <EmbeddedResource Remove="Migrations\**" />
    <None Remove="Migrations\**" />
69 70 71 72
    <None Include="..\LICENSE.txt">
      <Pack>True</Pack>
      <PackagePath></PackagePath>
    </None>
麦壳饼's avatar
麦壳饼 已提交
73
  </ItemGroup>
麦壳饼's avatar
麦壳饼 已提交
74
  <ItemGroup>
麦壳饼's avatar
isca  
麦壳饼 已提交
75
    <PackageReference Include="Changwei.AspNetCore.SpaServices.Extensions.VueCli" Version="1.0.0" />
麦壳饼's avatar
麦壳饼 已提交
76 77
    <PackageReference Include="IoTSharp.X509Extensions" Version="1.3.3" />
    <PackageReference Include="LiteDB" Version="4.1.4" />
麦壳饼's avatar
isca  
麦壳饼 已提交
78

麦壳饼's avatar
麦壳饼 已提交
79 80 81 82 83 84
    <PackageReference Include="Microsoft.AspNetCore.App" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
麦壳饼's avatar
麦壳饼 已提交
85 86 87 88
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.4" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="2.2.4" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.2.4" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.4" />
麦壳饼's avatar
麦壳饼 已提交
89
    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Design" Version="1.1.6" />
麦壳饼's avatar
麦壳饼 已提交
90
    <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />
麦壳饼's avatar
麦壳饼 已提交
91 92 93
    <PackageReference Include="MQTTnet" Version="3.0.2" />
    <PackageReference Include="MQTTnet.AspNetCore" Version="3.0.2" />
    <PackageReference Include="MQTTnet.Extensions.Rpc" Version="3.0.2" />
94
    <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.2.4" />
麦壳饼's avatar
麦壳饼 已提交
95
    <PackageReference Include="NSwag.AspNetCore" Version="13.0.2" />
96
    <PackageReference Include="QuartzHostedService" Version="0.0.5" />
麦壳饼's avatar
麦壳饼 已提交
97
    <PackageReference Include="Quartzmin" Version="1.0.3" />
麦壳饼's avatar
麦壳饼 已提交
98
    <PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.1" />
麦壳饼's avatar
麦壳饼 已提交
99
  </ItemGroup>
100 101 102 103 104
  <ProjectExtensions>
    <VisualStudio>
      <UserProperties appsettings_1Development_1json__JSONSchema="http://json.schemastore.org/bungee-plugin" />
    </VisualStudio>
  </ProjectExtensions>
麦壳饼's avatar
麦壳饼 已提交
105 106 107 108 109 110
  <ItemGroup>
    <!-- Don't publish the SPA source files, but do show them in the project files list -->
    <Content Remove="$(SpaRoot)**" />
    <None Remove="$(SpaRoot)**" />
    <None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**" />
  </ItemGroup>
麦壳饼's avatar
麦壳饼 已提交
111 112 113
  <ItemGroup>
    <None Remove=".gitignore" />
  </ItemGroup>
麦壳饼's avatar
麦壳饼 已提交
114 115 116
  <ItemGroup>
    <Folder Include="Jobs\" />
  </ItemGroup>
麦壳饼's avatar
麦壳饼 已提交
117 118 119 120 121 122 123 124

  <Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(SpaRoot)node_modules') ">
    <!-- Ensure Node.js is installed -->
    <Exec Command="node --version" ContinueOnError="true">
      <Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
    </Exec>
    <Error Condition="'$(ErrorCode)' != '0'" Text="Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE." />
    <Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
麦壳饼's avatar
麦壳饼 已提交
125 126
    <Exec WorkingDirectory="$(SpaRoot)" Command="npm install " />
    <Exec WorkingDirectory="$(SpaRoot)" Command="npm install -g @vue/cli " />
麦壳饼's avatar
麦壳饼 已提交
127 128 129 130
  </Target>

  <Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
    <!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
麦壳饼's avatar
麦壳饼 已提交
131
    <Exec WorkingDirectory="$(SpaRoot)" Command="npm install " />
麦壳饼's avatar
isca  
麦壳饼 已提交
132 133
    <Exec WorkingDirectory="$(SpaRoot)" Command="npm run build:prod" />

麦壳饼's avatar
麦壳饼 已提交
134 135 136 137 138 139 140 141 142 143 144 145 146

    <!-- Include the newly-built files in the publish output -->
    <ItemGroup>
      <DistFiles Include="$(SpaRoot)dist\**; $(SpaRoot)dist-server\**" />
      <DistFiles Include="$(SpaRoot)node_modules\**" Condition="'$(BuildServerSideRenderer)' == 'true'" />
      <ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
        <RelativePath>%(DistFiles.Identity)</RelativePath>
        <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
      </ResolvedFileToPublish>
    </ItemGroup>
  </Target>

</Project>