Error like The imported project nuget\nuget.targets was not found

by Admin 1. September 2016 02:08

Folks,

When you try to open a .net project in visual studio and getting an error like below,

'The imported project "....\.nuget\nuget.targets" was not found.'

There is a chance of having your project folder path not been recognized due to spaces in it. You may first try by having the solution in a folder that dont have any space in it.

 

Other possible reasons are explained here: http://stackoverflow.com/questions/9133854/opening-project-in-visual-studio-fails-due-to-nuget-targets-not-found-error 

Tags:

Web Development | ASP.Net | Azure

How to enable certificate authentication in automated API test cases using Visual studio web and performance testing

by Admin 22. August 2016 04:29

Are you looking for the ways to automate test cases for an API exposed over SSL with certficate authentication using Visual Studio 'Web Performance and Load Test'? Here comes the story.

Forenote: 'Web Performance and Load Test' project type is available only on limited versions of visual studio. So, please ensure that whether your version of visual studio is having this feature.

 

1. From Visual Studio, create a new project of type 'Web Performance and Load Test'.

 

2. Right click on the newly created web test and click 'Add Context Parameter'. This is to make the fixed portaion of url configured in order to avoid the repetion of url.

 

3. Give a name and the url of the web site/api being accessed.

 

4. Right click on the web test, and click 'Add Web Service Request'.

 

5. Fill below highlighted values. Expected Response URL to 200, Method to GET and url to {{WebSiteAddress}}\\remaining portion of url being tested. Where the 'WebSiteAddress' is the name of the parameter that we have configured in step 3.

6. Your test case organization now looks similarly like below:

 

7. Add a new project in the solution of type Class Library. 

 

8. Add a reference to Microsoft.VisualStudio.QualityTools.WebTestFramework from .Net framewofk extensions into this class library project.

 

9. Add a class file named 'WebTestPlugins.cs' and implement the code as shown in below figure. Resolve the reference errors if any based on namespace.

Note: It is also possible to load the certificate from locally installed store. I have not covered that approach here. 

 

 

10. Now right click on the web test project, click Add Reference and add the newly created library project as reference in to that from projects.

 

11. Your project organization will looks like as below

 

12. Right click on the web test and select 'Add Web Test Plug-in...'

 

13. Now choose the plug-in which you have created in step 9.

 

14. That's it. Now you can taste the web site results :). Right click on the intended test to run, click Run Test and then Run Test.

 

15. You can see the results from API.

 

Cheers,

Shan

Tags:

Test Automation

About me...

I am Shanmugam, a software consultant having core competencies in software design, development, security practices and project management. I am having span of experience in .Net, Sharepoint, Embedded systems, Android apps and various databases. Now a days concentrating more on azure development. I am holding a master degree in engineering and another master degree in managment. Currently associated with Aspire Systems.

I am here to share my development experience to my fellow developer and architect community...