error creating the route with name 'Nop.Plugin.Myplugin.Configure' and template 'Plugins/MyPluginl/Configure'

1 2 >
Posted: December 07, 2017 at 9:34 AM Quote #197428
Hi,

I am experiencing problems in creating a simple Configure View.

Those are my components I added:

public class MyPlugin : BasePlugin, IMiscPlugin
    {       public override string GetConfigurationPageUrl()
        {

            return _webHelper.GetStoreLocation() + "Admin/ABCMyPlugin/Configure";
        }

######################################

public class ConfigurationModel : BaseNopModel
    {
//empty right now
}

#########################################

@model Nop.Plugin.ABC.MyPlugin.Models.ConfigurationModel
@inject Nop.Core.IWebHelper webHelper
@{
    Layout = "_ConfigurePlugin";
}
<form asp-controller="WidgetsGoogleAnalytics" asp-action="Configure" method="post">
    <div class="panel-group">
        <div class="panel panel-default">
            <div class="panel-body">
                <h1> Mail Absender </h1>
            </div>
        </div>
    </div>
</form>



#########################################

Views/
---_ViewImports.cshtml
---Configure.cshtml


############

What am I missing???

Also I realized that despite my settings a subfolder net461 is created in
nop.web/plugins/abc.myPlugin/net461
and assemblies and files of the plugin are placed beneath.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: December 07, 2017 at 10:03 AM Quote #197430
apfelsine wrote:

Also I realized that despite my settings a subfolder net461 is created in
nop.web/plugins/abc.myPlugin/net461
and assemblies and files of the plugin are placed beneath.


You can remove net461 from out path at plugin library project property
This post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Up-vote the answer, if it helps you! :)


Thank You
Raju Paladiya
-------------------------------------------------------
Project Leader and senior NopCommerce Developer
nopAccelerate - Faster, Reliable & Scalable nopCommerce

http://www.nopAccelerate.com | http://www.xcellence-it.com
Posted: December 11, 2017 at 7:30 AM Quote #197597
I DID remove it, but it is applied automatically by Visual Studio! Even if I remove it, the minute I save it gets reentered again.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: December 11, 2017 at 7:50 AM Quote #197602
apfelsine wrote:
I DID remove it, but it is applied automatically by Visual Studio! Even if I remove it, the minute I save it gets reentered again.


That would be due the Copy Local setting of the reference property.
This post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
If this post helped please vote UP so others can benefit.

"The man who asks a question is a fool for a minute, the man who does not ask is a fool for life." -- Confucius
Posted: December 17, 2017 at 1:50 PM Quote #197917
seanrock wrote:
I DID remove it, but it is applied automatically by Visual Studio! Even if I remove it, the minute I save it gets reentered again.

That would be due the Copy Local setting of the reference property.


Hi dear.
I don't understand.What's your purpose?
please describe more.
Thanks.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: December 18, 2017 at 2:59 AM Quote #197940
You need to set OutDir in your plugin.csproj file

Open plugin.csproj file and update Debug|AnyCPU' adn Release|AnyCPU' section.

There should be tag
<OutDir>$(OutputPath)</OutDir>
available.


Like

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <OutputPath>..\Presentation\Nop.Web\Plugins\plugin.Folder.Name\</OutputPath>
  <OutDir>$(OutputPath)</OutDir>
  </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">  
  <OutputPath>..\Presentation\Nop.Web\Plugins\plugin.Folder.Name\</OutputPath>  
   <OutDir>$(OutputPath)</OutDir>
  </PropertyGroup>
This post/answer is useful
2
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Up-vote the answer, if it helps you! :)


Thank You
Raju Paladiya
-------------------------------------------------------
Project Leader and senior NopCommerce Developer
nopAccelerate - Faster, Reliable & Scalable nopCommerce

http://www.nopAccelerate.com | http://www.xcellence-it.com
Posted: December 18, 2017 at 3:00 AM Quote #197941
And also remove net461 from out path at plugin library project property
This post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Up-vote the answer, if it helps you! :)


Thank You
Raju Paladiya
-------------------------------------------------------
Project Leader and senior NopCommerce Developer
nopAccelerate - Faster, Reliable & Scalable nopCommerce

http://www.nopAccelerate.com | http://www.xcellence-it.com
Posted: December 18, 2017 at 3:44 AM Quote #197946
rajupaladiya wrote:
You need to set OutDir in your plugin.csproj file

Open plugin.csproj file and update Debug|AnyCPU' adn Release|AnyCPU' section.

There should be tag
<OutDir>$(OutputPath)</OutDir>
available.


Like

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <OutputPath>..\Presentation\Nop.Web\Plugins\plugin.Folder.Name\</OutputPath>
  <OutDir>$(OutputPath)</OutDir>
  </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">  
  <OutputPath>..\Presentation\Nop.Web\Plugins\plugin.Folder.Name\</OutputPath>  
   <OutDir>$(OutputPath)</OutDir>
  </PropertyGroup>


Thanks for your reply.
I do all these things. But can not worked.

my code in project.csproj:

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

  <PropertyGroup>
    <TargetFramework>net461</TargetFramework>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
    <OutputPath>..\..\Presentation\Nop.Web\Plugins\Misc.Sample\</OutputPath>
    <OutDir>$(OutputPath)</OutDir>
    <!--<DefineConstants>DEBUG;TRACE;NET461;RELEASE;NET461</DefineConstants>-->
    <!--<Optimize>true</Optimize>-->
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <!--<DefineConstants>TRACE;DEBUG;NET461;</DefineConstants>-->
    <!--<Optimize>true</Optimize>-->
    <OutputPath>..\..\Presentation\Nop.Web\Plugins\Misc.Sample\</OutputPath>
  </PropertyGroup>

<Target Name="NopTarget" AfterTargets="Build">
  <MSBuild Projects="$(MSBuildProjectDirectory)\..\..\Build\ClearPluginAssemblies.proj" Properties="PluginPath=$(MSBuildProjectDirectory)\$(OutDir)" Targets="NopClear" />
</Target>

<ItemGroup>
  <None Remove="logo.jpg" />
</ItemGroup>

  <ItemGroup>
  <Content Include="logo.jpg">
    <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
  </Content>
  <Content Include="plugin.json">
    <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
  </Content>
  <Content Include="Views\CustomHomeAdmin\CustomIndex.cshtml">
    <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
    <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
  </Content>
  <Content Include="Views\_ViewImports.cshtml">
    <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
  </Content>
</ItemGroup>

<ItemGroup>
  <ProjectReference Include="..\..\Libraries\Nop.Core\Nop.Core.csproj" />
  <ProjectReference Include="..\..\Libraries\Nop.Services\Nop.Services.csproj" />
  <ProjectReference Include="..\..\Presentation\Nop.Web.Framework\Nop.Web.Framework.csproj" />
  <ProjectReference Include="..\..\Presentation\Nop.Web\Nop.Web.csproj" />
</ItemGroup>

<ItemGroup>
  <Folder Include="Factories\" />
</ItemGroup>

<ItemGroup>
  <Reference Include="MD.PersianDateTime">
    <HintPath>bin\Debug\MD.PersianDateTime.dll</HintPath>
    <Private>true</Private>
  </Reference>
  <Reference Include="Persia">
    <HintPath>bin\Debug\Persia.dll</HintPath>
    <Private>true</Private>
  </Reference>
  <Reference Include="PersianDate">
    <HintPath>bin\Debug\PersianDate.dll</HintPath>
    <Private>true</Private>
  </Reference>
</ItemGroup>
</Project>



Thanks
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: December 18, 2017 at 4:32 AM Quote #197953
EDIT: well I know now that I lack 1 line maybe that does the trick.
This post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: December 18, 2017 at 6:12 AM Quote #197965
apfelsine wrote:
EDIT: well I know now that I lack 1 line maybe that does the trick.



I did not notice.
Please explain more?
This post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
1 2 >
Premium support services
  • Dedicated premium support services provided by core developers are intended for persons who run mission critical websites, work on projects with tight deadlines, or want to get dedicated support.
Professional services
  • Want to open a new store? Want to take your store to the next level? Need a custom extension? We can customize nopCommerce to fit your store perfectly. Request a quote to get started.
eCommerce CONFERENCE 2018
Learn more