小编rmz*_*k 1的帖子

NuGet的意思

我想知道NuGet是什么意思.这有点像等等吗?它甚至有一个有意义的名字吗?或者它是某种东西的缩写还是某人为了好玩而决定这个名字?请帮忙,这个问题一直在吃我的脑袋一周.

terminology nuget

18
推荐指数
2
解决办法
4406
查看次数

Dockerfile无法查看本地文件或私有nuget服务器

我正在尝试在容器技术上启动我的.net核心web api.使用泊坞窗.

环境= Windows 10,Visual Studio

Docker版本:

客户:

版本:17.12.0-ce

API版本:1.35

转到版本:go1.9.2

Git commit:c97c6d6

建造:2017年12月27日星期三20:05:22

OS/Arch:windows/amd64

服务器:

发动机:

版本:17.12.0-ce

API版本:1.35(最低版本1.12)

转到版本:go1.9.2

Git commit:c97c6d6

建造:2017年12月27日星期三20:12:29

OS/Arch:linux/amd64

实验:是的

我的Nuget.Config文件:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>


<add key="nuget.org" value="https://api.nuget.org/v3/index.json" 
protocolVersion="3" />


<add key="Private" 
value="http://My_Private_Nuget_Server" />


</packageSources>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<bindingRedirects>
<add key="skip" value="False" />
</bindingRedirects>
<packageManagement>
<add key="format" value="0" />
<add key="disabled" value="True" />
</packageManagement>


<apikeys>
<add key="https://www.nuget.org" value="Some_Long_Value" />
</apikeys>


<disabledPackageSources />
</configuration>
Run Code Online (Sandbox Code Playgroud)

我的Dockerfile:

FROM microsoft/aspnetcore-build:2.0 AS …
Run Code Online (Sandbox Code Playgroud)

c# visual-studio nuget docker

9
推荐指数
4
解决办法
6898
查看次数

file_put_contents(/root/.composer/cache/repo/https---flex.symfony.com/):无法打开流:是目录错误

我在 docker 容器中使用 composer install 构建了我的 symfony 4 应用程序。

作曲家版本 1.10.19

但我得到了这个错误。

[ErrorException] file_put_contents(/root/.composer/cache/repo/https---flex.symfony.com/): 无法打开流:是一个目录

如果我在没有任何中断的情况下再运行 composer install 1 次,则构建成功。

如果我删除项目目录上的 vendor 和 var/cache 目录,则会再次出现错误。

我试过这个方法:

  • 触发“composer clearcache”命令没有成功
  • 删除 ~/.composer 目录没有成功
  • chmod -R 777 ~/.composer 没有成功

在不同容器内构建相同项目的一些成功。我的容器以此卷开头:

  • 项目目录

  • ~/.ssh 目录

我在网上搜索但没有解决方案。请帮忙。

symfony composer-php docker symfony-flex

8
推荐指数
1
解决办法
568
查看次数

System.ArgumentException: 初始化字符串的格式不符合从索引 0 开始的规范。3

我正在尝试制作 .NET Core Web API,但找不到解决我的问题的方法。

完整的错误是

[ERR] 迭代上下文类型 '"MailAlertWebApiWithEF.Data.AlertContext"' 的查询结果时,数据库中发生异常。" ""System.ArgumentException: 初始化字符串的格式不符合从索引 0 开始的规范.

我从现有数据库中获取配置代码

Scaffold-DbContext "server=.;ConnectionString" Microsoft.EntityFrameworkCore.SqlServer -OutputDir DBModels -force -v

我的配置是:

 public class AlertModelConfiguration<T>:BaseEntityModelConfiguration<T,int> where T:Alert
{

    public AlertModelConfiguration(ref ModelBuilder modelBuilder):base(ref modelBuilder)
    {
        modelBuilder.Entity<Alert>(entity =>
        {
            //entity.HasKey(e => e.AlertId);

            entity.Property(e => e.CreateDate).HasColumnType("datetime");

            entity.Property(e => e.DeleteDate).HasColumnType("datetime");

            entity.Property(e => e.Detail)
                .IsRequired()
                .HasMaxLength(2046)
                .IsUnicode(false);

            entity.Property(e => e.ErrorDetail)
                .IsRequired()
                .HasMaxLength(255)
                .IsUnicode(false);

            entity.Property(e => e.Title)
                .HasMaxLength(50)
                .IsUnicode(false);

            entity.Property(e => e.UpdateDate).HasColumnType("datetime");
        });
     }
}
Run Code Online (Sandbox Code Playgroud)

我的上下文是:

 public class AlertContext:DbContext
  {
    public AlertContext(DbContextOptions<AlertContext> options)
        : base(options) …
Run Code Online (Sandbox Code Playgroud)

c# asp.net-web-api .net-core

2
推荐指数
1
解决办法
7358
查看次数