如何导出带有填充const字符串的C#文件(在Visual Studio中)

有没有一种方法可以复制/导出Main.cs文件,以便常量已被填充? 我想要一个新文件(Main.cs-复制),其中已填充常量。

MyConsts.cs

public const string str1 = "field1";
public const string str2 = "field2";

Main.cs

static void Main()
{
    DoSomething(str1, "description of field1");
    DoSomething(str2, "description of field2");
}

导出后的Main.cs。

static void Main()
{
    DoSomething("field1", "description of field1"); //filled in const
    DoSomething("field2", "description of field2"); //filled in const
}