Msbuild command line argument at project-level not solution-level for changing AssemblyName

后端 未结 1 2028
时光取名叫无心
时光取名叫无心 2020-12-18 07:03

Is there any way to specify a command line argument for msbuild that will apply only to one project (i.e. project-level not solution-level), when building a multi-project so

1条回答
  •  無奈伤痛
    2020-12-18 07:07

    You can edit your project in question (its .csproj file) to obtain assembly name from a special property if it is specified, i.e.:

    UsualAssemblyName
    $(ThisProjectNameOverrideAssemblyName)
    

    So when you build your project in question, you pass your ThisProjectNameOverrideAssemblyName to override AssemblyName for this project only:

    msbuild /p:ThisProjectNameOverrideAssemblyName=NewAssemblyName
    

    0 讨论(0)
提交回复
热议问题