Skip to content

Commit

Permalink
chore: csproj workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsdev authored Oct 30, 2023
1 parent be4ad67 commit e3ec12b
Showing 1 changed file with 46 additions and 1 deletion.
47 changes: 46 additions & 1 deletion src/generate-csproj.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,53 @@
import { csprojTemplate } from '../node_modules/@seamapi/nextlove-sdk-generator/lib/generate-csharp-sdk/generate-csproj.js'
import { writeFileSync } from 'fs'

import packageJson from '../package.json'

export const csprojTemplate = (version: string, dotNetVersions: string[]) =>
`
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>${dotNetVersions
.map((v) => `net${v}`)
.join(';')}</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>annotations</Nullable>
<PackageId>Seam</PackageId>
<PackageVersion>${version}</PackageVersion>
<Authors>Seam</Authors>
<Owners>Seam</Owners>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageProjectUrl>http://github.com/seamapi/seam-connect</PackageProjectUrl>
<PackageIcon>icon.png</PackageIcon>
<Description>Seam API for C#</Description>
<Copyright>Copyright (c) 2021-2023 Seam Labs, Inc.</Copyright>
<PackageTags>api iot</PackageTags>
</PropertyGroup>
<ItemGroup>
<None Include="icon.png" Pack="true" PackagePath="icon.png" />
<None Include="README.md" Pack="true" PackagePath="README.md" />
<PackageReference Include="JsonSubTypes" Version="2.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Polly" Version="7.2.4" />
<PackageReference Include="RestSharp" Version="110.2.0" />
</ItemGroup>
</Project>
`.trim()

const main = async () => {
writeFileSync(
'./output/csharp/src/Seam/Seam.csproj',
Expand Down

0 comments on commit e3ec12b

Please sign in to comment.