小编Kir*_*eed的帖子

无法在对象浏览器中查看此项目,因为它不可用或尚未构建

我有一个VS2013解决方案,有许多项目所有C#with framework 4.5当我尝试重建解决方案中的所有项目时,我收到一条错误消息

This project cannot be viewed in the object browser because it is unavailable or not yet built
Run Code Online (Sandbox Code Playgroud)

我注意到在启动项目中,对其他DLLS的引用看起来好像缺少DLL.

我实际上可以通过一次构建一个项目来运行解决方案,然后双击启动项目中的引用.

最终,我已经摆脱了启动项目中的所有错误参考图标,解决方案将运行.

但是,只要我重建整个解决方案,就会重新出现错误的引用.

奇怪的构建工作,但重建没有,清洁和重建没有.

我确实有以下设置.

Project Templates References Project DomainLayer
Project DataLayer References Project Templates and Project DomainLayer
Run Code Online (Sandbox Code Playgroud)

因此VS首先需要构建DomainLayer然后是模板然后是DataLayer ....也许它无法解决这个问题?

到底是怎么回事?

c# visual-studio-2013

7
推荐指数
1
解决办法
1万
查看次数

元素'system.webServer'具有无效的子元素'httpPlatform'

我正在浏览Shawn Wildermuth的课程,并在构建时收到有关web.config的以下警告

Severity    Code    Description Project File    
Line
Warning     The element 'system.webServer' has invalid child element 'httpPlatform'. 
List of possible elements expected: 'asp, caching, cgi, defaultDocument, 
directoryBrowse, globalModules, handlers, httpCompression, webSocket, 
httpErrors, httpLogging, httpProtocol, httpRedirect, httpTracing, 
isapiFilters, modules, applicationInitialization, odbcLogging, security,
serverRuntime, serverSideInclude, staticContent, tracing, urlCompression, 
validation, management, rewrite'.   
TheWorld    E:\EShared\Pluralsight\aspdotnet-5-ef7-bootstrap-angular-web-app\1-aspdotnet-5-ef7-bootstrap-angular-web-app-m1-exercise-files\VS2015\src\TheWorld\wwwroot\web.config   8
Run Code Online (Sandbox Code Playgroud)

Web.config是

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/>
    </handlers>

    <httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%" stdoutLogEnabled="false" startupTimeLimit="3600"/>

  </system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)

程序运行正常.我应该对警告做些什么吗?

asp.net dnx50

7
推荐指数
2
解决办法
4939
查看次数

指定的提供程序类型无效.CryptographicException

我试图从Microsoft文档运行脚本GetAppConfigSettings.ps1 帮助设置密钥库

该脚本包含以下内容

# **********************************************************************************************
# Prep the cert credential data
# **********************************************************************************************
$certificateName = "$applicationName" + "cert"
$myCertThumbprint = (New-SelfSignedCertificate -Type Custom -Subject "$certificateName"-KeyUsage DigitalSignature -KeyAlgorithm RSA -KeyLength 2048 -CertStoreLocation "Cert:\CurrentUser\My" -Provider "Microsoft Enhanced Cryptographic Provider v1.0" ).Thumbprint
$x509 = (Get-ChildItem -Path cert:\CurrentUser\My\$myCertthumbprint)
$password = Read-Host -Prompt "Please enter the certificate password." -AsSecureString

# Saving the self-signed cert and pfx (private key) in case it's needed later
Export-Certificate -cert $x509 -FilePath ".\$certificateName.cer"
Export-PfxCertificate -Cert $x509 -FilePath ".\$certificateName.pfx" …
Run Code Online (Sandbox Code Playgroud)

powershell azure-keyvault

7
推荐指数
1
解决办法
1171
查看次数

构建管道不会删除

在Azure DevOps门户中,我选择一个管道,然后选择[...]菜单,然后选择删除.

我看到一条消息:

你确定吗?此操作无法撤消.这将永久删除管道'vt3e(1)'.删除包括所有构建和相关工件.

我输入管道名称并单击"确定",但管道不会删除.

我等了几个小时.

[更新]

Chrome中的F12在控制台中显示错误:

ms.vss-build-web.common-library .__ y__CePsj5f5zdcIK.min.js:18错误:版本保留与请求的管道关联的一个或多个构建.管道(s)和构建版本不会被删除

[更新]

我试图按照David D给出的答案,但是当我去删除一个版本时,我收到了一条消息

VS402946:无法删除"Release-8",因为它当前部署在阶段1的阶段.

[更新]

问题记录在Microsoft

azure-devops

7
推荐指数
6
解决办法
4849
查看次数

从'System.String'到'Serilog.Core.IDestructuringPolicy'的无效转换

通过研究Serilog.Sinks.AzureTableStorage我有以下内容

在主要

 var configuration = new ConfigurationBuilder()
            .AddJsonFile("appsettings.json")
            .Build();

        var logger = new LoggerConfiguration()
            .ReadFrom.Configuration(configuration) // the error happens here
            .CreateLogger();

        logger.Information("Hello, world!");
Run Code Online (Sandbox Code Playgroud)

在appsetttings.json中(使用不同的连接字符串)

"Serilog": {
    "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.AzureTableStorage" ],

    "MinimumLevel": "Debug",
    "WriteTo": [
      { "Name": "Console" },
      {
        "Name": "File",
        "Args": { "path": "%TEMP%\\Logs\\serilog-configuration-sample.txt" }
      },
      {
        "Name": "AzureTableStorage",
        "Args": {
          "storageTableName": "mystoragetable",
          "connectionString": "myconnectionstring"
                }
      }
    ],
    "Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ],
    "Destructure": [
      {
        "Name": "With",
        "Args": { "policy": "Sample.CustomPolicy, Sample" }
      }, …
Run Code Online (Sandbox Code Playgroud)

c# serilog .net-core

7
推荐指数
1
解决办法
1668
查看次数

安装 nvm、node 和设置路径后,'node' 未被识别为内部或外部命令

我从nvm-setup.zip安装了 NVM 然后,在命令提示符下,我运行

nvm install 8.11.2
Run Code Online (Sandbox Code Playgroud)

然后我跑了

nvm use 8.11.2
Run Code Online (Sandbox Code Playgroud)

哪个输出

now using node v8.11.2 (64-bit)
Run Code Online (Sandbox Code Playgroud)

然后我跑了

SET PATH=C:\Program Files\Nodejs;%PATH%
Run Code Online (Sandbox Code Playgroud)

但是当我输入

node
Run Code Online (Sandbox Code Playgroud)

我得到

'node' is not recognized as an internal or external command
Run Code Online (Sandbox Code Playgroud)

nvm

7
推荐指数
2
解决办法
4287
查看次数

无法在设计器中加载文件或程序集 System.Componentmodel.Annotations 4.2.0.0

当我尝试在我的 c# .NET Framework 4.7.2 类库中打开表单时出现此错误。检查自动生成绑定重定向

调用堆栈是

at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) …
Run Code Online (Sandbox Code Playgroud)

c# datagridview windows-forms-designer winforms

7
推荐指数
1
解决办法
852
查看次数

实现接口导致TPT从继承类导致TPH

我想创建一个自引用文件夹表和相关的文件表

如MyFolder1和MyFile1所示.

在此输入图像描述

我了解如何通过继承接口来获得此结构.

是否也可以通过继承抽象类来实现?

public class Model1Context : DbContext
{
    public Model1Context()
        : base("name=Model1")
    {
        Database.SetInitializer(new Model1Initializer());
    }

    public virtual DbSet<MyFolder1> MyFolder1s { get; set; }
    public virtual DbSet<MyFile1> MyFile1s { get; set; }
    public virtual DbSet<MyFolder2> MyFolder2s { get; set; }
    public virtual DbSet<MyFile2> MyFile2s { get; set; }
}

public class Model1Initializer : DropCreateDatabaseIfModelChanges<Model1Context>
{
}

public class MyFolder1 : BasicBO, ISequencedTreeNode
{
    public MyFolder1 MyFolder { get; set; }
    public int SeqNo { get; set; }
    [NotMapped] …
Run Code Online (Sandbox Code Playgroud)

ef-code-first entity-framework-6

6
推荐指数
0
解决办法
157
查看次数

SourceTree 不显示远程存储库

在源树 2.3.1 中,我单击工具栏上的远程来查看远程存储库,但没有显示。

单击“刷新”后没有任何反应

atlassian-sourcetree

6
推荐指数
1
解决办法
1万
查看次数

构建管道视觉设计器中的任务的YAML中的注释的目的是什么?

当我在YAML中寻找构建管道的视觉设计器中的任务时,我会看到类似的注释

#Your build pipeline references an undefined variable named ‘Parameters.projects’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972
Run Code Online (Sandbox Code Playgroud)

这是给我添加Parameters.projects变量的指示,还是我应该决定在构建YAML构建管道时使用YAML的内容?

azure-devops

6
推荐指数
1
解决办法
853
查看次数