Can I use visual studio unit test framework with Visual Studio Community? - unit-testing

For the life of me, I cannot figure out how to add Microsoft.VisualStudio.TestTools.UnitTesting to my project in Visual Studio 2013 Community version.
I tried adding it through nuget, which doesn't work -- I can only find Microsoft.VisualStudio.QualityTools.UnitTestingFramework, which seems to be different.
I tried adding it from C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies\ (as mentioned here Where to find "Microsoft.VisualStudio.TestTools.UnitTesting" missing dll?), but that directory doesn't exist for me.
I'm kind of at a loss now. Can I not use that with the community version of visual studio?

I had this today after uninstalling older VS products. I had VS2012 Express and VS2013 Professional installed, as well as using VS2015 Community Edition.
I'm afraid I don't have an explanation, but creating a new Unit Test project, recreating references and copying the code from the old Unit Test project has sorted out the issue. There must be something under the hood that changed.
I hope that helps someone else if they find themselves in the same boat!

Related

Visual Studio 2013, error MSB8020: The build tools for Visual Studio 2010 cannot be found

At the start I'd like to note that I've spent some time researching this issue and suggested solutions for similar questions like this one didn't help me.
Problem background
I need to migrate a Firebreath plugin project (which I haven't worked on previously) from PC_1 to PC_2.
As far as I'm aware the project was started on PC_1 on Visual Studio 2010 and later moved to Visual Studio 2013 Pro. There's one solution consisting of 19 projects. I have an instruction which says that in order to get the plugin installer I should first Build project_x and after that Build project_y_WiXInstall. Both steps work without any issues on this machine.
Then there's PC_2 which had Visual Studio 2015 Community installed before I started working on it. I've removed it, installed Visual Studio 2013 Pro (version 12.0.21005.1 REL - exactly the same as on PC_1), moved all of the needed files and I'm trying to get rid of all of the compilation errors. So far I figured out I had to install Cmake 2.8, Windows Driver Toolkit 7.1 and manually override an incorrect VCTargetsPath MSBuild variable
Problem description
Currently when I try to compile the project on the new machine I get these two errors (this is an image link since I can't embed images yet on this account). I'm not sure what's going on with the first error message since it looks incomplete and the file CUSTOMBUILD doesn't exist, but I'm not bothered by it too much since the previous compilation error I fixed also had a similar "artifact" as the first error and it disappeared after fixing the second one.
The covered part of the second error message is the project path. The error origin (Microsoft.Cpp.Platform.targets file, line 64) looks like this:
<!-- Error out if toolset does not exists in Visual Studio 2010 or 2012 -->
<VCMessage Code="MSB8020" Type="Error" Arguments="$(_CurrentPlatformToolsetShortName);$(PlatformToolset)" Condition="'$(ToolsetTargetsFound)' != 'true'" />
What didn't help
The error description suggests using an Upgrade Solution... option, but there's no such thing when I right-click the solution
As an accepted answer for the question I've posted at the start of my post suggests, I've checked the Properties of all 19 of my projects (including the project ZERO_CHECK) but their Platform Toolset is already set to Visual Studio 2013 (v120).
I've also tried changing the Platform Toolset to inherit from parent or project defaults for all of the projects. This resulted in it switching to Visual Studio 2010 (v100) (not installed) and after that I've right-clicked on the projects and chose Upgrade VC++ compiler and libraries. After this the Platform Toolset was back to the Visual Studio 2013 (v120) but it didn't help with the compilation error.
As a NON-accepted answer for the question I've posted at the start of my post suggests, I've tried searching for all of the occurrences of 10.0 and V100 in all of my .vcxproj files to replace them but I haven't found any occurrences of them.
[EDIT]
I just got an idea to try building the project with MSBuild from the command line. There's a bit more info compared to errors inside Visual Studio, so maybe it will help with resolving the issue: https://pastebin.com/JhN3dXM3
So the thing you're missing here is that FireBreath projects are built using CMake -- the actual contents of the build directory should always be completely temporary and never stored in source control. To build the project on a new computer you need to run the prep command again from scratch.
If the previous maintainer changed the build files manually and/or migrated it to a newer version of visual studio without using cmake to do it then they did some very ugly things and all bets are off... good luck.
This is why all the firebreath documentation (I wrote most of it) strongly urges that the build directory be transient and you always do project file updates in cmake.
Hope that helps!

Is it possible to revert Visual Studio subversions?

Due to a variety of problems that can pop up in a build process when upgrading Visual Studio, I'd like to be able to revert, for instance, from Visual Studio 15.3.3 to Visual Studio 15.3.2. In previous versions of Visual Studio, it was as simple as going to Programs and Features, finding the update that updated Visual Studio and reverting it, but because updates are now done through the Visual Studio Installer, this no longer seems to be possible.
This is mostly a question for future disaster-proofing: we've seen some breaking changes between versions of Visual Studio lately, and we'd like to know how to revert if something goes really, terribly wrong.
Preliminary searches for reverting just the compiler also haven't returned anything -- for C#, it's possible to get specific .Net compilers through NuGet, and we were hoping it would be the same for native C++.

Where can I find if the Visual C++ components or the Microsoft Visual C++ Build Tools are installed in Visual Studio 2015?

I guess I may be getting into trouble for asking ironically obvious questions. I had found the place that shows where things are installed on Visual Studio 2015 in 2016, but now I can't remember where it is. I see instructions of how to check using the command line, although I saw a nifty place that showed me which components were installed somewhere in the toolbars on top in 2016. Funny.

Visual Studio doesn't recognize Unreal Engine

I'm a student in Videogame Development, and just starting out looking at Unreal.
And no, none of my teachers know anything about this.
I have installed Unreal Engine 4.13 and Visual Studio Community 2013 now 2015.
I'm trying to make a C++ project using Unreal Engine (using blueprints is out of question so this didn't help)
Now, when I make a basic C++ project, Visual Studio shows the following error message:
Unsupported
This version of Visual Studio is unable to open the following projects. The project types may not be installed or this version of Visual Studio may not support them.
For more information on enabling these project types or otherwise migrating your assets, please see the details in the "Migration Report" displayed after clicking OK.
- UE4, "C:\Users\Gebruiker\MEGA\Unreal\Disposable\Intermediate\ProjectFiles\UE4.vcxproj"
- Disposable, "C:\Users\Gebruiker\MEGA\Unreal\Disposable\Intermediate\ProjectFiles\Disposable.vcxproj"
No changes required
These projects can be opened in Visual Studio 2015, Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1 without changing them.
- Engine, "Engine"
- Games, "Games"
- Disposable, "C:\Users\Gebruiker\MEGA\Unreal\Disposable\Disposable.sln"
Then my browser opens showing a Migration Report telling me that VS had an error with Project.vcxproj and UE4.vcxproj, although it copes with Engine, Games and Project.sln.
After this VS does show up without any further action, and it does automatically open *.h and *.cpp files for newly added classes in UE4.
Though it does edit and save these, it claims that all UE's code is wrong (with squiggles), and for compiling UE4 gives errors on pieces of code that apparently don't give errors on other's machines.
It would be much appreciated to be helped out, and I'm sure it would help others too who would have the same problem.
EDIT
A screenshot of the problem and configuration
EDIT 2
A screenshot of the Help -> About Visual Studio page, VS 2015 C++ highlighted
Starting with both the Unreal Engine Editor and Visual Studio closed, right click your .uproject file and select Generate Visual Studio project files, and then launch visual studio from the .sln file.
Once Visual Studio is open check your Solution Configuration is set to Development Editor. Then go to Debug > Start without Debugging (or Ctrl-F5). If everything compiles and the Editor opens again then you're good to go.
I uninstalled VS2013, installed VS2015 with all additional options checked, made a blank, new project with Unreal with just VS2015 on my pc, and now everything works fine.
Perhaps my VS2013 installation was broken, deprecated or switching version wasn't a good idea, but I can work with VS in any case now.
Also thanks to jeevcat for mentioning it!
Install newer version of the Visual Studio. VS2013 is not the latest one, VS2015 is. People report that even updating VS2013 from Update 2 to Update 4 helps resolving similar issues.

New to C++, Visual Studios Professional 2013 can't run projects made in Visual Studios C++ Express 2010

And now, the projects that I tried to open and run (very basic projects - little more than learning programs like hello world type programs) in VS 2013 can't be opened and run in VS Express 2010 either. Everything is licensed properly.
In fact, when I open my program in VS Express 2010 now, it underlines basic things in the header like "iostream" in red, and doesn't recognize them.
If I build a new project in either, it's just fine. But I can't get projects to work across one from the other, and if I do try, it does some rebuild, and then those projects won't work in either.
What is going on?
Actually, that happened with me when I tried to use a project of gmap.net (winforms) that I made with Visual Studio 2013 into the new version of VS 2015.
Into my case, I could see all the code I had made in C#, but I couldn't change the design of the project and I think that it will be impossible so I have been working with both.
But in your case, if you want just open the code, you should find the file with .csproj or something similar to this and do not open the project by the .sln if you know what I mean.
Doing this it will work just fine. And of course, don't forget that you should import all extensions to your new VS.
PS:
I found a nice explation of your problem here at the Visual Studio website. And this was the answer:
If you allow Visual Studio to update the project automatically, you can open it in Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1.