简体   繁体   English

在 Visual Studio 2022 中调整服务依赖启动 arguments

[英]Adjust service dependencies startup arguments in Visual Studio 2022

Question问题

Is it possible to set startup parameters or configure them in any way for service dependencies in Visual Studio 2022?是否可以为 Visual Studio 2022 中的服务依赖项设置启动参数或以任何方式配置它们? Can I perhaps create my own?我可以创建自己的吗?

Work around解决方法

Startup azurite manually with my preferred arguments before opening Visual Studio 2022.在打开 Visual Studio 2022 之前,使用我首选的 arguments 手动启动azurite

Information信息

When opening a solution in Visual Studio 2022 Azurite is started when there is a service dependency on Storage Azurite emulator (local) .在 Visual Studio 2022 中打开解决方案时,如果Storage Azurite emulator (local)存在服务依赖关系,则会启动 Azurite。 When looking at the output I can see that some parameters are passed which I might want to override.在查看 output 时,我可以看到传递了一些我可能想要覆盖的参数。 Specifically the --location and --debug parameters.特别是--location--debug参数。 I am however unable to find where Visual Studio 2022 sets these parameters.但是,我无法找到 Visual Studio 2022 设置这些参数的位置。

Output Output

Ensuring Azure Functions Core Tools are up to date. This may take a few minutes...
Azure Functions Core Tools are up to date.
AwesomeSecretProject.FunctionApp: c:\program files\microsoft visual studio\2022\professional\common7\ide\extensions\microsoft\Azure Storage Emulator\azurite.exe --location "C:\Users\SecretAgentBond\AppData\Local\Temp\Azurite" --debug "C:\Users\SecretAgentBond\AppData\Local\Temp\Azurite\debug.log" --skipApiVersionCheck
AwesomeSecretProject.FunctionApp: Azurite Blob service is starting at http://127.0.0.1:10000
AwesomeSecretProject.FunctionApp: Azurite Blob service is successfully listening at http://127.0.0.1:10000
AwesomeSecretProject.FunctionApp: Azurite Queue service is starting at http://127.0.0.1:10001
AwesomeSecretProject.FunctionApp: Azurite Queue service is successfully listening at http://127.0.0.1:10001
AwesomeSecretProject.FunctionApp: Azurite Table service is starting at http://127.0.0.1:10002
AwesomeSecretProject.FunctionApp: Azurite Table service is successfully listening at http://127.0.0.1:10002

Is it possible to set startup parameters or configure them in any way for service dependencies in Visual Studio 2022?是否可以为 Visual Studio 2022 中的服务依赖项设置启动参数或以任何方式配置它们? Can I perhaps create my own?我可以创建自己的吗?

Yes, you can override the parameters --location & --debug parameters of the Azurite Storage emulator.是的,您可以覆盖 Azurite 存储模拟器的参数--location--debug参数。

Cmdlet taken from the source of Azurite GitHub Repo : Cmdlet 取自 Azurite GitHub Repo的来源:

azurite --silent --location C:\Users\HariRepo\source\repos --debug C:\Users\HariRepo\source\repos

Then Azurite will start at the specified location and the logs stored in that specified location of --debug parameter.然后 Azurite 将在指定位置启动,并将日志存储在--debug参数的指定位置。

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

Also, you can specify the --location and --debug parameters for each Azurite service like blob, queue, table services individually.此外,您可以为每个 Azurite 服务(如 blob、队列、表服务)单独指定--location--debug参数。 If you want to change the --location and --debug parameters value, you can reset the Azurite services and able to set to new path.如果要更改--location--debug参数值,可以重置 Azurite 服务并能够设置为新路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azureite 未在 Visual Studio 2022 中自动启动 - Azureite not starting automatically in Visual Studio 2022 在 Visual Studio 2022 中更改 Azure 订阅/租户 - Change Azure Subscription/tenant in Visual Studio 2022 Visual Studio 2022 function app远程调试失败 - Visual studio 2022 function app remote debugging failure 强制 Visual Studio (2022) 在 WSL 上运行 Azure 函数 - Force Visual Studio (2022) to run Azure Functions on WSL 从 Visual Studio 2022 调试 Azure Function 应用程序 - Debug Azure Function App from Visual Studio 2022 Visual Studio 2022 和 .net Azure Function 应用程序的更新问题 - Visual Studio 2022 and .net update issues for Azure Function App 使用 Visual Studio 2022 加载所需库 hostpolicy.dll Azure Function 时出错 - An error occurred while loading required library hostpolicy.dll with Azure Function With Visual Studio 2022 Azure function 从 Visual Studio 2022 部署的 Dotnet 6 不起作用 - Azure function deployed with Dotnet 6 from Visual Studio 2022 doesn't work Visual Studio 2022 Create Azure TimeTrigger function 导致没有文件的空解决方案 - Visual Studio 2022 Create Azure TimeTrigger function results in empty solution with no files 无法使用 Visual Studio 2022 中的 Timer Trigger 调试 Azure 函数 V4 - Not able to debug Azure function V4 with Timer Trigger from Visual studio 2022
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM