Skip to content

Commit

Permalink
Revert "fix #1206 Mvc template & BookStore virtual file enhancement. "
Browse files Browse the repository at this point in the history
This reverts commit b707f2e.
  • Loading branch information
maliming committed Jun 7, 2019
1 parent 475a0ac commit 5208062
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 30 deletions.
Expand Up @@ -19,15 +19,6 @@
<None Remove="Logs\**" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Pages\**\*.*" Exclude="*.cs" />
<EmbeddedResource Include="wwwroot\**\*.*" />
<Content Remove="Pages\**\*.cshtml" />
<Content Remove="Pages\**\*.css" />
<Content Remove="Pages\**\*.js" />
<Content Remove="wwwroot\**\*.*" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
Expand Down
10 changes: 4 additions & 6 deletions samples/BookStore/src/Acme.BookStore.Web/BookStoreWebModule.cs
Expand Up @@ -105,19 +105,17 @@ private void ConfigureAutoMapper()

private void ConfigureVirtualFileSystem(IHostingEnvironment hostingEnvironment)
{
Configure<VirtualFileSystemOptions>(options =>
if (hostingEnvironment.IsDevelopment())
{
options.FileSets.AddEmbedded<BookStoreWebModule>("Acme.BookStore.Web");
if (hostingEnvironment.IsDevelopment())
Configure<VirtualFileSystemOptions>(options =>
{
options.FileSets.ReplaceEmbeddedByPhysical<BookStoreDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}Acme.BookStore.Domain.Shared", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<BookStoreDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}Acme.BookStore.Domain", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<BookStoreApplicationContractsModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}Acme.BookStore.Application.Contracts", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<BookStoreApplicationModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}Acme.BookStore.Application", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<BookStoreWebModule>(hostingEnvironment.ContentRootPath);
}
});
});
}
}

private void ConfigureLocalizationServices()
Expand Down
Expand Up @@ -20,15 +20,6 @@
<None Remove="Logs\**" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Pages\**\*.*" Exclude="*.cs" />
<EmbeddedResource Include="wwwroot\**\*.*" />
<Content Remove="Pages\**\*.cshtml" />
<Content Remove="Pages\**\*.css" />
<Content Remove="Pages\**\*.js" />
<Content Remove="wwwroot\**\*.*" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
Expand Down
Expand Up @@ -109,11 +109,9 @@ private void ConfigureAutoMapper()

private void ConfigureVirtualFileSystem(IHostingEnvironment hostingEnvironment)
{
Configure<VirtualFileSystemOptions>(options =>
if (hostingEnvironment.IsDevelopment())
{
options.FileSets.AddEmbedded<MyProjectNameWebModule>("MyCompanyName.MyProjectName.Web");
if (hostingEnvironment.IsDevelopment())
Configure<VirtualFileSystemOptions>(options =>
{
options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}MyCompanyName.MyProjectName.Domain.Shared", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}MyCompanyName.MyProjectName.Domain", Path.DirectorySeparatorChar)));
Expand All @@ -130,8 +128,8 @@ private void ConfigureVirtualFileSystem(IHostingEnvironment hostingEnvironment)
options.FileSets.ReplaceEmbeddedByPhysical<AbpIdentityWebModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}modules{0}identity{0}src{0}Volo.Abp.Identity.Web", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<AbpAccountWebModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}modules{0}account{0}src{0}Volo.Abp.Account.Web", Path.DirectorySeparatorChar)));
//</TEMPLATE-REMOVE>
}
});
});
}
}

private void ConfigureLocalizationServices()
Expand Down

0 comments on commit 5208062

Please sign in to comment.