I've written a small utility program that "works on my machine" (Win7 64 w/VS2012).
When I copy the exe, support dll and .exe.config files to another Win7 64 (Office 2012) system (attempted on both physical and VM systems) it fails to execute with a dialog showing info (below).
Bing searches seem to imply that my most likely cause is incorrect .NET version installed w.r.t. build target. .NET 4.0 is installed and the build target is .NET 4 Client.
Does the fact that the build environment has .NET 4.5 installed mean that targeting .NET 4 Client really will end up requiring 4.5? If so, is there a way to build to really target .NET 4?
Any other hints/suggestions?
Thanks
More info:
I tried installing .NET 4.5.1 on the VM and it made no apparent difference.
EDIT #2:
Still more info:
I copied the FUSLOGVW (Assembly Binding Log Viewer) containing-folder from the VS install on the build system over to the VM, and executed it. Logging the bindings shows a binding failure for the
applicationName.resources, Version=1.0.0.0
The resources
should be built into the exe, there is no separate resources assembly in the project\bin\Release folder.
So what am I missing?
EDIT #3:
I'm beginning to suspect it has to do with the Culture:
The application shows (in the Assembly Binding Log) as Culture=neutral
but it is looking for resources as Culture=en-US
In the AssemblyInfo.cs and Project settings I
do not specify any culture. Just like other programs I've written... And it works on the development system just launching the exe directly.
I
tried setting the NeutralResourcesLanguage attribute and <UICulture> in the .csproj file. This caused the resources to be built into a satellite assembly under a en-US folder, however, that then caused an exception to be thrown
on the development system when the MainWindow.xaml.cs was initializing.
Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: XXXX YYYY ZZZZ.exe
Problem Signature 02: 1.0.0.0
Problem Signature 03: 532ce19e
Problem Signature 04: PresentationFramework
Problem Signature 05: 4.0.0.0
Problem Signature 06: 4ba1f8db
Problem Signature 07: f99
Problem Signature 08: cc
Problem Signature 09: System.InvalidOperationException
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: 6404
Additional Information 2: 640404062cbb864fc4242ad6a13f7c84
Additional Information 3: 1237
Additional Information 4: 1237d14f88a4e19132828c7daa02ae3b