Skip to content

Commit c857817

Browse files
committed
fix: hotfix for PrimitiveRepository source gen for class libs with no Primitively types declared.
1 parent 13026ae commit c857817

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ For more detailed information about Primitively, check out [primitively.net][pri
4242
To get started, first add the [Primitively](https://www.nuget.org/packages/Primitively/) NuGet package to your project by running the following command:
4343

4444
```sh
45-
dotnet add package Primitively --prerelease
45+
dotnet add package Primitively
4646
```
4747

4848
Open your csproj file and edit the package reference, setting `PrivateAssets="All"`. The file will look something like this afterwards:
@@ -57,7 +57,7 @@ Open your csproj file and edit the package reference, setting `PrivateAssets="Al
5757
</PropertyGroup>
5858

5959
<ItemGroup>
60-
<PackageReference Include="Primitively" Version="1.4.15-rc.3" PrivateAssets="All" />
60+
<PackageReference Include="Primitively" Version="1.4.19" PrivateAssets="All" />
6161
</ItemGroup>
6262

6363
</Project>
@@ -105,19 +105,19 @@ Here's some source generation in action using each of the above attributes: -
105105
If you want to use your Primitively types in an ASP.NET core web project. Add the [Primitively.AspNetCore.Mvc](https://www.nuget.org/packages/Primitively.AspNetCore.Mvc/) NuGet package to your project by running the following command. It contains model binding support for your Primitively types, which means you can use your Primitively types in request parameters.
106106

107107
```sh
108-
dotnet add package Primitively.AspNetCore.Mvc --prerelease
108+
dotnet add package Primitively.AspNetCore.Mvc
109109
```
110110

111111
If you are also generating **swagger** documentation for a web API. Add the [Primitively.AspNetCore.SwaggerGen](https://www.nuget.org/packages/Primitively.AspNetCore.SwaggerGen/) NuGet package to your project by running the following command.
112112

113113
```sh
114-
dotnet add package Primitively.AspNetCore.SwaggerGen --prerelease
114+
dotnet add package Primitively.AspNetCore.SwaggerGen
115115
```
116116

117117
When using `FluentValidation` to validate your web requests. Add the [Primitively.FluentValidation](https://www.nuget.org/packages/Primitively.FluentValidation/) NuGet package to your project by running the following command. It contains two extension methods which validate any Primitively type with zero DI configuration.
118118

119119
```sh
120-
dotnet add package Primitively.FluentValidation --prerelease
120+
dotnet add package Primitively.FluentValidation
121121
```
122122

123123
### Dependency injection
@@ -152,7 +152,7 @@ builder.Services.AddPrimitively(options =>
152152
If you want to store your Primitively types in MongoDB they will need a BSON serializer. Add the [Primitively.MongoDB.Bson](https://www.nuget.org/packages/Primitively.MongoDB.Bson/) NuGet package to your project by running the following command. It contains highly configurable BSON serialization support for your Primitively types.
153153

154154
```sh
155-
dotnet add package Primitively.MongoDB.Bson --prerelease
155+
dotnet add package Primitively.MongoDB.Bson
156156
```
157157

158158
### Dependency injection

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
2727
<PackageOutputPath>$(MSBuildThisFileDirectory)..\artifacts</PackageOutputPath>
28-
<version>1.4.17</version>
28+
<version>1.4.19</version>
2929
</PropertyGroup>
3030

3131
<ItemGroup>

src/Primitively/Structs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ private static void GenerateRepositoryFile(SourceProductionContext context, List
209209

210210
if (!dataTypes.Any())
211211
{
212-
yieldStatements.Add($"{Padding}return global::System.Linq.Enumerable.Empty<global::Primitively.IPrimitiveInfo>();");
212+
yieldStatements.Add($"{Padding}return global::System.Linq.Enumerable.Empty<global::Primitively.PrimitiveInfo>();");
213213
}
214214
else
215215
{

0 commit comments

Comments
 (0)