Update README.md

This commit is contained in:
Stef Heyenrath
2021-08-09 08:48:29 +02:00
committed by GitHub
parent df4740ccd4
commit cec093775c
+11
View File
@@ -14,6 +14,17 @@ Or via the Visual Studio NuGet package manager or if you use the `dotnet` comman
`dotnet add package ProxyInterfaceGenerator`
#### :pencil2: Using in a Library project
When you use this Source Generator as a package reference in your library project, make sure that you define this NuGet package as a Private Asset (`<PrivateAssets>`) and define the correct `<IncludeAssets>`. This is needed to indicate that this dependency is purely used as a development dependency and that you dont want to expose that to projects that will consume your package.
``` xml
<PackageReference Include="ProxyInterfaceGenerator" Version="0.0.10">
<!-- 👇 -->
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
```
## Usage
### Given: an external existing class which does not implement an interface