This is a migrated thread and some comments may be shown as answers.

Suppress auto-copying of language resource extensions

11 Answers 1618 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Carl
Top achievements
Rank 1
Carl asked on 25 Mar 2014, 08:59 PM
How to configure the ASP.Net C# Razor project with UI for ASP.Net MVC in order to suppress and prevent the apparent automatic copying of all the different language resource extensions into the bin directory of the project???

If all I want to use is the default culture/language "en-US", why is it necessary for all the other culture/languages to be copied into the bin directory?

So how to turn off that automatic copying in Kendo.Mvc?
Eric Gibson
Top achievements
Rank 1
commented on 22 Jul 2021, 12:50 PM

The following works for me if you have the correct version of MSBuild:
<PropertyGroup>
<SatelliteResourceLanguages>en-US</SatelliteResourceLanguages>
</PropertyGroup>

11 Answers, 1 is accepted

Sort by
0
Momchil
Telerik team
answered on 27 Mar 2014, 08:46 AM
Hello Carl,

Copying localization resources to the output folder is a standard behavior for assemblies which support localization. When you create a Telerik UI for ASP.NET MVC VIsual Studio project there is by default four references to assemblies which support localization and copy such folders and these are:
  1. Kendo.Mvc
  2. Microsoft.Data.OData
  3. Microsoft.Data.Edm
  4. System.Spatial

(The last three assemblies are part of Microsoft ASP.NET Web API OData package)
If you really don't want these localization folders copied you can follow these steps to delete the localization resources folders for each referenced assembly:

  1. Get the path to the assembly by looking in the properties of the reference to this assembly in your project.
  2. Navigate to this path. You will see the assembly and many folders containing localization resources for each language.
  3. Delete these localization resources folders.
When you do these steps for each of the four referenced assemblies there will be no more copying of the localization resources in the bin folder but your application will not support localization anymore.

I hope this will help you.

Regards,
Momchil
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
NoobMaster
Top achievements
Rank 2
Iron
commented on 01 Apr 2023, 10:14 AM

when I delete those folder it will give me error while publishing ( Error: Could not copy file [localiztion files] )
0
Carl
Top achievements
Rank 1
answered on 27 Mar 2014, 01:36 PM
Thank you for instructions.  However, we should have control over this kind of thing without "jumping through hoops".

The desired behavior is in fact "not supporting localization" and "no more copying of the localization resources to the bin folder".

There should be a simple flag - boolean switch - to turn on or off copying of localization resources to the bin folder.

Then we can use localization resources when we do or do not want in an easy manner controlled by a simple switch.
0
Momchil
Telerik team
answered on 28 Mar 2014, 01:42 PM
Hi Carl,

I understand your point and I agree that such an option could be useful but this is the current behavior of the Visual Studio with localized assemblies.

Regards,
Momchil
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
0
Carl
Top achievements
Rank 1
answered on 04 Aug 2020, 03:59 AM

Has there been an update on this matter of suppressing auto-copy of language resources?

Any simple switch or property setting to turn it on or off?

0
Nikola
Telerik team
answered on 05 Aug 2020, 11:40 AM

Hi Carl,

We have not implemented any feature that would allow clients to choose whether to include language resources in the output folder. As this is controlled by MSBuild the following custom target could be included in the application's .csproj file as a workaround so that resources are removed:

 

  <Target Name="RemoveSatelliteAssemblies" AfterTargets="ResolveAssemblyReferences">
    <ItemGroup>
        <ReferenceCopyLocalPaths Remove="@(ReferenceSatellitePaths)" />
    </ItemGroup>
  </Target>

 

Have in mind that ReferenceSatellitePaths is an item group output from the ResolveAssemblyReferences target and may include more than the language resources. Please use the above-stated custom target with extreme caution and create a backup for your project.

In the meantime, I have logged an item in our backlog about the option to choose to suppress the language resources or not. It would be prioritized and implemented based on your feedback and such from other users. Therefore I ask for your patience.

If you have any other questions, please get back to us.

Regards,
Nikola
Progress Telerik

0
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
answered on 11 Nov 2020, 02:48 PM
It would be usefull to move the Assemblies in a sub-folder - and not to have it in the root...
0
Nikola
Telerik team
answered on 13 Nov 2020, 09:17 AM

Hello Robert,

I was unable to understand which assemblies you were referring to. Would you perhaps elaborate more on any suggestions you may have on improving the feature? 

I am looking forward to your reply.

Regards,
Nikola
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
answered on 13 Nov 2020, 09:25 AM
I mean all the folder for the assemblies which support localization (see attached picture)
0
Nikola
Telerik team
answered on 17 Nov 2020, 08:37 AM

Hello Robert,

Thank you for the clarification and the suggestion. I have logged an item in our backlog for this change. We will discuss it with the team developing UI for ASP.NET MVC product and plan the improvement for one of the future releases.

In case you have any further suggestions or questions do not hesitate to get back to us.

Regards,
Nikola
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Carl
Top achievements
Rank 1
answered on 17 Nov 2020, 11:53 AM
I am still hoping for a simple switch that will enable inclusion versus exclusion of the language resources, both in the UI for ASP.NET MVC and in the UI for ASP.NET Core.
0
Nikola
Telerik team
answered on 19 Nov 2020, 11:10 AM

Hello Carl,

We will discuss with the team developing UI for ASP.NET Core/MVC whether there are any other clients enquiring about this feature. Based on that we could increase the priority of this item. For the time being it is still in the backlog, because there is no free capacity in the planned releases.

In case you have any other questions please get back to us.

Regards,
Nikola
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Carl
Top achievements
Rank 1
commented on 04 Aug 2022, 10:59 PM

So it's now been 8 years since my initial inquiry....

Any news on this issue with an update on when we might expect this simple feature?

Yanislav
Telerik team
commented on 08 Aug 2022, 11:56 AM

Hello, Carl

We have this functionality in our pipeline. It is included in the planning for R1 2023 and we will research the options for including only the required files in the generated templates.

NoobMaster
Top achievements
Rank 2
Iron
commented on 01 Apr 2023, 10:09 AM

So now there is R1 2023.

how can i prevent Localization folders to be copied to publish folder ?

im using Telerik.UI.for.AspNet.Core 2023.1.314

Thanx

Nikola
Telerik team
commented on 04 Apr 2023, 01:08 PM

Hello,

We have added the option to choose whether to enable Localization when creating a new project through the New Project Wizard in Telerik UI for ASP.NET Core VS Extension. 

We have planned the implementation of a feature to choose which localization files to include in the project, but this was pushed to R3 2023, so it is expected at the end of the year. 

If you refer to something else, please get back to us for further assistance.

Tags
General Discussions
Asked by
Carl
Top achievements
Rank 1
Answers by
Momchil
Telerik team
Carl
Top achievements
Rank 1
Nikola
Telerik team
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Share this question
or