logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
sweeperqb  
#1 Posted : Wednesday, May 18, 2022 10:20:59 AM(UTC)
sweeperqb

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 5/30/2020(UTC)
Posts: 125

Thanks: 14 times
Was thanked: 3 time(s) in 3 post(s)
For the life of me, I cannot get Razor view Intellisense to work properly in VS 2019 or VS 2022 when attempting to develop a Library plug-in for AbleCommerce. I pulled down the AC9-Samples from Github. There were a bunch of initial errors due to referencing an older version of CommerceBuilder. After updating the CommerceBuilder references for 9.0.6 and MVC references to 5.2.7, it built fine and created the .zip file, but Intellisense had the same issue I encountered before.

Intellisense error

I spent a full day trying different suggestions on how to fix the error: repairing VS, updating app.config, renaming app.config to web.config, updating web.config in the Views folder, starting over from a blank MVC project. If there is a suggestion to be found on Google, I tried it.

So I am left to wonder, what are the official AbleCommerce developers using for their development environment? Do you get these same errors and just ignore them?

I'm considering using VS 2022 to set up the project, then flipping over to VS Code to edit the views because the errors don't show up there.

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

sweeperqb  
#2 Posted : Wednesday, May 18, 2022 10:32:58 AM(UTC)
sweeperqb

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 5/30/2020(UTC)
Posts: 125

Thanks: 14 times
Was thanked: 3 time(s) in 3 post(s)
I just found out that in a fresh MVC project through VS 2019, things work just fine until I reference CommerceBuilder.dll.
sweeperqb  
#3 Posted : Wednesday, May 18, 2022 1:15:55 PM(UTC)
sweeperqb

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 5/30/2020(UTC)
Posts: 125

Thanks: 14 times
Was thanked: 3 time(s) in 3 post(s)
After 2 days I finally Intellisense to work for plug-ins. My steps...

  1. Create a new MVC Web Application (.Net Framework) project in Visual Studio 2019 (Had to use 2019 b/c 2022 doesn't have this project option)
  2. Remove everything but Web.config, packages.config, and Views/Web.config
  3. Add references to CommerceBuilder.dll and CommerceBuilder.Web.dll (<= Breaks intellisense)
  4. Add the following code to the main Web.config file within <system.web><compilation> (<= Fixes intellisense)


Code:
<assemblies>
    <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>

Edited by user Wednesday, May 18, 2022 1:27:00 PM(UTC)  | Reason: Not specified

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.