Category Archives: .NET
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.
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.
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.
In Visual Studio 2015 when you try to connect to GitHub you may get the message “Could not connect to GitHub.com”. The problem for this could be that you didn’t include GitHub extenstion feature during installation of the Visual Studio.
1. During installation of Visual Studio 2015 GitHub Extensions must be checked. (See following picture).
2. Even if you have included this feature in to the installation, you may still get the error. Actually, for some reason you cannot log in to the GitHub. In that case go to https://visualstudio.github.com and download the installer and reinstall the extension. That was worked in my case.
For instruction of how to install extension you can find on the web page.
Now you can open Connection from Team Explorer and choose GitHUb Extension.
The Login page for GitHub appears. Log in to the GitHub and start using GitHub.
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”:
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.
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:
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:
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.
Hi All – I wanted to let you know about a great free event that Microsoft and the MVPs are putting on, May 14th & 15th. Join Microsoft MVPs from the Americas’ region as they share their knowledge and real-world expertise during a free event, the MVP Virtual Conference.
The MVP Virtual Conference will showcase 95 sessions of content for IT Pros, Developers and Consumer experts designed to help you navigate life in a mobile-first, cloud-first world. Microsoft’s Corporate Vice President of Developer Platform, Steve Guggenheimer, will be on hand to deliver the opening Key Note Address.
Why attend MVP V-Conf? The conference will have 5 tracks, IT Pro English, Dev English, Consumer English, Portuguese mixed sessions & Spanish mixed sessions, there is something for everyone!
Come learn from the best and brightest in the tech world today. All of the sessions will all be delivered by the Americas’ Region Microsoft MVPs. These MVPs are experts who present at premiere conferences, independent community events and local user groups all over the globe.
This is a technical conference focused on helping attendees to learn and develop skills for everything from everyday technical work to wackier weekend projects. Whether it is on the IT Pro, Dev or Consumer side of things, you can bet that the content of MVP V-Conf will be cutting edge, exciting and relevant.
Be sure to register quickly to hold your spot and tell your friends & colleagues.
The conference will be widely covered on social media, you can join the conversation by following @MVPAward and using the hashtag #MVPvConf.
Register now and feel the power of community!