From 4c558aab831983092599eb272aef4eabfda38ebc Mon Sep 17 00:00:00 2001 From: Maciej Walczak <14938807+xackus@users.noreply.github.com> Date: Thu, 19 Dec 2024 10:38:13 +0100 Subject: [PATCH] readme.md: add troubleshooting section (#258) --- readme.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/readme.md b/readme.md index c393010..42943f1 100644 --- a/readme.md +++ b/readme.md @@ -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 + + + $(DefineConstants);MY_CONSTANT +``` +and use `dotnet publish -p:MyConstant=true`. + + ## Included polyfills