I'm trying to run my unit test created via Visual Studio 2013 on my staging server.
I don't want to install Visual Studio there, not the Test Agent so I found a way to run them by copying some of the DLLs and EXEs needed.
Yes, I know it is a hack but I prefer this solution instead of the Test Agent to keep the staging environment completely clean.
Anyway, the test are correctly done, except for the fact that the vstest.discoveryengine.exe crashes with the following error:
failed to initialize client proxy: could not connect to vstest.discoveryengine.exe
Note: this crash doesn't prevent the successful completion of the tests, just an annoying popup to close any time by hand...
I tried to run my batch script as Administrator but no luck.
Have you got any hint on how to prevent vstest.discoveryengine.exe from starting or listing the existent tests?
Thank you very much
Best
cghersi
I found the solution by manually copying some other DLLs in my folder.
Perhaps someone is interested in my same scenario, so I prepared the complete solution here:
http://www.snip2code.com/Snippet/59304/How-to-run-unit-tests-created-with-MS-Vi
It perfectly works for me, and my staging environment is still perfectly clean!
Let me know if it works for you guys.
Thank you
Related
I have following tools installed on my machine:
TFS 2017
Visual Studio 2017
MSBuild 14.0
In my application, I'm using some C#6 elements like string interpolation ($).
When I try to build it, controller says that it could not resolve the symbol.
Builds fail for both XAML and standard definitions.
In build logs, there's an information that it uses correct MSBuild 14.0 path: C:\Program Files (x86)\MSBuild\14.0\bin, but still failes to resolve C#6 elements.
I would really appreciate if you would help me with this problem, I've searched entire internet and found nothing :/
If you guys need any information, I'll be more than happy to provide it. Thank you.
TFS with XAML build is just using MSBuild to run the build. You could first try to use MSBuild command to run the build test locally, which will narrow down the issue.
If it works well on your dev machine and not works from a TFS server build. Very likely the environment problem.
To make sure the build successful, you should keep your build server environment the same with your local environment. Please double check this.
For trouble shooting, you could try to remote to your build agent, manually run your build and test on your build agent.
As for how to enable C#6, you could also refer this similar question, modify TFSBuildServiceHost.exe.config file which may do the trick. How do I enable C# 7 builds in Team Foundation Server 2015?
If you still get error, please include detail build failed logs here.
Hi guys i'm new both to this site and to testing and i'm having trouble finding solutions to this problem.
My current project produces a .DLL file as its build and im looking to use visual studio to automate testing on it every time a new build kicks off.
To run the program a .exe must be triggered in the same directory as the newly created .dll this isn't a problem and wouldn't need automating except i need to kick of 16 different variations of it using different config files and separate machines on a physical network for each variation.
Is there anyway to do this using visual studio 2010 ultimate and MTM?
I have looked into generic testing but it runs the exe without moving the new .DLL to the working directory any ideas?
Thanks in advance.
I haven't used VS 2010, but I know in 2008, you can specify Post-Build actions in the project properties, that you could use to copy the output where you need it to go. I would give you more details, but I'm not at work to look at the interface at the moment.
OK, so my project (a .NET3.5 DLL) and a unit test project worked up until today when Visual Studio started not trusting something about my project today. It worked this morning, it doesn't now. The project is on a UNC path pointing to the same machine that I'm developing on. I understand that all the terrible satanic evils about how performing unit tests on code located in hell can summon demons that immediately fly to the nearest Microsoft office location and devour it.
The drive IS mapped.
ReSharper experiences the same issue when I try to run tests through it.
https://connect.microsoft.com/VisualStudio/feedback/details/502353/running-unit-tests-from-network-drive This failed to work.
Visual Studio Unit Tests : dll is not trusted doesn't seem like a viable option
The Exception:
Test method MyClass threw exception:
System.Security.SecurityException: That assembly does not allow partially trusted callers.
Any ideas on how to resolve this?
As it turns out, my search skills need work too. SO has a post to just what I'm looking for. Thank you StackOverflow!!
Keeping Visual Studio Projects on a Network Drive
In VisualStudio (2010 and 2012) :
is there an efficient way to troubleshoot deployment issues when using DeploymentItem attribute?
I currently must wait for test execution to realize that the items where not deployed. Also, when a path error occurs, it's painful to detect where the error stands.
All deployment errors are written in .trx file. Also items are deployed before test run in "out" folder.
I have a C#/ASP.Net solution in VS (2008) with several projects within it. When I try to compile it I get one error only:
Attempted to access an unloaded AppDomain
No line code, no project name, nothing. Just such error.
How can I pin down this error -- i.e. the cause, or even better -- how can I solve it and continue compilation?
Thank you in advance.
Shut down Visual Studio and reopen it. Then clean the Temp folder.
For that press Windows+R and type %Temp% and click Ok, then delete everything.
If this error comes with VS follow these steps
Just restart your VS.
Start VS again
Clean the solution (Build> Clean Solution)
Rebuild your project again
If this error comes with IIS
Restart (recycle) the IIS Application Pools in IIS Manager, After restarting check run the solution again!
There are many possibilities:
Try resetting your Visual Studio's
Setting.
Or check all dlls which are
referenced.
Check all the namespaces which are
being used in your application, Do
they exist?
I am experiencing the same in Visual Studio 2012 - but ONLY on websites hosted on UNC share. My solution (when it occur) is to unload the web project and reload it again. Then in works for some time again.
The problem as I recall it is, that the hosted UNC share (or the workstation trying to access it) is running an x86 version of Windows, which does not allow to many open network connections.
In my experience these sort of problems disappear on true x64 environments.
Cheers.
it means, there is something in WebConfig/AppConfig not compatible and cannot load.
For ex.
İf you published project, check app_data/publish profiles, delete them.
Check your .sln file first if it is conflicted then delete it and update your svn folder and rebuild your solution.
Rebuild your solution
It's also possible that your unit test started up a thread but didn't close it. Ensure your threads are all closed before completion.
It might be a good idea to verify all your unit tests are running and passing correctly.
Exit the local webserver(IIS express) from the system tray and delete asp.net temp files from temporary folder & then try clean,rebuild and run your application
Following are the steps i followed to get rid of such error-
Press Windows+R , write %Temp% and hit enter. Now,delete all the temporary files from the directory.
Restart your visual studio.
Clean your project solution from Solution explorer in Visual studio List item.
Rebuild the project & Run .
It should work expected.