Recently I've started encountering an issue where plugins that reference the Nop.Web project are pulling in items from Nop.Web into the plugin output directory. Plugins that don't have a reference to Nop.Web do not have this issue. I'm able to replicate this behavior using an unmodified nopCommerce v4.20 solution.
I'm running Visual Studio 2019 and suspect it may be related to that. Has anyone else encountered this?
Are you aware if this is a recent issue that was caused by a change in Visual Studio? I don't remember this issue popping up a year ago when everything seemed to build and run fine.
The same problem has occurred with one of my own plugins - at about the same time as yours occurred - when I upgraded to VS 2019.
The 'copy local' attribute of the Nop.Web project dependency in the plugin properties was unchanged and is still set to 'NO'.
The only workaround I've found is to manually delete the extra folders and files in the output directory. Without doing that I get an exception because the plugins folder is also replicated.
Does anyone have any other suggestions for fixes??
Yes, it’s really unwanted. But it’s not possible to identify the issue from this image. Please share screenshot of project references. Or you can just share .csproj file.
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netcoreapp2.2</TargetFramework> <OutputPath>..\..\Presentation\Nop.Web\Plugins\PBSB</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 trueif 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>