How to debug the extension DLL in CodedUITest? - coded-ui-tests

I am implementing coded ui support for my control , i am using custom properties for my control, so i have written extension file and paste it in below location
C:\Program Files (x86)\Common Files\Microsoft Shared\VSTT\11.0\UITestExtensionPackages
Now i want to debug the extension file, when Cross-Hair detect the UIElements.
How to do any help?

If you are asking about "Way to debug the CodedUITest plugin dll" means, please follow the below steps
1) Create your plugin extension to show custom properties and more
2) Set the output path of plugin project as C:\Program Files (x86)\Common Files\Microsoft Shared\VSTT\11.0\UITestExtensionPackages-- (For this you need to run the Visual Studio in Administrator mode)
3) Set the break point at where you want and Build the plugin project
4) Create your test project and execute it by "Generate CodedUITest for ..." . Builder will be displayed at bottom right corner of your machine.
5) Run your application exe( for ex: Application1.exe)
6) Now in Plugin Project, do the follow steps,
- GoTo Tools Menu
- Click AttachToProcess
- Window will open and choose your CodedUITestBuilder application from list of process( means builder window in right corner)
7) Now drag the crosshair from builder to your application UI and See Breakpoint will hit

Related

VS 2017 - The Web Application Project [MyProject] is configured to use IIS. You do not have permission to access the IIS configuration FILE

My web application was working fine for months till today, don't know what has changed suddenly the project in my solution file says that it is "unavailable" when I open the solution. When I right-click on the web project and reload the project, I get the following error:.
The Web Application Project myproject.myapp.mywebproject is configured
to use IIS. You do not have permission to access the IIS configuration
file. Opening and creating web sites on IIS requires running visual
studio under Administrator account.
Note - All these months i was running visual studio normally(not under administrator account) and the application was working fine.
By seeing the above error i tried running my visual studio under administrator account and the project got loaded but the Source Control File Status beside all the files disappeared, i no longer see any blue lock icon beside any of the files and even when i edit any file also there is no status beside the file in my project and also when i right click on any of the file i don't see the view history option.
My project which was running successfully till now not loading the project. any suggestions on this ?
Browse to C:\Windows\System32\inetsrv and then double-click the “config” directory to get this warning dialog:
Click on the Continue button.
Do the same for the C:\Windows\System32\inetsrv\config\export directory and also the other directories in C:\Windows\System32\inetsrv.
Now you will be able to open the Visual Studio Web Application Project without a problem.
Just run Visual Studio as an Administrator and the problem will be solved.
from the Start menu or when Visual Studio is open on the taskbar, right-click the VS icon.
in the context menu, right-click the visual studio icon again.
left click on properties.
advanced choice.
choose Run as administrator.

IPA file is not created in Xamarin.IOS

I have problem creating the IPA file for Xamarin.IOS project.
In properties of the project i've selected the certificate and the provision and also selected the "create IPA file".
The build finishing succesfully but no IPA file there.
The project is on Release mode.
Any ideas?
I also tried to make archive from the Mac but i am getting errors "file not found" because the icons folder have extention of .app and its not recognised by Mac
Select Release (Solution Configuration)/iPhone (Solution Platform)/Remote Device, then right click on the iOS project and click on "Archive...".
The IPA is now building.
In the following link of Microsoft docs, it shows you the steps you need to take for creating an IPA.
In the Solution Explorer, right-click the Xamarin.iOS project name and select Properties to open them for editing:
Select iOS IPA Options and select Ad-Hoc from the Configuration dropdown list:
If you are including an option iTunesMetadata.plist file, click the ... button, select it from the list and click the Open button:
You can optionally specify a Package Name for the IPA, if not specified it will have the same name as the Xamarin.iOS project.
Save your changes to the Project Properties.
Select Ad Hoc from the Build Configuration dropdown if it is available. Otherwise select Release:
Build the project to create the IPA package.
The IPA will be build in the Bin > iOS Device > Ad Hoc (or Release) folder:
Could be a bug, turning the option off and on again for building the IPA file in IPA options worked for me.
I've unistalled VS and installed again and the file created
Close Visual Studio
Delete %LOCALAPPDATA%\Microsoft\VisualStudio\17.0_d8613546\ComponentModelCache
Start Visual Studio
Build the project
the IPA created

Android Studio - How to Change Android SDK Path

When I open Android SDK Manager from Android Studio, the SDK Path displayed is:
\android-studio\sdk
I want to change this path. How do I do it?
From Android Studio 1.0.1
Go to
File -> project Structure into Project Structure
Left -> SDK Location
SDK location select Android SDK location (old version use Press +, add another sdk)
For projects default:
Close current Project (File->Close project)
You'll get a Welcome to Android Studio Dialog. In that:
Click on Configure -> Project Defaults -> Project Structure
Click on SDK Location in the left column
Put the path to the Android SDK in "Android SDK location" field.
(Example SDK location: C:\android-sdk; I have sub-folders like
add-ons, platforms etc under C:\android-sdk)
Click OK to save changes
Have fun!
Following steps were for older versions(<1.0) of Android Studio
In the middle column Click on Android SDK (with Android icon) OR click + on the top if you don't see an entry with Android icon.
Change SDK Home Path and select valid Target.
From the quick start window, choose Configure, then choose Project Defaults, and then choose Project Structure. Then on the left under Platform Settings choose SDKs. Then to the right of that choose the current android platform, mine was Android 4.2.2 Platform, and delete it using the red minus button at the top, then add a new android platform using the green plus button at the top and point it to your current SDK folder and that is it.
I Configured in this way
on
Welcome to Android Studio Screen
Click Configure Then
Project Defaults and then Project Structure
Then
Android SDK and Selected the path to my current location of Android SDK
Changing the sdk location in Project Settings will solve the problem partially. When Android Studio is used to download a new SDK, it will place the new SDK in the internal SDK folder (inside Android Studio).
Existing android developers will already have a large sdks folder (hereinafter referred to as external SDK folder) containing all the SDKs downloaded before Android Studio came around.
For Mac/Linux users though there is a good way out. Soft links!
Exit Android Studio and perform the following steps:
cp -r <Android Studio>/sdk/ <external SDK folder>/
cd <Android Studio>/
mv <Android Studio>/sdk/ mv <Android Studio>/sdk.orig
ln -s <external SDK folder>/ sdk
And we're good to go. Launch SDK Manager after starting Android Studio, watch as it discovers all your existing SDKs like a charm :).
EUREKA I found it!
With the current Studio 1.3 each project has a local.properties file where you can edit the SDK!
Here's how you can change the android sdk path in Android studio:
Open your required android project in Android studio
Click on the main project folder and press F4
Now click on "SDKs" under Platform Settings (Left hand side of the dialog box)
You should now see a plus sign on the top, click it and choose "Android SDK"
Now you would be asked to choose the required SDK folder
Select the required build target(if necessary) and click "ok"
Now you should see the new entry in the list of SDKs
Click "Modules" under Project Settings
Select your project folder and in the Dropdown for "Module SDK", select the new SDK entry and click "apply"
Now click "OK" and your done.
Note: If changes do not take effect, restarting android studio should fix the problem.
Make your life easy with shortcut keys ctrl+shift+alt+S
or
by going to file->project structure:
it will open this window, where you can select your SDK
Try this way i try in Android Studio 2.0
Step 1: File->Settings
Step 2: Settings->SDK options
Step 3: Click Edit option in Sdk Location
Step 4: Show "SDK Components Setup"
Step 5: Click on Three "..." in "SDK Components Wizad"
Step 6: Select your new SDK Path
I noticed that the latest version of Android Studio doesn't seem to have the option "SDKs" path that's mentioned in many of the answers. I'm guessing that disappeared in one of the updates, somewhere down the line?
The way i solved this issue (osx) was:
Go to Project Settings (Cmd + ;)
In SDK Location make sure you're pointing to the correct SDK location (typically /Applications/Android Studio.app/sdk) then hit Apply
Most important step - hit "Sync Project with Gradle files"
I wasn't doing Step 3 and that was throwing me off. After a sync all your source r belong to us....
goto menu File->Project Strucurt or key Ctrl + Alt + Shift + S
and example http://how-to-android-studio.blogspot.com/2014/11/set-sdk-location.html
You can also create the environment variable (in Windows) ANDROID_HOME to the location of the Android SDK and Android Studio will use that.
Above answers are pretty correct, but some times Android Studio, does not like to refresh after SDK path change, a quick solution is to make some change in you Build file, and click on Sync. It will refresh you project.
Happy coding... :)
While first installation There are two situations either you have pre-installed Android SDK if you had used it in past or you have nothing at all, At a time of installation Installer always ask user how you want to configure SDK with your studio.
You can simply give a path here or browse folder where sdk is available in local system. If you already have SDK, Another option as shown in below picture at Left down corner there is a nice option for download SDK, by clicking it you can download SDK with latest release right from there,You can also use third option see in right down corner setup Android SDK for me by clicking it you can step by step set your sdk.
Although you can also set it up when Android shows you list of available projects, a starting prompt window shown below
That's pretty easy, and also sometime if you want to change your SDK you can always change it right in your Android Studio from
On windows system
File --> Project Structure and then you will see SDK Location Option and from there you can set it up by providing a path or by browse it.
Or if you are on MAC system then from Platform settings.
In Android Studio 2.2.3 I think you can change default SDK location for all projects from the top menu:
File -> Project Structure...
A window like below shows up:
in windows press ctrl+shift+alt+s which will open project properties where you can find first option named SDK Location click on it and there you can change SDK path, JDK path and NDK path also
This may not be what you want, but being an eclipse user I had the same problem having duplicate sdk folders which were eating all my ssd space. Currently you can only change sdk path inside android studio project wide which is annoying. What I did instead was I copied all the previous android sdk files that I was using with eclipse to /Android Studio/sdk/ and then just changed the sdk path inside eclipse.
Now both android studio and eclipse are happy.
Here is some ways, as far as I know now.
Android Studio 3.3.2 (testing is OK)
method: 1
just following steps of the official docs, as bellow link shows
https://developer.android.com/studio/intro/studio-config#jdk
method: 2
following steps of the screen shortcuts, as bellow shows
method: 3
following steps of the screen shortcut, as bellow shows
Tap --> file --> close current project.
You'll Android Studio home page
Click on Configure -> Project Defaults -> Project Structure
Click on SDK Location in the left column and copy the path.
Paste the path in My computer --> Right Click -> Properties -> click on Advanced system settings -> Environment variables and change the android home path.
click on 'OK' to save the session.
Add tools and platforms tools in path and save the changes.
Open command prompt[window+R] and type adb + enter.
In Android Studio you can set the general Android SDK path in the file: %Home%.AndroidStudio2.1\config\options\jdk.table.xml
Click on File menu.
Select Project Structure.
Edit the path in SDK Location text box.
From the next time Android Studio will use this location for all your projects.
N.B.: Avoid having spaces in the path as it may sometimes lead to issues.
This is how its done,in Android Studio for windows
Done
For Android Studio 3.1.2:
Tools>> SDK Manager>> Edit "Android SDK Location" to new location
After that, Set environment variable $ANDROID_HOME to your new SDK location
I had the same problem, but with the sdk path pointing to a mounted drive. I found, that simply quit Android Studio, unmount the device and restart Android Studio made it ask for the sdk location, because it had none (Android Studio Beta 0.8.7).
Therefore I guess if you just quit Android Studio, delete \android-studio\sdk or move it somewhere else and start Android Studio again, it should ask for the sdk location aswell.
Though many of the above answers serve the purpose, there is one straight forward thing we can do in project itself.
In Eclipse, go to Window->Preferences, select "Android" from left side menu. On the right panel you will see "SDK Location". Provide the path here.
Good luck.
In Android studio 1.2.2 you can simply changes project based SDK,
Steps:
Right click on Module and select Open module setting or press F12
Select SDK location from left hand side
Now you can change SDK location as well as JDK location from this page
When I ran into trouble with this on Android Studio 3.1.4 the solution was to go into the app dropdown on my project, then Edit Configurations > Defaults > JAR Application where there is a JRE box on the initial Configuration tab. Setting that to my JRE path solved the problem for me.
Simple Answer Work For Sure...
Step 1: Right Click On The Project>> Select Open Module Setting -->
Step 2: Select SDK Location From the Right Side below image
Step 3: Now browse the SDK location from your computer as show below...
Step 4: Click on OK.
I'm guessing from the responses that people aren't understanding your question... If I'm right in that you want to have ~\Desktop\github\ then changing the SDK location isn't what you're after.
From Android Studio 3.2.1:
From the new project dialog, choose
Configure -> Preferences -> Tools -> Terminal -> Start Directory
Put the folder you want as your project default in the field.
e.g. Mine is set to
~/Desktop/github/
since all my work is in
~/Desktop/github/
Just go to
(Main Menu) File > "Sync Project With Gradle Files"
click ok on the popup, it will change your sdk directory.

"generator.exe" exited with code "-1073741819"

I'am developing a android application in Visual Studio and the Xamarin c# monodroid development tools.
I have some external JAR files that i embed into my projects. Most of the project work fine but when i try to embed the JAR from Yocto (yocto android lib) and place the YoctoAPI.jar into a new android project and link it as "EmbeddedJar" the compiler fails with the exception "generator.exe" exited with code -1073741819.
This is a NULL pointer exception in the generator and searching the net i found some people who have the same problem and tells me that obfuscated code is not supported (that i understand). But how can i find the obfuscated code in the JAR file? Or is there a other problem that i'am not seeing.
If i need to post more project settings or envirioment/system parameters, please let me know
Such issues with Visual Studio can be fixed by repairing it.
You need to repair Visual Studio. Go to Control Panel -> Programs. Then select your version of Visual Studio you are using and press "Change"(or right click it and press "Change"). When the setup appears, click "Repair".
I got same error while create binding project, in my case the problem is in resource file, you need to add the jar file and resource file like,
bin - contains all jar files,
res - contains all resource files,
and add the compressed 'bin' folder in your project and build works fine.

C# Window setup project

I am working on window setup and deployment project in .Net VS 2010.I have created a setup file.When we install setup build in .net a step comes where user is asked to select installation folder i.e. Installation Folder step.This step has default banner text "Select Installation Folder".Also browse text box has default header text "Folder".
Is it possible to change these default text?If so please suggest.
Please note that I have to change only these text mentioned above not the default path or location.
Abhinav
If you rightclick your installation project in VS2010 under the option "View" you can select the user interface. A new tab wil open with al the UI windows on it, you can change the text there.

Resources