ASP. Net Сборка Core 3.1 в папку клиента с пользовательским именем, а не в netcoreapp3.1 - PullRequest
1 голос
/ 09 апреля 2020

Я разработал библиотеку классов для существующих проектных решений. И он успешно собирается.

Это плагин NOP Commerce, и мне нужно встроить его в указанную c папку с именем моего проекта, затем менеджер плагинов ищет мой плагин по имени и загружает его на страницу, чтобы установить его ..

Когда я собираю его, он собирается в папку с именем «netcoreapp3.1». Но мне нужно встроить его в пользовательскую папку.

Это мой файл .proj

    <Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
    <Copyright>Copyright © Company, Ltd</Copyright>
    <Company>Company, Ltd</Company>
    <Authors>Isanka Thalagala</Authors>
    <PackageLicenseUrl></PackageLicenseUrl>
    <PackageProjectUrl>http://www.nopcommerce.com/</PackageProjectUrl>
    <RepositoryUrl>https://github.com/nopSolutions/nopCommerce</RepositoryUrl>
    <RepositoryType>Git</RepositoryType>
    <OutputPath>..\..\Presentation\Nop.Web\Plugins\Image.Upload.Azure</OutputPath>
    <OutDir>$(OutputPath)</OutDir>
    <!--Set this parameter to true to get the dlls copied from the NuGet cache to the output of your project.
    You need to set this parameter to true if your plugin has a nuget package 
    to ensure that the dlls copied from the NuGet cache to the output of your project-->
    <CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
  </PropertyGroup>


  <!-- This target execute after "Build" target -->
  <Target Name="NopTarget" AfterTargets="Build">
    <!-- Delete unnecessary libraries from plugins path -->
    <MSBuild Projects="@(ClearPluginAssemblies)" Properties="PluginPath=$(MSBuildProjectDirectory)\$(OutDir)" Targets="NopClear" />
  </Target>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
    <OutputPath>D:\LabFriend\JohnMorrisCore\API\Presentation\Nop.Web\Plugins\Image.Upload.Azure</OutputPath>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <OutputPath>D:\LabFriend\JohnMorrisCore\API\Presentation\Nop.Web\Plugins\Image.Upload.Azure</OutputPath>
  </PropertyGroup>

  <ItemGroup>
    <None Remove="plugin.json" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="ImageResizer" Version="4.2.5" />
    <PackageReference Include="Microsoft.Azure.Storage.Blob" Version="11.1.3" />
    <PackageReference Include="WindowsAzure.Storage" Version="9.3.3" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\..\..\Presentation\Nop.Web.Framework\Nop.Web.Framework.csproj" />
    <ProjectReference Include="..\JohnMorris.Plugin.Core\JohnMorris.Plugin.Core.csproj" />
  </ItemGroup>

  <ItemGroup>
    <Content Include="logo.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="plugin.json" />
    <Content Update="plugin.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemGroup>

</Project>

Это экран настроек

enter image description here

1 Ответ

0 голосов
/ 10 апреля 2020

Я понижаю его до. net ядро ​​2.2. и теперь разрешено строить с произвольным именем

...