Portable Library referenced by Windows Store App: MSB3815: Satellite assembly was built improperly - embedded-resource

I uses VS2012 Prof (Update 3 RC-2).
I have a Portable Libray (Windows Store Apps + .Net Framework 4.5 + Windows Phone 8)
that has some string Resource files in it.
The files are named "XYZ.resx" for the default language and "XYZ.DE.resx" for german.
The Properties for the resource files are set as this:
Build Action: "Embedded Resource"
Copy To Output Directory: "Do not copy"
Custom Tool: "PublicResXFileCodeGenerator"
Custom Tool Namespace: "empty"
File Name: "XYZ.DE.resx"
Full Path: ""
If I build the Portable Library alone, I get no errors.
If I reference it from my Windows Store app I get some build error messages:
MSB3815: Satellite assembly "D:\sources\Clients\Infrastructure.Services\bin\Debug\DE\Infrastructure.Services.resources.dll" was built improperly. The manifest resource "Infrastructure.Services.Localization.CarbonDioxideStateRes.DE.resources" will not be found by the ResourceManager. It must end in ".de.resources".
So the Windows Store App doesn't like the way the Protable Library builds the resources.
What do I need to do here?

This is a bug and will be fixed in a future version of Visual Studio. You can use Daniel's workaround (lower-casing the "DE") until you have the fix.

It looks like it may not like the capitalization of the resources file. Can you try renaming it to end in ".de.resources" instead of ".DE.resources"?

Related

EvoPdf and Deployment Mode : Self-contained = Runtime Error

We're using EvoPDF in an NET6 C# MVC application to convert HTML to PDF files for display and emailing as attachments.
Using EvoPdf.HtmlToPdf.NetCore in our development environment works fine.
If we publish from Visual Studio using Deployment Mode = Framework-dependent then EvoPdf works ok.
If we publish from Visual Studio using Deployment Mode = Self-contained and run EvoPdf we get an error
Could not create image object. Could not load type 'System.StubHelpers.InterfaceMarshaler' from assembly 'System.Private.Corelib, Version=6.0.0.0, Culture=neutral, ....
As we'd rather have a self-contained install on our Live servers this is a major pain !
Any suggestions gratefully received.
I have same issue, you can try uncheck Trim unused code option in publish setting.
you can use dnspy load this dll & search InterfaceMarshaler check whether it exists in published dll, maybe it exists in debug folder but not exists in publish folder.
System.Private.CoreLib.dll take 10.4MB size in dotnet 7.0 shared directory.
You can simply copy dll from shared directory to publish directory.

Upgrade kentico from 9 to 10

When i trying update kentico to 10 version i have a some problem:
"the selected folder is missing a vital kentico component"
but I'm sure I chose the right folder. Who mean why?
It looks as if you are attempting to use the Kentico Hotfix Utility to upgrade from v9.0.50 to hotfix v10.0.41, which is not supported by Kentico. You cannot use the Kentico Hotfix Utility to upgrade Kentico from one major version to another. You need to:
First upgrade the project from 9.0.X => 10.0 - upgrade documentation available at https://docs.kentico.com/k10/installation/upgrading-to-kentico-10
Then you will need to run the project.
Then you can apply the latest hotfix utility - available at https://devnet.kentico.com/download/hotfixes
Then run the project again.
I appreciate you had a missing lib folder, but even if this were present, you still can't perform a major version upgrade using the hotfix utility.
I think in your case, you only have the CMS folder from deployment. But the upgrade needs the Lib folder which was not needed for deployment.
What you can do is to find the Lib folder from another instance or just install V9 of CMS, and you can find the missing Lib folder in C:\Program Files (x86)\Kentico\9.0\Webinstaller\Web
Few things can cause this:
Customized core files
Missing dll's
Changes in the web.config which cause Kentico references to be broken
and some other issues, but these are the most common we see.
Have you tried to open the project within Visual Studio and build the project? Secondly, are you selecting the directory with the CMS and Lib directory in it?
Does your project has the default structure or is it loke it was installed to the root of the web site? Default structure is some folder and underneath are the CMS, Lib and also the .sln file and few others. Looks like you have just the content of the CMS folder. In this case you either need the original project or upgrade the manual way.
You may also run CodeUpgrade tool from Kentico
Basic detection
Run CodeUpgrade.exe from the command line, with the path to your project’s solution file as the parameter (WebSite.sln or WebApp.sln).
For example:
CodeUpgrade.exe C:\inetpub\wwwroot\Kentico9\WebSite.sln
The tool generates a csv file containing a list of custom code occurrences in your project that are no longer valid in Kentico 10. The information will help you update your custom code after you perform the upgrade.
Source - Kentico documentation The documentation has all the commands to run and detect the incompatible code. This might help you.
Kentico 9 to 10 Upgrade tool - http://download.kentico.com/CMSUpgrades/Upgrade/Upgrade_9_0_10_0.exe
Basic steps to ensure before you perform upgrade - https://docs.kentico.com/k10/installation/upgrading-to-kentico-10

How do i tell the Dart Editor to use the PATH location of the SDK?

I would like to store my dart-sdk outside of the folder where i keep the editor. For sake of brevity lets say its stored in C:/dart-sdk/bin
C:\Users\John> echo %PATH%
..;..;C:\dart-sdk\bin
C:\Users\John> dart--version
Dart VM version: 1.8.5
C:\Users\John> echo %DART_SDK%
C:\dart-sdk
However, when i open the dart editor, it cannot find the SDK.
Results in "Missing Dart SDK" in the description.
If i moved the SDK back into the dart folder, it works as expected, but seems brittle.
How do i point Dart/Eclipse to the execution path of dart-sdk? Is there a linked resources variable i need to define?
Inside the containing folder create a file called editor.properties (The Dart Editor Bundle already includes this)
ensure the following pair exists:
dart.sdk=/path/to/dart-sdk
Note: Windows environments do not need the drive letter prefix, dart will figure it out - so C:\dart-sdk would by dart.sdk=/dart-sdk
The above path variables for DART_SDK seem relevant to some 3rd party utilities - but AFAIK not the Dart Editor itself. I would love clarification or a list of pertinent configuration variables.

Custom Language Resource file not getting deployed to server

We have an MVC 4 application that has 4 resource files. The default one (Resource.resx), one for Chinese and German (Resource.zn-CH.resx and Resource.de-DE.resx) and then one for a custom language (Resource.en-PI.resx (English-Pirate)) for testing purposes.
Every setting for all of the resource files is exactly the same:
Build Action: Embedded Resource
Copy to Output Directory: Copy Always
Custom Tool: PublicResXFileCodeGenerator
Custom Tool Namespace: Resources
Whenever the application is built locally, in the bin folder we get the folders de-DE, en-PI and zh-CN which all include a dll named (ProjectName).resources.dll.
The problem is whenever this application is deployed to our DEV server the folder for en-PI is ignored and not copied and we have to manually copy that folder over for the en-PI language to work.
We have a build definition that will build the necessary projects to a certain folder and do other things and then copy them over to our DEV server. Everything works perfectly fine for the other 2 languages (de-DE and zh-CN) but the en-PI folder doesn't show up in the bin folder. Is there some setting somewhere that is causing this resource file not to be deployed because it is a custom language?
The way all of these resource files were added followed this example http://odetocode.com/Blogs/scott/archive/2009/07/16/resource-files-and-asp-net-mvc-projects.aspx
Figured it out. Microsoft explains it here under the section Resource Naming Conventions. Because the language is a custom language and has a custom code it doesn't have a name that the common language runtime expects which is why it doesn't get deployed correctly.

How to define Assembly Folders for an application?

How do I define the Assembly folder for an Application correctly?
I tried to use the registry Key:
HKLM/SOFTWARE/Microsoft/.NET Framework/AssemblyFolders/App-Name
and use the (Default) to set this to the path where the assemblies are located.
Some time ago this worked fine, but as I compiled a new Version and deployed it to a PC it wont work any more.
Do I have to add something else or missed any task?
Those registry keys are only used by visual studio for loading the references list and for helping with hint paths. Applications built on .Net use assembly loading rules which check for assemblies in the GAC, the application's private bin path, or some other subfolder under the private bin path. The .Net runtime does not use the registry to resolve assemblies at runtime.
If you are trying to add a reference on a machine that running 64-bit OS, than you need to add your App-Name under following registry key.
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft.NETFramework\AssemblyFolders\App-Name.
It's exactly like in your example, except that you need to add Wow6432Node key between SOFTWARE and Microsoft.