Azure Function Service Service Bus TriggerC#

Место общения программистов C#
Ответить
Anonymous
 Azure Function Service Service Bus Trigger

Сообщение Anonymous »

Я получаю эту ошибку, когда внедряю триггер сервисной шины, и пытаюсь создать/запустить его локально
1> C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4911,5):
error MSB3027: Could not copy "C:\Users\Loc\.nuget\packages\system.security.cryptography.protecteddata\4.5.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll" to
"bin\Release\net8.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll".
Exceeded retry count of 10. Failed.

1> C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4911,5):
error MSB3021: Unable to copy file "C:\Users\Loc\.nuget\packages\system.security.cryptography.protecteddata\4.5.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll" to
"bin\Release\net8.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll".
Could not find a part of the path 'bin\Release\net8.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll'.

1> Done building project "WorkerExtensions.csproj" -- FAILED.
< /code>
my .csproj < /p>


net8.0
v4
Exe
enable
enable











< /code>
.[Function(nameof(Serviceannouncement))]
public async Task Run(
[ServiceBusTrigger("mytopic", "mysubscription", Connection = "connstring")]
ServiceBusReceivedMessage message,
ServiceBusMessageActions messageActions)
{
_logger.LogInformation("Message ID: {id}", message.MessageId);
_logger.LogInformation("Message Body: {body}", message.Body);
_logger.LogInformation("Message Content-Type: {contentType}", message.ContentType);

// Complete the message
await messageActions.CompleteMessageAsync(message);
}


Подробнее здесь: https://stackoverflow.com/questions/797 ... us-trigger
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «C#»