Skip to content

Commit

Permalink
fix error in sample module
Browse files Browse the repository at this point in the history
  • Loading branch information
mvperez committed Nov 9, 2018
1 parent 7aaf109 commit 65bb24f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
8 changes: 8 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ To initialize a company, call the api endpoint directly http://localhost:8001/ap
1. If typescript is installed globally, run `tsc` (This will run the tsconfig.json). Else run `npm run tsc`
1. If webpack and webpack-cli are installed globally, run `webpack` (This will run the webpack.config.js). Else, run `npm run webpack`
1. And lastly, in `src/AccountGoWeb` terminal, execute `dotnet build`

`Note:` If you encounter this error below, then run `dotnet restore` on `SampleModule` project.

`/usr/local/share/dotnet/sdk/2.1.401/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(198,5): error` `NETSDK1004: Assets file '/Users/Marvs/source/accountgo/.build/obj/SampleModule/project.assets.json' not found. Run a NuGet package restore to generate this file.`
`[/Users/Marvs/source/accountgo/src/Modules/SampleModule/SampleModule.csproj]`
` 6 Warning(s)`
` 1 Error(s)`

1. Run the **AccoungGoWeb** project, execute `dotnet run`. If `launchsettings.json` ommitted, thus, the following points are important.
* To run in development mode, execute `dotnet run --environment Development`
* To change it to specific port, execute `dotnet run --environment Development server.urls=http://+:8000`. It could be any port as you like. By default, port is open to 5000 and 5001 (http and https respectively).
Expand Down
4 changes: 2 additions & 2 deletions src/AccountGoWeb/AccountGoWeb.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
</ItemGroup>

<Target Name="NpmCommands" AfterTargets="Build">
<!-- <Exec Command="npm run gulp" />
<Exec Command="npm run webpack" /> -->
<Exec Command="npm run gulp" />
<Exec Command="npm run webpack" />
</Target>

<Target Name="BuildModules" AfterTargets="Build">
Expand Down
2 changes: 1 addition & 1 deletion src/Infrastructure/AssemblyLoader/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public static class Constants
{
public static string CodeBaseRootPath;
public static string ModuleManifestFile => "module.json";
public static string ModulesFolder => Path.Combine(Constants.CodeBaseRootPath, "Modules");
public static string ModulesFolder => Path.Combine(Constants.CodeBaseRootPath, "modules");
public static string HostModulesManifestFile => Path.Combine(Constants.CodeBaseRootPath, ModulesJsonFile);
public static string ModulesJsonFile => "modules.json";
public static string PluginsJsonFile => "plugins.json";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace SampleModule.Controllers
{
[Microsoft.AspNetCore.Authorization.Authorize]
public class SampleModuleController : Controller
{
public IActionResult Index() => View();
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/SampleModule/SampleModule.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.0" Publish="false" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.3" Publish="false" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.2" PrivateAssets="All" Publish="false" />
</ItemGroup>

Expand Down

0 comments on commit 65bb24f

Please sign in to comment.