每次我使用新的.NET Core RC2模板构建项目时,都没有提供可运行的.EXE文件.如果我按F5调试我的控制台应用程序,它可以通过
C:\Program Files\dotnet\dotnet.exe
Run Code Online (Sandbox Code Playgroud)
应用.如果我使用
dotnet run
Run Code Online (Sandbox Code Playgroud)
在文件夹中的命令,它运行正常.但我认为没有.NET Core CLI工具就无法运行应用程序.
我的内容
bin\Debug\netcoreapp1.0\
Run Code Online (Sandbox Code Playgroud)
文件夹看起来像这样:
你可以看到没有.EXE文件可用.只是dll.
我忽略了什么吗?或者我的project.json文件有问题吗?
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0-rc2-3002702"
}
},
"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50"
}
}
}
Run Code Online (Sandbox Code Playgroud)
谢谢!
我想将一个新的.NET Core RC2 MVC应用程序添加到现有的Service Fabric集群中,但我无法弄清楚我应该如何做到这一点.
我看了几个RC1的例子,但这也没有让我更进一步.我知道您需要在ServiceManifest.xml文件中添加EntryPoint.但是在RC1示例中,它们指向已在RC2中删除的dnx.exe:
<EntryPoint>
<ExeHost>
<Program>approot\runtimes\dnx-clr-win-x64.1.0.0-rc1-update1\bin\dnx.exe</Program>
<Arguments>--appbase approot\src\ChatWeb Microsoft.Dnx.ApplicationHost Microsoft.ServiceFabric.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener</Arguments>
<WorkingFolder>CodePackage</WorkingFolder>
<ConsoleRedirection FileRetentionCount="5" FileMaxSizeInKb="2048" />
</ExeHost>
</EntryPoint>
Run Code Online (Sandbox Code Playgroud)
我应该在RC2版本的.NET Core中使用哪个EntryPoint?
谢谢!
当我尝试将我的Service Fabric应用程序发布到Azure群集时,我收到以下错误消息:
3>Copy-ServiceFabricApplicationPackage : Operation timed out.
3>At C:\Program Files\Microsoft SDKs\Service
3>Fabric\Tools\PSModule\ServiceFabricSDK\Publish-NewServiceFabricApplication.ps1:230 char:9
3>+ Copy-ServiceFabricApplicationPackage -ApplicationPackagePath ...
3>+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3> + CategoryInfo : OperationTimeout: (:) [Copy-ServiceFabricApplicationPackage], TimeoutException
3> + FullyQualifiedErrorId : CopyApplicationPackageErrorId,Microsoft.ServiceFabric.Powershell.CopyApplicationPackage
3>
3>Finished executing script 'Deploy-FabricApplication.ps1'.
3>Time elapsed: 00:12:45.2589165
Run Code Online (Sandbox Code Playgroud)
在发布脚本中有一个硬编码的10分钟超时,你可以在这里阅读:https://github.com/Azure/service-fabric-issues/issues/10
这个超时将在upcomming版本中被删除,但同时我的选择是什么?有没有办法按服务发布我的应用服务?
欢迎任何建议!
新的 Cosmos DB 图形 API 是否支持查询参数?例如在查询中:
IDocumentQuery<dynamic> query = client.CreateGremlinQuery<dynamic>(graph, "g.V().has('name', 'john')");
Run Code Online (Sandbox Code Playgroud)
我可以像在 DocumentDB 中那样用查询参数替换硬编码值“john”吗:
IQueryable<Book> queryable = client.CreateDocumentQuery<Book>(
collectionSelfLink,
new SqlQuerySpec
{
QueryText = "SELECT * FROM books b WHERE (b.Author.Name = @name)",
Parameters = new SqlParameterCollection()
{
new SqlParameter("@name", "Herman Melville")
}
});
Run Code Online (Sandbox Code Playgroud)
我是出于安全考虑才问的。或者是否有其他方法可以防御 Gremlin 中的注射?
我正在尝试从刚刚设置的新 Azure 虚拟机连接到我的 Azure Service Fabric 群集。但是当我使用 Connect-ServiceFabricCluster cmdlet 时收到以下错误消息:
Connect-ServiceFabricCluster : An error occurred during this operation. Please check the trace logs for more details.
At line:1 char:1
+ Connect-ServiceFabricCluster -ConnectionEndpoint ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Connect-ServiceFabricCluster], FabricException
+ FullyQualifiedErrorId : CreateClusterConnectionErrorId,Microsoft.ServiceFabric.Powershell.ConnectCluster
Run Code Online (Sandbox Code Playgroud)
我在 powershell 中使用的命令是(值被混淆):
Connect-ServiceFabricCluster -ConnectionEndpoint {ENDPOINT ADDRESS} -FindType FindByThumbprint -FindValue {THUMBPRINT} -X509Credential -ServerCertThumbprint {THUMBPRINT} -StoreLocation CurrentUser -StoreName My
Run Code Online (Sandbox Code Playgroud)
当我在我的开发 PC 上使用完全相同的命令时,它工作得很好。欢迎就出现的问题以及我如何调试这个问题提供任何建议!