nuget - 使用新的csproj格式将文件放在nutkg中的 "analyzer"目录中

标签 nuget csproj roslyn-code-analysis

我正在使用新的.csproj文件格式来打包NuGet包,而不使用.nuspec文件。

问题是,它会将我的dll放在\lib\中,我需要将其放在\analyzers\

我是谁完成的?

最佳答案

控制构建输出放置位置的属性称为BuildOutputTargetFolder,默认为lib(或将tools设置为IsTool时的true):

<BuildOutputTargetFolder>analyzers</BuildOutputTargetFolder>

关于nuget - 使用新的csproj格式将文件放在nutkg中的 "analyzer"目录中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44283437/

相关文章:

powershell - 为 nuget 创建自定义 powershell 脚本,将自定义目标添加到 csproj BeforeBuild 步骤

powershell - 为什么来自 PSGallery 的脚本没有 Zone.Identifier 流?

c# - 如何使用来自 nuget 的包在 Mono 中构建 C# 程序?

.net-core - 持续部署环境中的 dotnet 语义版本控制

visual-studio - 什么取代了 Visual Studio 2019 中的代码分析?

c# - Roslyn - CSharpCompilation 到 CSharpCompilation 引用

visual-studio-2015 - 在VS 2015中从命令行运行代码分析工具

c# - 错误构建 VSTS : ## [error] Error: Unable to locate the 'nuget'

asp.net - 包尝试添加对 GAC 中未找到的 System.Runtime 的引用

msbuild - 使用 .NET Core csproj VS 2017 工具最小化引用