how to properly install stylecop? - c#

Well i downloaded the newest version, then installed, checked to instal entire files on local drive. I restarted VS2010 and rerun it. Unfortunatelly i can't find in menu > tools anything with should be connected with stylecop ( as in tutorial "how to use stylecop"). I am using x64 Windows7.
I really really don't know how to to use it.
Look: I click inside code, white field and i see only this:

1) Download StyleCop from here
2) Close all Visual Studio instances
3) Install StyleCop
4) Open Visual Studio, Right click inside code file and you could see Run StyleCop Option

Are you using one of the Visual Studio Express products? If so, you will not see UI integration of StyleCop since the VS Express edition does not support integration of add-ins and packages like StyleCop.
If you are using Express, you could still run StyleCop, but this will require using either MSBuild integration or a pre- or post- build event.

It looks like it is possible to use StyleCop with Express edition. Here is how.

Related

Visual Studio 2010 cannot open a 2010 solution that Visual Studio 2012 modified

Basically, I had a project that was written with Visual Studio 2010 Express in C#, I then tried out using Visual Studio 2012 Express with that file, and now VS2010 says:
"The selected file is a solution file, but was created by a newer version of this application and cannot be opened."
Now when I had looked up about this, Microsoft said that you can still use 2010 if you do not use anything that was VS2012 specific. Well, I had tried out the built in Testing that is in the VS2012, and that was the only thing that was VS2012 specific, but deleting that from my project (the Testing project), still left it saying that it was created by a newer version.
So, how do you make a VS2010 solution that VS2012 modified work with VS2010 again?
SP1 for VS 2010 is required to open VS 2012 modified solutions.
Try this out:
http://vsprojectconverter.codeplex.com/
Personally I've never used it but I have it marked as a tool to use if I run into issues. Hope it helps!
This probably isn't the kind of answer you are looking for, but it has worked for me in the past for compatibility issues and such, so it's worth mentioning. If your project isn't too complicated, you can create a new project then copy and paste everything across, starting with form controls, and then moving to the code. It's a sloppy solution that doesn't scale well, but sometimes nothing else seems to work.
The response here by Andrew.Wu is very comprehensive
http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/fc763995-beed-4287-97de-6e47d3e87865 and details steps to take to solve the problem
very old...but hope it can help someone...
Step 1: Go to your project location where the project's sln file is kept and then Right-click on it, choose "Properties". Uncheck "Read Only" as like given below:
Step 2: Again Go to the location where the project's sln file is kept and then Right-click on it to open it with notepad and change the "Microsoft Visual Studio Solution File, Format Version 12.00" to "Microsoft Visual Studio Solution File, Format Version 11.00" on the file.
you can change also the "Visual Studio 2012" to 2010

How to activate VsVim?

I am using ReSharper on Visual Studio but also I'm a vim user. I heard this VsVim. I downloaded it and installed the extension for visual studio 2010. But can't get the any of the vim commands to work. Actually, I don't think I managed to make VsVim work because any of the vim keybindings aren't working. I suspect ReSharper blocking the extension. What is the way of activating this VsVim extension and start using it?
To check that VsVim has been installed correctly you can go into the Extension Manager in Visual Studio 2010 (Tools / Extension Manager... / Installed Extensions ). You should see VsVim listed.
If it isn't listed, then installing it through the Extension Manager is probably the easiest way to go. From the Extension Manager, click Online Gallery. Then search for VsVim in the "Search Online Gallery" box. It should appear in the search results and give you the option to install it.
VsVim's author, #JaredPar, has tested VsVim against Resharper 5.1 and 6.0. If you're using one of those versions and are still having issues he'd probably appreciate your feedback on VsVim's issue tracker.
I had to restart Visual Studio after installing VsVim before it started working.
Later, I disabled VsVim. When I tried to reenable it, it no longer appeared even after restarting Visual Studio. I had to uninstall, reinstall, restart Visual Studio, and then it worked.
If you want to enable/disable the VsVim plugin in visual studio 2017, then make sure that vsvim ctrl+shift+f12 is handled by VsVim plugin
example :

Visual Studio version-agnostic projects/solutions: is it possible?

I remember seeing an open source project within the last year that I was able to open in both VS 2008 and VS 2010 without an upgrade wizard popping up. I think...
Is it possible to create a project/solution that will open up in any version of Visual Studio without prompting me to run the upgrade wizard? If so, how do I do this?
Information for both C++ and C# projects would be most helpful.
You can, use CMake and generate VSx solution.
I think the project that you have seen had 2 visual studio solutions for different visual studio versions.
Update:
Also, you can use http://sourceforge.net/projects/vspc/
or see http://www.emmet-gray.com/Articles/ProjectConverter.htm
The solution format hasn't changed significantly over the visual studio versions except the version number.
If the code itself is generic enough (not using linq, etc) then you can edit the first line of the solution file to "downgrade" the version.
VS2005 uses:
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
You can give the Prebuild project a try to generate needed solution files on the fly.
Prebuild is a cross-platform XML-driven pre-build tool which allows
developers to easily generate project files for major IDE's and .NET
development tools including: Visual Studio .NET 2002, 2003, 2005, 2008, 2010
SharpDevelop, MonoDevelop, NAnt and Autotools.
May be it is not what you ask about, but you can convert you project into nmake target
The only way to do this is to create separate solutions (for 2010 and 2008), and include existing projects to different solutions. Create new projects in VS2008, and then add them to VS2010 solution.
You may need something like round-tripping
Round-tripping is the ability to use a current or previous version of Visual Studio to target a platform that is supported by both versions of VS. For example, with round-tripping, you can open projects from a previous version of VS in a newer IDE without the need for conversion, thus allowing you to work side-by-side on old and upgraded projects.
Read more

I have a C# WPF application that needs to be packaged. Any suggestions?

so I have an application that I have created in Visual Studio 2010 and I want to know how I can package it so a user can install it on their machine. I'm sure I will have to do some scripting as well as call cmd prompts. Basically I want to get it to the point where there is an installer for the application that my group has built.
Any suggestions or tutorials you recommend?? Its for a school project and it would really be helpful if someone could help me get this off the ground. Its the last thing my group needs to do.
Thanks!
Joe Ristaino
Use ClickOnce
Use the MSI installer setup project in Visual studio. It's very simple.
http://www.c-sharpcorner.com/UploadFile/vishnuprasad2005/SetupProjects12022005022406AM/SetupProjects.aspx
I wouldn't use click once...
Ok here's a newer article
http://www.dreamincode.net/forums/topic/58021-deploying-a-c%23-application-visual-studio-setup-project/
Visual Studio has it's own installer projects, you could check those out. I personally use them for any projects I make at my company. If you use the wizard, you'll have it done in no time.
In your solution,
right click your solution name in the Solution Explorer.
Add -> New Project.
For the type, goto Other Project Types -> Setup And Deployment -> Visual Studio Installer
Choose the setup wizard, it's pretty easy. Primary output means what's is installed to the program folder. Follow the wizard and most of the work will be done. There will only be optional tweaking left to do.
I recommend WiX. It's got quite a bit of a learning curve, but it's totally powerful.
It's expected to be included in the next version of Visual Studio (it didn't quite make it into VS2010).

is it possible to use team explorer for version control without buying license for visual studio?

I downloaded the team explorer 2005 and when I tried to open the application from source control , I am getting the error .csproj applicaion type is not installed.
How can I resolve this ?
In order to open a .csproj you will need to install a version of Visual Studio that supports .csproj`s. There are free versions, called express SKU's, of Visual Studio that should help you out here. It, and the other express SKU's, are available at the following link
http://www.microsoft.com/express/Windows/
You need a CAL (Client Access License) to run just team explorer and access the TFS functionality to check in and check out and other things. If you're wanting to open the projects and make changes you'll need a license for visual studio. There are many different options there. I don't believe you can use the free one in your situation. Using VS professional you'll still need to get the CAL as well to access TFS but if you get one of the team editions of VS you will have the TFS CAL included.
That's how I understand the licensing for TFS/VS but I'm not an expert and it would probably be best to ask your supplier or microsoft about licensing.
I believe Team Explorer allows one to interface with TFS which includes accessing project documentation, filing bugs, and possibly retrieving source code. However, I believe you need Visual Studio to open up project/solution files (i.e. a developer task).
This might be different with Visual Studio 2010 but that's the sales pitch we heard regarding 2008.
In summary, although you need the specific module that loads C# projects. When you installed Team Explorer, although you have the basic IDE, that module is not loaded (is similar to when you install SQL Server client - you have the Visual Studio IDE, but the only module loaded is the SQL Server management Studio). As some of the other guys suggested, try to install Visual Studio C# Express (you can find more information here - http://www.microsoft.com/express/Windows/ - click on Microsoft® Visual C#® 2008 Express Edition). Notice that later on if you want to use web application, you will need to install the web edition and so forth.
When you install Visual Studio Professional (or Team Suite) most of those modules are installed by default.
I hope this info helps.

Categories