Skip to content

Commit

Permalink
readme.md: add troubleshooting section (#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
xackus authored Dec 19, 2024
1 parent e02b568 commit 4c558aa
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 4c558aa

Please sign in to comment.