Azure的移动服务错误:有多个名称的静态类被发现在组件引导程序 [英] Azure Mobile Service error: more than one static class with name was found as bootstrapper in assemblies

查看:241
本文介绍了Azure的移动服务错误:有多个名称的静态类被发现在组件引导程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

报告以下错误在Azure中的日志从Visual Studio 2013中部署C#MobileService项目的一个新版本之后:

The following error was reported in Azure logs after deploying a new version of C# MobileService project from Visual Studio 2013:

名为'WebApiConfig'不止一个静态类被发现为引导程序的组件:{{My.MobileService.Project,myMobileService}}。请提供只有一个类或使用'IBootstrapper属性来定义一个独特的引导程序。

More than one static class with name 'WebApiConfig' was found as bootstrapper in assemblies: {{My.MobileService.Project, myMobileService}}. Please provide only one class or use the 'IBootstrapper' attribute to define a unique bootstrapper.

如果,事实上,也有提到的类文件的多个版本,我该如何部署新版本之前清洗吗?

If, in fact, there are multiple versions of mentioned class file, how do I clean it before deploying the new version?

推荐答案

当你改变你的程序集的名称这种情况经常发生。如果是这样的情况下,尝试在目标删除文件。在发布Web对话框中,展开文件发布选项,然后选择发布时选择目的地删除其他文件。

This often happens when you change the name of your assembly. If this is the case, try removing the files in the destination. In the publish web dialog, expand the "File Publish Options", and select the "Remove additional files at destination" option when publishing.

这篇关于Azure的移动服务错误:有多个名称的静态类被发现在组件引导程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆