我正在尝试从 2010 和 1.6 迁移到 Visual Studio 2012 和 Azure 1.7。当我升级我的工作项目时,我现在遇到了一堆错误,例如:
CloudServices58:无法加载名为“Antimalware”的导入模块。
这让我想到了 Microsoft.WindowsAzure.targets:
<Target Name="PreValidateServiceModel">
<ValidateServiceFiles
AllowLegacyWebRoles="$(AllowLegacyWebRoles)"
ServiceDefinitionFile="@(SourceServiceDefinition)"
ServiceConfigurationFile="@(SourceServiceConfiguration)">
</ValidateServiceFiles>
</Target>
在我的 cscfg 文件中出现这样的错误:
角色 MyProject.ProcessLogs 的设置“Microsoft.WindowsAzure.Plugins.Antimalware.ServiceLocation”在服务配置文件中指定,但未在服务定义文件中声明。
错误把我带到了这里:
<ConfigurationSettings>
<...stuff.../>
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.ServiceLocation" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.EnableAntimalware" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.EnableRealtimeProtection" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.EnableWeeklyScheduledScans" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.DayForWeeklyScheduledScans" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.TimeForWeeklyScheduledScans" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.ExcludedExtensions" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.ExcludedPaths" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.ExcludedProcesses" value="" />
</ConfigurationSettings>
我很迷茫,有什么想法吗?