2014-09-08 26 views
9

TFS'de iyi çalışan bir Azure projem var.Azure projesiyle hata

ben yapmış olduğun en son sürümünü almak ve projeyi yeniden inşa ve şimdi bazı hatalar var:

Error 97 The setting 'Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel' for role ServiceLayer is specified in the service configuration file, but it is not declared in the service definition file. D:\...\ServiceLayer.Azure1\ServiceConfiguration.Local.cscfg 1 1 ServiceLayer.Azure1 

Error 98 Role: 'ServiceLayer', setting 'Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel' in all service configurations could not be found in the service definition. D:\...\ServiceLayer.Azure1\ServiceDefinition.csdef 

Aşağıdaki kod var:

ServiceDefinition.csdef:

<ServiceDefinition name="ServiceLayer.Azure1" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2014-01.2.3"> 
    <WebRole name="ServiceLayer" vmsize="Medium"> 
    <Sites> 
     <Site name="Web"> 
     <Bindings> 
      <Binding name="Endpoint1" endpointName="Endpoint1" /> 
     </Bindings> 
     </Site> 
    </Sites> 
    <Endpoints> 
     <InputEndpoint name="Endpoint1" protocol="http" port="80" /> 
    </Endpoints> 
    <Imports> 
     <Import moduleName="Diagnostics" /> 
     <Import moduleName="RemoteAccess" /> 
     <Import moduleName="RemoteForwarder" /> 
    </Imports> 
    </WebRole> 
</ServiceDefinition> 

ve dosya: ServiceConfiguration.Local.cscfg:

<ServiceConfiguration serviceName="ServiceLayer.Azure1" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="3" osVersion="*" schemaVersion="2014-01.2.3"> 
    <Role name="ServiceLayer"> 
    <Instances count="1" /> 
    <ConfigurationSettings> 
     <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" /> 
     <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" /> 
     <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="[...]" /> 
     <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="[...]" /> 
     <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="2015-03-05T23:59:59.0000000+01:00" /> 
     <Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" /> 
     <Setting name="Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel" value="1" /> 
    </ConfigurationSettings> 
    <Certificates> 
     <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="A218B66C70E780B00E189FAF7C75B0696B90D284" thumbprintAlgorithm="sha1" /> 
    </Certificates> 
    </Role> 
</ServiceConfiguration> 

cevap

21

ConfigurationSettings bölümündeki Hizmet tanım dosyasında da tüm ayar adlarınızı (değerler olmadan) belirtmeniz gerekir.

<ServiceDefinition name="ServiceLayer.Azure1"  xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2014-01.2.3"> 


<WebRole name="ServiceLayer" vmsize="Medium"> 
<Sites> 
    <Site name="Web"> 
    <Bindings> 
     <Binding name="Endpoint1" endpointName="Endpoint1" /> 
    </Bindings> 
    </Site> 
</Sites> 
<Endpoints> 
    <InputEndpoint name="Endpoint1" protocol="http" port="80" /> 
</Endpoints> 
<Imports> 
    <Import moduleName="Diagnostics" /> 
    <Import moduleName="RemoteAccess" /> 
    <Import moduleName="RemoteForwarder" /> 
</Imports> 

    <ConfigurationSettings> 
    <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" /> 
    <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" /> 

    .... and so on (all your settings here 

    </ConfigurationSettings> 
    </WebRole> 
    </ServiceDefinition> 

EDIT:

Yani ServiceDefinitionFile gibi görünmelidir

size Certificates bölüm için yapmanız gereken aynı.

+0

Benim için yalnızca ClientDiagnosticLevel ayarını ekleyerek çalıştı. Teşekkürler! – Ingrid

+2

Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString ile ilgili benzer bir sorun vardı, 2.3 umursamadı, 2.7 SDK ilgileniyor. –