Build Errors after moving 4.2 to windows 10

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 years ago
untiedshoes wrote:
Okay, so at least you're getting somewhere!

Have you modified the Qualpay plugin?
Did or do you have any nopTemplates plugins?
The 'SevenSpikes.Core\plugin.json' comes from installing a nopTemplates plugin, as they all use the SevenSpikes.Core plugin.


Not sure why your plugin is trying to reference the SevenSpikes.Core though? Double click the plugins .csproj and check the references in that file.

Also, open the plugin, then show hidden files, and look for any hidden/missing files?


Are there any missing dependencies?

Can you build the plugin on its own?



ya thats a good way!
i did modified the Qualpay plugin
i have nopTemplates plugins ya
heres my csprof file , cant see something wrong here :

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

  <PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
    <Copyright>Copyright © Nop Solutions, Ltd</Copyright>
    <Company>Nop Solutions, Ltd</Company>
    <Authors>Nop Solutions, Ltd</Authors>
    <PackageLicenseUrl></PackageLicenseUrl>
    <PackageProjectUrl>https://www.nopcommerce.com/</PackageProjectUrl>
    <RepositoryUrl>https://github.com/nopSolutions/nopCommerce</RepositoryUrl>
    <RepositoryType>Git</RepositoryType>
    <OutputPath>..\..\Presentation\Nop.Web\Plugins\Payments.Qualpay</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>
  
  <ItemGroup>
    <None Remove="logo.png" />
    <None Remove="plugin.json" />
    <None Remove="Views\Configure.cshtml" />
    <None Remove="Views\Customer\_CreateOrUpdate.Qualpay.cshtml" />
    <None Remove="Views\PaymentInfo.cshtml" />
  </ItemGroup>
  
  <ItemGroup>
    <Content Include="logo.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="plugin.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="Views\Configure.cshtml">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="Views\Customer\_CreateOrUpdate.Qualpay.cshtml">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="Views\PaymentInfo.cshtml">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="Views\_ViewImports.cshtml">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemGroup>

  <ItemGroup>
    <None Update="qpPg.dll">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="qpPlatform.dll">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="RestSharp.dll">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
  </ItemGroup>

  <ItemGroup>
    <Reference Include="qpPg">
      <HintPath>qpPg.dll</HintPath>
    </Reference>
    <Reference Include="qpPlatform">
      <HintPath>qpPlatform.dll</HintPath>
    </Reference>
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\..\Presentation\Nop.Web\Nop.Web.csproj" />
    <ClearPluginAssemblies Include="$(MSBuildProjectDirectory)\..\..\Build\ClearPluginAssemblies.proj" />
  </ItemGroup>

  <!-- 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>

</Project>


cant see any hidden/missing files

the builds ok on its own

but something strange i find ... when i build its adding folders and files that dont need to be exist in the ..\src\Presentation\Nop.Web\Plugins\Payments.Qualpay folder ....
fo example : area,plugins,app_data and themes folders .... and web config file ....
i remove them ... rebuild ... its rebuild ok first time and its add thos files and folders again ... and on the second time i build its fails again ...

Could not copy the file "..\src\Presentation\Nop.Web\Plugins\Payments.Qualpay\web.config" because it was not found

any idea ?
2 years ago
I had a similar issue, and what I found was that after each build, I needed to clean the solution before I did the next build.

What I do now (and this speeds up the general build), is remove items that I don't need building every time I build the solution.

You can do that by right-clicking the main solution, then select 'properties'. From the popup, you can deselect items that you don't want to build.



Also, sometimes building on its own will add folders/files you don't need, but selecting 'publish', will build, then publish, but in doing so, will remove those extra files/folders.
2 years ago
untiedshoes wrote:
I had a similar issue, and what I found was that after each build, I needed to clean the solution before I did the next build.

What I do now (and this speeds up the general build), is remove items that I don't need building every time I build the solution.

You can do that by right-clicking the main solution, then select 'properties'. From the popup, you can deselect items that you don't want to build.



Also, sometimes building on its own will add folders/files you don't need, but selecting 'publish', will build, then publish, but in doing so, will remove those extra files/folders.


ya probably have to clean the project ... i dont see other solution to this ...
if anyone will have any solution ur welcome to post here :)

thnx for all my friend !!
2 years ago
I still suggest my solution: " download a fresh source code version ... build that solution".   If that works OK, you can then add your additional changes/plugins one by one.
2 years ago
New York wrote:
I still suggest my solution: " download a fresh source code version ... build that solution".   If that works OK, you can then add your additional changes/plugins one by one.


yes but what about all the plugins i added ... and the theme ...
can i use the db i have alot of data there with a new fresh source ? how ?
2 years ago
You can do what New York suggests and download and install a fresh version and run the install to make sure everything works correctly.

Then you can change the dataSettings.json file to point to your existing database

Once that is all checked you can starting adding the theme and plugins one by one to see what maybe still be causing you a problem
2 years ago
i tried to get clean installation ... and even with clean 4.2 installation there are problems .... :
metadata file could not found and could not copy file ....
i think its because my visual studio is using the newst sdk 5 ...
and when its build its saying those warning(not errors) :
C:\Program Files\dotnet\sdk\5.0.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK1138: The target framework 'netcoreapp2.2' is out of support and will not receive security updates in the future.

i cant remove sdk 5 coz visual studio on its latest version ... the only thing people suggest is to uninstall visual studio and take an old version the same as my old pc ....
but i think its usless ... i need visual studio newst version and not stuck on old version just because this one project ...

the only option is to take my old pc and make migration from 4.2 to 4.4 ...
is it gana work ? whats the steps ?
2 years ago
ITS WORKING NOW 1!!!!!!!

i just add global.json to the root of the project with :

{
  "sdk": {
    "version": "2.2.207"
  }
}

expilictly telling it to take the 2.2 sdk...
and it worked !!

thnx all for help :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.