Blazored/Localisation

JS not published to expected location

netclectic opened this issue · 6 comments

When I publish my CSB app, just using the VS publish wizard on my project and publishing to a folder, the 'Blazored.Localisation' folder ends up under 'bin\Release\netstandard2.0\publish\wwwroot\_content' which seems kind of logical based on the publish profile but I was expecting it to end up in 'bin\Release\netstandard2.0\publish<app-name>\dist\_content' along with everything else that I can just copy to my hosting location.

The other library js files that I'm using end up under the dist folder, so I was wondering why this library was different, resulting in me having to remember to copy the files separately.

My publish profile looks like this:

<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121. 
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <WebPublishMethod>FileSystem</WebPublishMethod>
    <PublishProvider>FileSystem</PublishProvider>
    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
    <LastUsedPlatform>Any CPU</LastUsedPlatform>
    <SiteUrlToLaunchAfterPublish />
    <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
    <ExcludeApp_Data>False</ExcludeApp_Data>
    <ProjectGuid>da48448a-b9da-483f-81c1-81c882f5f773</ProjectGuid>
    <publishUrl>bin\Release\netstandard2.0\publish\</publishUrl>
    <DeleteExistingFiles>True</DeleteExistingFiles>
    <TargetFramework>netstandard2.0</TargetFramework>
  </PropertyGroup>
</Project>

Hi @netclectic, unfortunately, this is a bug in Blazor and the new Razor Component Library (dotnet/aspnetcore#13103). It's been fixed and will be part of Preview 9.

Apologies for the inconvenience in the meantime.

Cool, thanks for the heads up.

No worries.

@netclectic I've just updated the package to preview 9. Unfortunately, the issue hasn't been fixed yet but I've added a workaround in which should fix it. You won't need to manually add the link to the JS file now it will be done automatically again.

If you get a chance could you let me know if things are working for you?

Cool, I'll be updating over the weekend. Will report back. Thanks!

Updated and all is working as expected now.

Cheers!