Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading Visual Studio 2019 to 2022 #5981

Closed
Ochapparel opened this issue Dec 3, 2021 · 19 comments
Closed

Upgrading Visual Studio 2019 to 2022 #5981

Ochapparel opened this issue Dec 3, 2021 · 19 comments

Comments

@Ochapparel
Copy link

nopCommerce version:
4.40

Steps to reproduce the problem:
Install Visual Studio 2022 Community
Open Nop Solution
Debug

Get this error:
https://www.nopcommerce.com/en/boards/topic/92619/error-method-clone-in-type-on-start-when-loading-some-plugins

@oyhan
Copy link

oyhan commented Dec 3, 2021

Seems there is a problem with the build operation.

@skoshelev
Copy link
Contributor

I checked to build 4.40.4 on visual studio 2022, everything works without issue. Perhaps the problem is in local settings or temporary files. Try to close the studio and manually delete all bin and obj directories

image

Closed #5981

@AndreiMaz AndreiMaz added this to the Version 4.50 milestone Dec 6, 2021
@oyhan
Copy link

oyhan commented Dec 6, 2021

@skoshelev Hi
BTW it's not a compile error it's a runtime error.
Continue to run the project with some plugins installed.

@skoshelev
Copy link
Contributor

Sorry for misunderstanding, but I may run nopCommerce 4.40.4 from the visual studio 2020 without problem too

image

@oyhan
Copy link

oyhan commented Dec 6, 2021

Unfortunately it's not happening all the time. For me after couple of stop/starting project during the development showed up and I had to switch to vs2019 and rebuild solution and run again.
Can you just rebuild a existing plugin in the project and then again start the web project? because it's just my routine

@skoshelev
Copy link
Contributor

You know, it looks like there really is some kind of problem in visual studio 2022, I once managed to reproduce the problem, but after repeating the same actions, the problem is just gone. Anyway, a complete rebuild of the solution works well, so it looks like there is a problem not with our code.

@oyhan
Copy link

oyhan commented Dec 6, 2021

Absolutely it's not from the code. As I mentioned before there is something wrong with build operation in vs22 and just revealed in the Nop project in some circumstances. And I must add it may be something related to record types.

@Ochapparel
Copy link
Author

I deleted the Bin and the Obj folder. Did a whole rebuild and still same error when "debugging"

image

@skoshelev anyone else on the nop team able to try 2022? Not a big issue to use 2019, it's just a very strange error

@joekrauss
Copy link

NopCommerce works fine with VS2022 however, all assemblies including 3rd party plugins have to be compiled under VS2022 to work properly. If one plugin or assembly is not compiled with VS2022 you will get errors like "not compatible with base type method 'Nop.Web.Framework.Models.BaseNopEntityModel.$()'.". I wish I had more time to investigate the cause, but from what I see the VS2022 compiled version is different in size than when compiled under VS2019.

@eplsoftware
Copy link

will the new version 4.50 now be compiled with Visual Studio 2022 or with version 2019? It should be version 2022 so there is no mess.

@Ochapparel
Copy link
Author

Agreed. And maybe a communication to the 3rd party plugins to compile in 2022

@Ochapparel
Copy link
Author

How is the new bath compiled? 2019?

@eplsoftware
Copy link

Version 4.40 and all plug-ins with Visual Studio 2019 and version 4.50 and all plug-ins with Visual Studio 2022.

@Ochapparel
Copy link
Author

Great. Maybe make that communication make to everyone. Especially 3rd party plugins.

@oyhan
Copy link

oyhan commented Dec 13, 2021

For all people like me still has the problem try to install the latest dotnet 5 sdk
My problem went out.

@yashobanta999
Copy link

hii! Can i upgrade from 2019 to 2022 studio directly from 2019 version or i have to download the 2022 version separately

@glhays
Copy link

glhays commented Jan 28, 2022

Download VS2022 and install it. If your 2019 is a licensed version check your account for upgrade options.
NopCommerce website provides the requirements needed for versions of its software. 4.40 and earlier VS2022 or earlier, 4.50 requires VS2022.

@serkandede
Copy link

Hi, i have same issue with a little bit different environment.
We are running Nop 4.40 in VS Code on mac computer. Everything is perfect without third party libraries.

But when we added third party plugins (Nop-Templates Plugins, we dont have source code to rebuild) :

  • project build succesfully.
  • it is runtime error
  • third party dlls caused the same issue (Nop-Templates's plugin dlls)

@glhays
Copy link

glhays commented Feb 25, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants