Skip to content

Commit 04a6de4

Browse files
committed
2 parents 8660c76 + 4c558aa commit 04a6de4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

readme.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,19 @@ If Polyfill is being consumed in a solution that produce a library (and usually
100100
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.
101101

102102

103+
## Troubleshooting
104+
105+
Make sure `DefineConstants` is not set from dotnet CLI, which would override important constants set by Polyfill.
106+
107+
Instead of using `dotnet publish -p:DefineConstants=MY_CONSTANT`, set the constant indirectly in the project:
108+
```xml
109+
<Project Sdk="Microsoft.NET.Sdk">
110+
<PropertyGroup>
111+
<DefineConstants Condition="'$(MyConstant)' == 'true'">$(DefineConstants);MY_CONSTANT</DefineConstants>
112+
```
113+
and use `dotnet publish -p:MyConstant=true`.
114+
115+
103116
## Included polyfills
104117

105118

0 commit comments

Comments
 (0)