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

旧时模样 提交于 2019-11-29 07:25:11

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

<AssemblyName Condition=" '$(ThisProjectNameOverrideAssemblyName)' == '' " >UsualAssemblyName</AssemblyName>
<AssemblyName Condition=" '$(ThisProjectNameOverrideAssemblyName)' != '' " >$(ThisProjectNameOverrideAssemblyName)</AssemblyName>

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

msbuild /p:ThisProjectNameOverrideAssemblyName=NewAssemblyName
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!