本文介绍了使用dnx / .net core更改输出程序集和程序包的名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目存在于名为 Oracle 的目录中,我希望创建的工件称为 MyCompany.MyApp.Oracle 而不是 Oracle ,除了更改目录名称之外,更改输出程序集名称和nuget包名称还有哪些选择?

I have a project which exists in a directory named Oracle and I would like the artifacts created to be called MyCompany.MyApp.Oracle instead of Oracle, what are my options for changing the output assembly name and nuget package name outside of changing the name of the directory?


  • 我目前在我的旁边有一个 MyCompany.MyApp.Oracle.xproj project.json 文件

  • 我还尝试设置< AssemblyName> MyCompany.MyApp.Oracle< / AssemblyName> ,但是没有用

  • 我还尝试设置 { id: MyCompany.MyApp.Oracle} 在project.json中仍然没有运气

  • I currently have a MyCompany.MyApp.Oracle.xproj next to my project.json file
  • I've also tried setting <AssemblyName>MyCompany.MyApp.Oracle</AssemblyName> in the xproj file but that didn't work
  • I've also tried setting {"id":"MyCompany.MyApp.Oracle"} in project.json and still no luck

推荐答案

基于@Victor Hurdugaci

Based on comment of @Victor Hurdugaci

"buildOptions": {
    "outputName": "Some.Specific.Assembly.Name"
},

您需要将其放入project.json f ile。
它将产生输出,其名称为:Some.Specific.Assembly.Name.dll

You need to put it inside project.json file.It will produce output with name: Some.Specific.Assembly.Name.dll

这篇关于使用dnx / .net core更改输出程序集和程序包的名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 23:57