服务结构:pkg\Debug 未找到
Service Fabric: pkg\Debug is not found
我已经创建了 Service Fabric 应用程序并向其中添加了无状态 ASP.NET 核心 Web API 3.1 项目。当我 运行 使用 VS 2019 在本地使用 Service Fabric 应用程序时,出现以下错误:-
The PowerShell script failed to execute. See the Service Fabric Tools pane in the output window for details.
下面是输出window信息
C:\Users\malle\Documents\Mahesh\Projects\RetentionPortal\API\Application1\pkg\Debug is not found.
At C:\Program Files\Microsoft SDKs\Service
Fabric\Tools\PSModule\ServiceFabricSDK\Publish-NewServiceFabricApplication.ps1:120 char:9
+ throw $errMsg
+ ~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (C:\Users\malle\...g is not found.:String) [], RuntimeException
+ FullyQualifiedErrorId : C:\Users\malle\Documents\Mahesh\Projects\RetentionPortal\API\Application1\pkg\Debug is n
ot found.
Finished executing script 'Publish-NewServiceFabricApplication'.
Time elapsed: 00:00:01.7629461
Started executing script 'Unpublish-ServiceFabricApplication'.
powershell -NonInteractive -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -Command "[void](Connect-ServiceFabricCluster); Import-Module 'C:\Program Files\Microsoft SDKs\Service Fabric\Tools\PSModule\ServiceFabricSDK\ServiceFabricSDK.psm1'; Unpublish-ServiceFabricApplication -ApplicationName 'fabric:/Application1' -ErrorAction Stop"
Removing application...
Finished executing script 'Unpublish-ServiceFabricApplication'.
Time elapsed: 00:00:01.5278716
Started executing script 'UnregisterApplicationType'.
powershell -NonInteractive -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -Command "[void](Connect-ServiceFabricCluster); Import-Module 'C:\Program Files\Microsoft SDKs\Service Fabric\Tools\PSModule\ServiceFabricSDK\ServiceFabricSDK.psm1'; if (Get-ServiceFabricApplicationType -ApplicationTypeName 'Application1Type' | Where-Object { $_.ApplicationTypeVersion -eq '1.0.0' }) { Unregister-ServiceFabricApplicationType -ApplicationTypeName 'Application1Type' -ApplicationTypeVersion '1.0.0' -ErrorAction Stop -Force }"
Finished executing script 'UnregisterApplicationType'.
Time elapsed: 00:00:01.4425472
非常感谢任何帮助
一般解决步骤:
- 重启电脑
- 登录
- 以管理员身份启动 Visual Studio
- 打开 Service Fabric 项目
- F5 调试
- 再次尝试运行相同的项目,相同的输出
- 运行 POwerShell 作为管理员,
Connect-ServiceFabricCluster
.
- 在 Visual Studio
中开始调试 (F5)
- 现在一切都很好
更多详情,您可以查看github.
中的issues
Publish-NewServiceFabricApplication fails to read ApplicationManifest.xml
如果上述解决方案不起作用,建议尝试以下步骤。
- 创建
pkg/Debug
文件夹。
- 我在Debug文件夹下有一些文件,所以我删除了它们。
- 清理并重建解决方案。
- F5运行。它会生成你想要的文件。
我已经创建了 Service Fabric 应用程序并向其中添加了无状态 ASP.NET 核心 Web API 3.1 项目。当我 运行 使用 VS 2019 在本地使用 Service Fabric 应用程序时,出现以下错误:-
The PowerShell script failed to execute. See the Service Fabric Tools pane in the output window for details.
下面是输出window信息
C:\Users\malle\Documents\Mahesh\Projects\RetentionPortal\API\Application1\pkg\Debug is not found.
At C:\Program Files\Microsoft SDKs\Service
Fabric\Tools\PSModule\ServiceFabricSDK\Publish-NewServiceFabricApplication.ps1:120 char:9
+ throw $errMsg
+ ~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (C:\Users\malle\...g is not found.:String) [], RuntimeException
+ FullyQualifiedErrorId : C:\Users\malle\Documents\Mahesh\Projects\RetentionPortal\API\Application1\pkg\Debug is n
ot found.
Finished executing script 'Publish-NewServiceFabricApplication'.
Time elapsed: 00:00:01.7629461
Started executing script 'Unpublish-ServiceFabricApplication'.
powershell -NonInteractive -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -Command "[void](Connect-ServiceFabricCluster); Import-Module 'C:\Program Files\Microsoft SDKs\Service Fabric\Tools\PSModule\ServiceFabricSDK\ServiceFabricSDK.psm1'; Unpublish-ServiceFabricApplication -ApplicationName 'fabric:/Application1' -ErrorAction Stop"
Removing application...
Finished executing script 'Unpublish-ServiceFabricApplication'.
Time elapsed: 00:00:01.5278716
Started executing script 'UnregisterApplicationType'.
powershell -NonInteractive -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -Command "[void](Connect-ServiceFabricCluster); Import-Module 'C:\Program Files\Microsoft SDKs\Service Fabric\Tools\PSModule\ServiceFabricSDK\ServiceFabricSDK.psm1'; if (Get-ServiceFabricApplicationType -ApplicationTypeName 'Application1Type' | Where-Object { $_.ApplicationTypeVersion -eq '1.0.0' }) { Unregister-ServiceFabricApplicationType -ApplicationTypeName 'Application1Type' -ApplicationTypeVersion '1.0.0' -ErrorAction Stop -Force }"
Finished executing script 'UnregisterApplicationType'.
Time elapsed: 00:00:01.4425472
非常感谢任何帮助
一般解决步骤:
- 重启电脑
- 登录
- 以管理员身份启动 Visual Studio
- 打开 Service Fabric 项目
- F5 调试
- 再次尝试运行相同的项目,相同的输出
- 运行 POwerShell 作为管理员,
Connect-ServiceFabricCluster
.
- 在 Visual Studio 中开始调试 (F5)
- 现在一切都很好
更多详情,您可以查看github.
中的issuesPublish-NewServiceFabricApplication fails to read ApplicationManifest.xml
如果上述解决方案不起作用,建议尝试以下步骤。
- 创建
pkg/Debug
文件夹。
- 我在Debug文件夹下有一些文件,所以我删除了它们。
- 清理并重建解决方案。
- F5运行。它会生成你想要的文件。