Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Dec 19, 2024
2 parents 8660c76 + 4c558aa commit 04a6de4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,19 @@ If Polyfill is being consumed in a solution that produce a library (and usually
If, however, `InternalsVisibleTo` is being used to expose APIs (for example to test projects), then the Polyfill nuget should be added only to the root library project.


## Troubleshooting

Make sure `DefineConstants` is not set from dotnet CLI, which would override important constants set by Polyfill.

Instead of using `dotnet publish -p:DefineConstants=MY_CONSTANT`, set the constant indirectly in the project:
```xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<DefineConstants Condition="'$(MyConstant)' == 'true'">$(DefineConstants);MY_CONSTANT</DefineConstants>
```
and use `dotnet publish -p:MyConstant=true`.


## Included polyfills


Expand Down

0 comments on commit 04a6de4

Please sign in to comment.