Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net core 在.netcore3.1中的库outtype中添加带有nuget的dll时生成dll失败_Asp.net Core_Nuget_Asp.net Core 3.1 - Fatal编程技术网

Asp.net core 在.netcore3.1中的库outtype中添加带有nuget的dll时生成dll失败

Asp.net core 在.netcore3.1中的库outtype中添加带有nuget的dll时生成dll失败,asp.net-core,nuget,asp.net-core-3.1,Asp.net Core,Nuget,Asp.net Core 3.1,我有一个插件应用程序。在解决方案中,有一个控制台应用程序和多个库类型的项目。正在加载选定的插件,应用程序开始侦听 问题是,;如果我将nugetten dll添加到库类型项目中,则应在我指定的文件夹中有生成时创建这些dll的编译版本 .csproj <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netcorea

我有一个插件应用程序。在解决方案中,有一个控制台应用程序和多个库类型的项目。正在加载选定的插件,应用程序开始侦听

问题是,;如果我将nugetten dll添加到库类型项目中,则应在我指定的文件夹中有生成时创建这些dll的编译版本

.csproj

 <Project Sdk="Microsoft.NET.Sdk">
          <PropertyGroup>
            <TargetFramework>netcoreapp3.1</TargetFramework>
            <OutputType>Library</OutputType>
            <SccProjectName>SAK</SccProjectName>
            <SccLocalPath>SAK</SccLocalPath>
            <SccAuxPath>SAK</SccAuxPath>
            <SccProvider>SAK</SccProvider>
            <AssemblyInfoFilePath>Properties\AssemblyInfo.cs</AssemblyInfoFilePath>
            <UpdateAssemblyVersion>True</UpdateAssemblyVersion>
            <UpdateAssemblyFileVersion>True</UpdateAssemblyFileVersion>
            <UpdateAssemblyInfoVersion>True</UpdateAssemblyInfoVersion>
            <AssemblyVersionSettings>None.None.Increment.DateStamp</AssemblyVersionSettings>
            <AssemblyFileVersionSettings>None.None.Increment.DateStamp</AssemblyFileVersionSettings>
            <AssemblyInfoVersionSettings>None.None.Increment.DateStamp</AssemblyInfoVersionSettings>
            <PrimaryVersionType>AssemblyVersionAttribute</PrimaryVersionType>
            <AssemblyVersion>2.0.0.0</AssemblyVersion>
            <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
            <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
            <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
          </PropertyGroup>
          <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
        <OutputPath>..\Nemesis.Agent\bin\Debug\Plugins\PrinterPlugin\</OutputPath>
        <PlatformTarget>x86</PlatformTarget>
      </PropertyGroup>
          <ItemGroup>
            <PackageReference Include="itext7" Version="7.1.13" />
            <PackageReference Include="PdfiumViewer.Core" Version="1.0.4" />
            <PackageReference Include="PuppeteerSharp" Version="2.0.4" />
          </ItemGroup>
          <ItemGroup>
            ...
          </ItemGroup>
        </Project>
运行时出错


我找不到错误的来源。我尝试了其他名称空间。如果我手动将编译后的dll移动到相关文件夹,问题就解决了。net framework没有这个问题。

我通过向csproj添加以下代码克服了这个问题

<CopyLocalLockFileAssemblies>True<CopyLocalLockFileAssemblies>
True
<CopyLocalLockFileAssemblies>True<CopyLocalLockFileAssemblies>