Category Archives: C#

error CS0433 for ‘System.Windows.Automation’ type


vsissu2e

Few days ago I had a strange issue in one of my Visual Studio 2013 solution. The Test project required functionality of System.Windows.Automation, and I have added assembly UIAutomationClient. When tried to run tests I got the folowing compiler error:

error CS0433: The type ‘System.Windows.Automation.AutomationElement’ exists in both ‘c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PublicAssemblies\UIAComWrapper.dll’ and ‘c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\UIAutomationClient.dll’

It was strange issue, because I didn’t add UiaComWrapper assembly. Tried to remove the assembly, but as soon I run test the previous error appeared.

vsissue

 

Fixing the issue

To fix this issue we have to use “Reference Alias” which is specified here. So for our assembly UIAutomatisationClient change the Alias from “global” to  “UIAutomationClientAlias”. See picture below.

vsissuesl2

Now that we defined new alias, in the following text it is shown how to use it in your cs file. Open the cs file we have error.

1. At the top opf the file put the folowing line:

extern alias UIAutomationClientAlias;

2. Define using namespace from the new alias:

using Autom = UIAutomationClientAlias::System.Windows.Automation;

3. Now we can use all members from Automation class safely, and the compiler error is despaired.

vsissuesl3

XAML Peak new feature in Visual Studio 2015


The latest version of the Visual Studio 2015 is bringing a lot of new features for WPF and XAML programming language. For this blog post I would like to share the XAML Peak Definition. Peak Definition is not new, the current version of Visual Studio 2013 supports peak definition only for C# and VB. Now we have the same functionality within XAML. Event more, in the Visual Studio 2015 peak definition is working in mixed mode, so you can reach any definition regladless of the programming languges (C#, VB or XAML).

XAML peak allows you to get definition or content of any name defined in the XAML code. For example lets see the following XAML code. Right click on the MainWindow class and choose “Peak Definition”:

peakxamlsl1

After the command is selected, the new inline window appears within xaml, and the user can easily see or change the code behind selected definition. Peak Definition works for any proper name in the XAML.

peakxamlsl2

Lets see more interesting thing. Peak Definition is very handy when you want to see or modify the defined style or control template. For Example if we right click on the Style defined resource and choose Peak Definition like the following picture:

peakxamlsl31

Inline window will appears and show the style implementation of the selected xaml element. This is very useful and long waited option of XAML editor:

 

peakxamlsl4

Inline windows are edited windows so you can edit or add new code without leaving xaml editor.

This is one of the plenty of the new features coming with the latest version of the Visual Studio 2015. More features in the coming post.

 

 

 

Sarajevo Azure DevCamp Review


Jučer je u prostorijama HUB387 u Sarajevu održan Azure DevCamp, na kojem se okupilo stotinu polaznika i u radnoj atmosferi pratili predavanja oko Microsoft Azure. DevCamp se sastojao od šest predavanja u kojima se govorilo o Azure Cloud i Mobilnim servisima, Azure WebSites, Podacima na Azure poput SQL Server DB, MySQL, BigData, DocumentDB i sl,te virtualnim mašinama i virtualnim mrežama. Publika bila vrlo aktivna, a podjelilo se i prigodnih poklona u obliku majica sa Azure logom.

Još jednom se zahvaljujem publici na pažnji i prisustvu, a demo slajdove i primjeri koji su jučer bili na Campu mogu se skinuti sa donjeg linka.

azuredevcamp03201503 azuredevcamp03201501

Azure DevCamp @ HUB387 Sarajevo


azure_dev_Camp_sarajevo2014

Nakon decembarskog AzureDevCampa u Banjaluci, Microsoft BiH organizira jos jedan AzureDev Camp. Naime, u subotu 21. marta u tehnološkom parku HUB387, održat će se cjelodnevni trening o Microsoft Azure za developere, softverske arhitekte te IT profesionalce.

Kao i prethodni ut meni je pripala čast da vodim ovaj trening i nadam se da ću zahtjevnoj publici uspjeti prezentirati očekivano.

Koncept Azure DevCampa sastoji se od 6 predavanja koja uključuju osnovne cjeline koje Microsoft Azure nudi.

Polaznici će na radionici imati priliku vidjeti osnovne konceptima razvoja rješenja u cloud-u, prvenstveno paradigmama kao što su to SaaS, PaaS i IaaS. U nastavku, kroz različite Azure servise, biće demonstrirani različiti scenariji počevši od hostiranja web aplikacija baziranih na različitim tehnologijama (.NET, PHP, Java, Node.js, …) , skladištenja i upravljanja podacima (SQL, NoSQL, BLOB, …), podizanja infrastrukture (Win/Linux virtuelne mašine, virtuelne mreže,…) pa do integracije sa mobilnim uređajima.

 

Vidimo se na Azure DevCampu.

Follow

Get every new post delivered to your Inbox.

Join 620 other followers