Set a class private string parameter with some value at build time in .net core 3.1 class library project
Open
- Dominant language
- PowerShell
- Stars
- 22k
- Forks
- 4.9k
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 29
Description
I have a class in my .net core 3.1 library project where i want to initialize a key at compile time
```
using System.Text;
namespace MyNamespace
{
public class Myclass
{
private string key;
....
}
}
```
I am publishing my library via simple publish command
`dotnet publish -c release -r linux-x64 `
I am exploring an option where i could pass some attribute during compilation which will be set in key property after compilation. I am also obfuscating my dll as well after inital compilation via some third party tool
Contributor guide
Assessment
This issue has not been assessed yet.