2017-12-19 6 views
1

私はローカルに自分のサービスファブリックのアプリケーションを実行しようとしているが、私は次のエラーを受信して​​います:Register-ServiceFabricApplicationType:値をnullにすることはできません。パラメータ名:ソース

Register-ServiceFabricApplicationType : Value cannot be null.

Parameter name: source

この文脈でsourceは何?なぜそれがnullですか? ApplicationManifest.xml

答えて

0

私は<EnvironmentOverrides><EnvironmentVariable> 1/wのエントリを定義したが、私はServiceManifest.xmlにその<EnvironmentVariable>を定義していませんでした。

Sample project to illustrate


ApplicationManifest.xml

<?xml version="1.0" encoding="utf-8"?> 
<ApplicationManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ApplicationTypeName="Application1Type" ApplicationTypeVersion="1.0.0" xmlns="http://schemas.microsoft.com/2011/01/fabric"> 
    <Parameters> 
    <Parameter Name="Web1_InstanceCount" DefaultValue="-1" /> 
    <Parameter Name="OverrideTest" DefaultValue="Do I Get a Useless Error Message?" /> 
    </Parameters> 
    <ServiceManifestImport> 
    <ServiceManifestRef ServiceManifestName="Web1Pkg" ServiceManifestVersion="1.0.0" /> 
    <ConfigOverrides /> 
    <EnvironmentOverrides CodePackageRef="Code"> 
     <EnvironmentVariable Name="OverrideTest" Value="[OverrideTest]" /> 
    </EnvironmentOverrides> 
    </ServiceManifestImport> 
    .... 
    </DefaultServices> 
</ApplicationManifest> 

ServiceManifest.xml

<?xml version="1.0" encoding="utf-8"?> 
<ServiceManifest Name="Web1Pkg" 
       Version="1.0.0" 
       xmlns="http://schemas.microsoft.com/2011/01/fabric" 
       xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
    <ServiceTypes> 
    <StatelessServiceType ServiceTypeName="Web1Type" /> 
    </ServiceTypes> 

    <CodePackage Name="Code" Version="1.0.0"> 
    <EntryPoint> 
     <ExeHost> 
     <Program>Web1.exe</Program> 
     <WorkingFolder>CodePackage</WorkingFolder> 
     </ExeHost> 
    </EntryPoint> 
    <!--Uncomment the EnvironmentVariables to get rid of Value cannot be null. >Parameter name: source--> 
    <!--<EnvironmentVariables> 
     <EnvironmentVariable Name="OverrideTest" Value="Uncomment-me to get rid of the error" /> 
    </EnvironmentVariables>--> 
    </CodePackage> 
    ... 
</ServiceManifest> 
関連する問題