PRism.dll with PRism.wpf.dll - wpf

warning C4945: 'IContainerRegistryExtensions':
cannot import symbol from 'd:\repos\bitbucket\runtempl-dataaccess-branch\core\bin\prism.dll':
as 'Prism::Ioc::IContainerRegistryExtensions' has already been imported from another assembly 'Prism.Wpf':
message: first seen type is used; re-order imported assemblies to use the current type
message: This diagnostic occurred while importing type 'Prism.Ioc.IContainerRegistryExtensions' from assembly 'Prism, Version=7.2.0.1422, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59'.
This occurs when a single compilation unit attempts to use both assemblies... The interface is declared in both Prism assemblies (and they are different).

Related

Angular basic tutorial do not work with Windows?

I want to learn Angular so I started with there tutorial here, its really basic but that does not stop me from get ALOT of exception.
I installed latest and stable of every compinent Git, Node and python but when running
npm install
I got some exceptions, I then reinstalled components to a older specific version(no backward compability here). This got my a couple of steps but yet again other exceptions was thrown like this :
C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.t
argets(44,5): error MSB8020: The builds tools for v120 (Platform
Toolset = 'v12 0') cannot be found. To build using the v120 build
tools, either click the Proj ect menu or right-click the solution, and
then select "Update VC++ Projects..."
Why would it need MSBuild? Anyway, I changed the config like this
npm config set msvs_version 2012
And now I get even more exceptions!?, like these :
C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
bufferutil.cc
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(336): error C2988: unrecognizable template declaration/definition [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(336): error C2059: syntax error : 'using' [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(469): error C2988: unrecognizable template declaration/definition [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(469): error C2059: syntax error : 'using' [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(576): error C2061: syntax error : identifier 'WeakCallbackType' [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(642) : see reference to class template instantiation 'v8::PersistentBase<T>' being compiled
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(637): error C2253: 'PersistentBase<T>' : pure specifier or abstract override specifier only allowed on virtual function [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(844): error C2253: 'Global<T>' : pure specifier or abstract override specifier only allowed on virtual function [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(847) : see reference to class template instantiation 'v8::Global<T>' being compiled
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(852): error C2988: unrecognizable template declaration/definition [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(852): error C2059: syntax error : 'using' [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(915): error C2989: 'v8::HandleScope' : class template has already been declared as a non-class template [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(319) : see declaration of 'v8::HandleScope'
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(949): error C2989: 'v8::EscapableHandleScope' : class template has already been declared as a non-class template [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(135) : see declaration of 'v8::EscapableHandleScope'
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(979): error C2989: 'v8::Data' : class template has already been declared as a non-class template [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(74) : see declaration of 'v8::Data'
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(1118): error C2989: 'v8::Script' : class template has already been declared as a non-class template [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(96) : see declaration of 'v8::Script'
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(1559): error C2989: 'v8::StackTrace' : class template has already been declared as a non-class template [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(101) : see declaration of 'v8::StackTrace'
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(1622): error C2989: 'v8::StackFrame' : class template has already been declared as a non-class template [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(100) : see declaration of 'v8::StackFrame'
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(2031): error C2989: 'v8::Value' : class template has already been declared as a non-class template [C:\Users\bob\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\bob\.node-gyp\4.2.3\include\node\v8.h(108) : see declaration of 'v8::Value'
Is it really supose to be this hard to install Angular on a Windows 8.1 computer? Or are my environment faulted in any way?
How do I solve this problem? Have search alot but no help.
I've installed Node/NPM/Angular on 4 differents machines of mine. This is what I've done to make it all work:
Visual C++ 2005
Visual C++ 2008
Visual c++ 2010
Python 2.7
I don't know why, I've just followed the console erros and all worked.
Yes, it is hard. The reason for this is that (dependend on the node modules you install) node-gyp rebuilds things to make them run on the platform, in your case Windows 8.
There are lots and lots of questions how to solve these kind of errors. Prepare yourself to install Python and Visual Studio like explained here.
Good luck! Working with node.js on Linux or OSX is much easier....

How can I resolve the "Invalid Resx file...Cannot find valid "resheader" tags for the ResX reader and writer type names." compiler error?

I'm getting a dozen "Invalid Resx file. ResX input is not valid. Cannot find valid "resheader" tags for the ResX reader and writer type names." err msgs on trying to compile.
I had this problem before, as can be seen here.
This time, though, it manifests itself a little differently.
First, here is what I did: I selected the context menu item "Undo Pending Changes" on several files in a project. For each of them, their related *.resx file apparently got corrupted.
2-clicking the first err msg in the Error List takes me here in the .resx file:
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
2-clicking the next err takes me here in the .resx file:
<resheader name="resmimetype">text/microsoft-resx</resheader>
This is a commented out explanatory section; in a little bit of context:
<!--
Microsoft ResX Schema
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
. . .
All 10 other 2-clickings takes me right to the first line in the .resx file, namely:
<?xml version="1.0" encoding="utf-8"?>
Hans Passant's answer to the same question by a different cat here indicates superfluous white space needs to be removed; I see no such extra white space in my .resx files, though...
What need I do to fix these mangled .resx files?
UPDATE
It may be that those first two locations where the err msg seems to point are bogus/misleading; they may be simply places in the files where I had previously put my cursor (odd that the err msg would go there instead of to the supposed location of the problem, though...)
UPDATE 2
According to the err msg, the failing *.resx files are missing valid resheader reader/writer tags. Yet those tags/declarations do exist there in the failing *.resx files. These look like this:
<resheader name="reader">
<value>System.Windows.Forms.Design.CFResXResourceReader, System.CF.Design,
Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</resheader>
<resheader name="writer">
<value>System.Windows.Forms.Design.CFResXResourceWriter, System.CF.Design,
Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</resheader>
....but, interestingly enough (if you're an uebergeek, anyway) those do differ from the RESX readers and writer declarations in other (compiling) forms, which look like this:
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0,
Culture=neutral,PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0,
Culture=neutral,PublicKeyToken=b77a5c561934e089</value>
</resheader>
If I replace the RESX reader/writer declarations in the non-compiling forms with the other format (IOW I replace "System.Windows.Forms.Design.CFResXResourceReader, System.CF.Design, Version=7.0.5000.0" with "System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0" (and use the differing public key tokens), it compiles!
BUT (and this is a big but[t] (think Bertha)), the machine on which this project is being compiled is a PC (of course), but the target machine on which the .exe will run is a Compact Framework (handheld) device. So, will replacing the "CF" with the more generic RESX verbiage prove problematic once the .exe is moved from point PC to point Handheld Windows CE device?

How to make non-Localizable SplashScreen in WPF

I'm just adding internationalization to my next WPF application, and have followed the instructions here.
I then noticed that there would be a fair amount of duplication in the satellite DLL, so marked the images that won't be localized in the .csproj as
<Localizable>False</Localizable>
Unfortunately, one of my resources is used in a SplashScreen thus:
SplashScreen ss = new SplashScreen("Images/splash.png");
ss.Show(false);
And this throws an exception when the Show call is executed. Here's the exception output
A first chance exception of type 'System.IO.IOException' occurred in WindowsBase.dll
A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
Step into: Stepping over method without symbols 'System.RuntimeType.CreateInstanceImpl'
A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
Step into: Stepping over method without symbols 'MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstance'
A first chance exception of type 'System.Xaml.XamlObjectWriterException' occurred in System.Xaml.dll
Step into: Stepping over method without symbols 'System.Windows.Markup.WpfXamlLoader.Load'
A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll
Additional information: 'The invocation of the constructor on type 'MainWindow' that matches the specified binding constraints threw an exception.' Line number '4' and line position '9'.
When I remove the False line it works again.
Is there any way to load the resource I want, which is stored in test.unlocalizable.g.resources?

Silverlight 4: How to reference class from another assembly

In XAML-file of the SquadView page (VfmElitaSilverlightClientView.Pages.SquadView) I am using custom value converter. XAML-file is in "VfmElitaSilverlightClientView" namespace. Separate folder was created for converter and it is in "VfmElitaSilverlightClientView.Converter" namespace (in the same assembly). To use converter following code is used in XAML:
xmlns:Converter="clr-namespace:VfmElitaSilverlightClientView.Converter"
...
<NavigationControls:Page.Resources>
<Converter:BooleanToVisibilityConverter x:Key="resourceBooleanToVisibilityConverter" />
</NavigationControls:Page.Resources>
All works fine. Here I want to move converter class into a custom separate assembly "SilverlightCommonView" and class himself will be in "SilverlightCommonView.Converter" namespace. The XAML code is changed to the following:
xmlns:Converter="clr-namespace:SilverlightCommonView.Converter;assembly=SilverlightCommonView"
...
<NavigationControls:Page.Resources>
<Converter:BooleanToVisibilityConverter x:Key="resourceBooleanToVisibilityConverter" />
</NavigationControls:Page.Resources>
In this case when application throws following exception:
An unhandled exception ('Unhandled
Error in Silverlight Application...
Code: 4004 Category:
ManagedRuntimeError Message:
Microsoft.Practices.Unity.ResolutionFailedException:
Resolution of dependency failed, type="VfmElitaSilverlightClientView.Pages.SquadView",
name="(none)".
Exception occurred while: Calling constructor
VfmElitaSilverlightClientView.Pages.SquadView(). Exception is: XamlParseException -
The type 'BooleanToVisibilityConverter' was not found because
'cl...:SilverlightCommonView.Converter;assembly=SilverlightCommonView'
is an unknown namespace.
It's unclear why specified namespace is unknown (those assembly is referenced by the current one).
Please advise.
Any thoughts are welcome.
I'd bet you do not have an assembly reference to your shared/common project from your application project.

Could not load file or assembly

I'm tring to create a generic collection of dynamic type at runtime of Silverlight application. My code:
Type listType =
Type.GetType("System.Collections.ObjectModel.ObservableCollection`1[["
+ type.AssemblyQualifiedName
+ "]], System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e",
true);
type is a variable of Type type. That Type is creating at runtime. At that code line I've got error:
Could not load file or assembly ', Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
How can I resolve that error?
Use MakeGenericType instead:
Activator.CreateInstance(typeof(ObservableCollection<>).MakeGenericType(type));

Resources