Nopcommerce: Fails with ClearPluginAssemblies.proj

Created on 14 Oct 2019  Â·  13Comments  Â·  Source: nopSolutions/nopCommerce

nopCommerce version: 4.2

Steps to reproduce the problem:

  1. Download nopCommerce 4.2 source code
  2. Extract it to disk
  3. Go into src directory
  4. dotnet build
  5. Run dotnet build again
  6. dotnet run --project .\Presentation\Nop.Web\

Fails with ClearPluginAssemblies.proj(21,5): error MSB3073: The command "dotnet "ClearPluginAssemblies.dll" "OutputPath= ... and the message is very large.

discussion / investigation

Most helpful comment

I have encountered this problem. At the moment due to not supporting .Net Core 3.0 SDK, the solution is to specify the SDK version so that VS will select it instead of default to the highest SDK version so you can still use 3.0 sdk for other things. In order to do that, you need to create the global.json file and put the sdk version that is installed on your computer and lower than 3.0. You can also use the command dotnet new globaljson --sdk-version 2.2.402 where version is the one you want to choose for building the project.

Note: To clarify on the location which the global.json file needs to be under, you can manually create it and put it under src folder. However, if you want to use the command, just run it under the src folder as well and the command will create the proper global.json with the correct sdk version.

All 13 comments

This happens for me as well when I install Visual Studio 2019 version 16.3.0 which includes .net core 3.0 or if I install .net core 3.0 sdk.

I have encountered this problem. At the moment due to not supporting .Net Core 3.0 SDK, the solution is to specify the SDK version so that VS will select it instead of default to the highest SDK version so you can still use 3.0 sdk for other things. In order to do that, you need to create the global.json file and put the sdk version that is installed on your computer and lower than 3.0. You can also use the command dotnet new globaljson --sdk-version 2.2.402 where version is the one you want to choose for building the project.

Note: To clarify on the location which the global.json file needs to be under, you can manually create it and put it under src folder. However, if you want to use the command, just run it under the src folder as well and the command will create the proper global.json with the correct sdk version.

This worked for me. Awesome!

Kevin

On Mon, Oct 14, 2019 at 11:04 AM nguyenhthai notifications@github.com
wrote:

I have encountered this problem. At the moment due to not supporting .Net
Core 3.0 SDK, the solution is to specify the SDK version so that VS will
select it instead of default to the highest SDK version so you can still
use 3.0 sdk for other things. In order to do that, you need to create the
global.json file and put the sdk version that is installed on your computer
and lower than 3.0. You can also use the command dotnet new globaljson
--sdk-version 2.2.402 where version is the one you want to choose for
building the project. The json file can be place at the top level root
project under src folder.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/nopSolutions/nopCommerce/issues/4116?email_source=notifications&email_token=AAMLOPNVWU62ALX5WZPJSGDQOSDAPA5CNFSM4JANRTHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBFDFGI#issuecomment-541733529,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAMLOPPVD7GPUL27ZAY45GLQOSDAPANCNFSM4JANRTHA
.

I have encountered this problem. At the moment due to not supporting .Net Core 3.0 SDK, the solution is to specify the SDK version so that VS will select it instead of default to the highest SDK version so you can still use 3.0 sdk for other things. In order to do that, you need to create the global.json file and put the sdk version that is installed on your computer and lower than 3.0. You can also use the command dotnet new globaljson --sdk-version 2.2.402 where version is the one you want to choose for building the project.

Note: To clarify on the location which the global.json file needs to be under, you can manually create it and put it under src folder. However, if you want to use the command, just run it under the src folder as well and the command will create the proper global.json with the correct sdk version.

What's the eqivalent of the src folder in nopCommerce 4.00?

What's the eqivalent of the src folder in nopCommerce 4.00?

There should be only one src folder in the project. Basically you can place the global.json or run the command under the same folder that contains the solution (.sln) file.

We get the same error in our nightly builds on devOps since 11.11.2019. Our custom plugins fail except for a few. The default nop instance with default nop plugins builds without the error.

@vincpa have you found a solution, since you closed the issue?

@tommyangelo - You should read the comments.

Yes, the solution is dotnet new globaljson --sdk-version 2.2.402

A solution that fixes that problem, however, newer build problems arise. I think the best solution is to completely remove VS2019 and replace with VS2017. That last VS update and NOTHING builds correctly - and/or it builds fine sometimes (about every 5th or 6th build with zero changes to code)! VS2019 is a joke.

Downgrading is not a good long term solution.

Thanks to @nguyenhthai for the global.json solution. It saved my day.

The NopCommerce Dev Team should include a global.json in the source tree. We all have many dotnet Core versions installed and the global.json seems to be th solution in those situations.

Hi @tbebekis-ax. I am very sorry, but we can’t attach the global.json file to the project since it will have to specify a very low version of .Net Core SDK(2.2.110) for compatibility with VS 2017

I am having this problem compiling the solution using dotnet build on MacOS. #5012

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tigran-avdalyan picture tigran-avdalyan  Â·  5Comments

AndreiMaz picture AndreiMaz  Â·  3Comments

mrnams picture mrnams  Â·  3Comments

mariannk picture mariannk  Â·  5Comments

mmccann-umph picture mmccann-umph  Â·  3Comments