My Resource Dictionary in WPF:
<Window.Resources>
<ResourceDictionary x:Name="ResDic">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary x:Name="dictionary" Source="pack://application:,,,/ProductSelect;component/Loc/ProductSelect.en-US.xaml" ></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
This Program works when I start with Visual Studio and as Exe from my folder. But when I start this exe as activex exe from Teststand I am getting an error in InitializeComponent(). I found that this error is caused by the source in line 4 (code above). Exception:
System.IO.IOException: Cannot locate resource 'loc/productselect.en-us.xaml'
The problem here is, when I start the exe from Teststand it takes another path as working directory for the search after loc/productselect.en-us.xaml but it should take the path from the exe. When I use an absolute path here it works but I don't want an absolute path.
FusionLog Output: The Teststand path is of course wrong, i want the path from the exe:
LOG: Attempting download of new URL file:///C:/Program Files (x86)/National Instruments/TestStand 2013/BIN/ProductSelect.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/National Instruments/TestStand 2013/BIN/ProductSelect/ProductSelect.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/National Instruments/TestStand 2013/BIN/ProductSelect.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/National Instruments/TestStand 2013/BIN/ProductSelect/ProductSelect.EXE.
Any ideas?
My Project structure
