SharePoint Deployment from Visual Studio 2010 Location - visual-studio-2010

So I have a web application in visual studio. I can right click on the project and click Deploy which will send the files live to the SharePoint server.
I accidentally reverted one of the pages to an older version in Visual Studio and was wondering if it's possible to get the version running live on the SharePoint server as that is the latest version.
I cannot currently deploy as this will then run and old version of the page I accidental reverted.
Where would the files be stored and how could I find them? visual Studio is running on the SharePoint server.
Thank you very much!

Visual Studio does compile your *.aspx.cs files to the *.dll file of your Solution/Project.
If you want to get the code of your old *.aspx.cs file you can use Reflector or ILSpy to decompile your *.dll (actually deployed to your SharePoint) and find the old code by namespace.

Related

SharePoint 2010 WebPart .g.cs files not being generated by Visual Studio 2010

I've inherited a SharePoint 2010 project that was originally created in another environment using a different version of Visual Studio (2012). My issue is that the .g.cs files for some WebParts are not being [re-]generated when I make changes to the .ascx files. I know that for regular .aspx pages, you can right-click and choose "Convert to Web Application" to force generation of the designer files. Is there something similar for WebParts?
I've already tried deleting the bin\ and obj\ directories in the project, cleaning and rebuilding (both the solution and the project), as well as trying to re-create the WebPart from scratch.
Wrote about workaround here: http://sadomovalex.blogspot.com/2013/08/fix-bug-in-visual-studio-2012-with.html. You need to specify url of correct Sharepoint site on local dev environment in "Site URL" property of your project.
It seems that it's an issue from going between Visual Studio 2010 and 2012. On the 2012 box the .g.cs files are regenerated and updated fine but the 2010 box refuses to do so.
Correction: SharePointWebPartCodeGenerator wasn't being found. After re-installing the Visual Studio 2010 SharePoint Power Tools, the .g.cs files were being updated.
I searched forever for a fix and installing the 2010 SharePoint Power Tools solution fixed the issue! The solution I was working on must have been a 2012 Sandbox solution.

The error "This project is incompatible with the current version of visual studio" displayed

I installed Vs 2010 Express in my PC, and created a poject named myproject with .net 4.0, it works well in Vs 2010 Express.
Now I installed Vs 2012 Express in my PC, and open the project myproject and upgrade it to .net 4.5, it wells well in Vs 2012 Express too.
I delete the project myproject all files, then restore it from my old backup file, when I try to open the project from Vs 2010 Express, I get the following information.
"This project is incompatible with the current version of visual studio", why?
How can I open the project in Vs 2010 Express? I guess the Vs 2012 Express maybe mark the project as .net 4.5 and stored the information in the somewhere of hard drive. Although I restore the project myproject from old backup file, Vs 2010 Express still think it is a project of .net 4.5.
Thanks!
If the message "This project is incompatible with the current version of Visual Studio" is due to an attempt to open a project targeting .Net 4.5 with Visual Studio 2010, then the "solution" or workaround is to edit the .csproj file and change the TargetFrameworkVersion from "v4.5" to "v4.0". That at least allows the project to be loaded, although it may result in compiler errors if the program is dependent on 4.5 features.
I know this is a little old, but just in case the above solutions don't work: don't be an idiot like me and try to open an MVC project using "VS for Desktop" instead of "VS for Web" (or vice-versa), since it will give you the incompatible message.
I use TFS at my job and I tried to open a MVC project via the TFS Solution Explorer. I wasn't paying attention to which Visual Studio version I had open and since both IDE's look alike, I was confused at what was going on - a common mistake, I'm sure =P
If you are getting the same error for a project which is actually an extension (.vsix), please install Microsoft Visual Studio 2012 SDK
Installing KB2781514 - Update for Microsoft Visual Studio 2012 solved the problem for me.
Check the directory that contains the solution file for an UpgradeLog.htm file. It will probably show what's wrong. In my case I tried to open an ASP.NET project, but the Web Developer Tools were not installed.
The Web Developer Tools can be installed afterwards by going to the Control Panel and to modify your existing Visual Studio installation. After adding Web Developer Tools the project opened without issues.
In my case the problem was the Component Model Cache (Visual Studio for C++).
in VS2013 it is located in
%localappdata%\Microsoft\VisualStudio\12.0\ComponentModelCache
in VS2015 in
%localappdata%\Microsoft\VisualStudio\14.0\ComponentModelCache
Rename this folder and restart visual studio.
I received this error because during the BizTalk install I did not check the Developer Tools and SDK checkbox. I went back and modified my installation and that error went away for me now.
Trying to load a BizTalk Project in VS2012 without BizTalk installed on your developer machine, will result in this error and the projects will load. This should be the first thing you check.
Make sure that all your extensions are same as in previous version. For me, when I upgraded from old PC to New PC, I didn't downloaded correct extensions hence resulting in above issue.
I faced out with this problem, the solution was:
Open VS2017
Go to Tools
Go to Extensions and updates
Search for Reporting Services Project and then "Enable"; close your VS.
Open again your project/solution.
--
MT

how to publish vs2010 web solution under framework 3.5 on iis?

Iam using visual studio 2010. i have developed one web application. my iis application pool was set to 3.5 only. when i deployed my app on iis it is showing target framework=4.0 error.
can any one tell me how to deploy my visual studio 2010 web project to run under dotnet framework 3.5?
open project files (.sln and .csproj) files in notepad and find the following lines(1st line) and replace with second line, you will convert your application to vs2008 successfully
TargetFrameworkMoniker = ".NETFramework,Version=v2.0"
TargetFramework = "3.5"
Visual Studio 2010
Visual Studio 2008
Microsoft Visual Studio Solution File, Format Version 11.00
Microsoft Visual Studio Solution File, Format Version 10.00
10.0.20506
9.0.30729
\VisualStudio\v10.0\
\VisualStudio\v9.0\
if u not find some lines dont worry , leave it
after changes, you may get a error from web.config from tag
remove this tag entirely, and also you may get config section errors like register components in web.config remove those tags also, and compile your code and run(what ever errors you may get from web.config remove them appropriately).

Visual Studio 2005: Project file can not be opened

I have a big solution file and few projects can not be loaded. I do have all the files in the proper directories. But when I right click and try to load the project, I get the following error:
The project file "C:\myapp.proj" can not be opened. The project type is not supported by this installation.
By the way, these projects are related to Windows Workflow.
Please help.
I am using Visual Studio 2005 on Win7 machine.
It might be a modeling project, test project, silverlight/wpf project etc. It's definetely something that's not supported by your version of Visual Studio, you should use a newer version or a different one (i.e. professional instead of express).
Update: I did not see that it was Windows Workflow Foundation. Check out this link, it's a toolkit for using Workflows in VS2005.

Umbraco Development Setup Visual Studio

I am a new developer for Umbraco. I am having problem setting up my Visual Studio 2010 as a developer platform for umbraco 4.5.x with TFS and between remote teams.
My current setup is to open the whole umbraco site in Visual studio and tideup with TFS. Obeviusly this means that some of the files and folders gets locked up when commiting to Source control. Problem is this causes the problem when running umbraco as umbraco tried to write to certain files.
Any idea what type of typical setup would be like for VS 2010 and umbraco?
thanks,
Preyash
This should solve your problem =)
EDIT: Link updated
http://our.umbraco.org/wiki/codegarden-2009/open-space-minutes/working-in-visual-studio-when-developing-umbraco-solutions
I made a VS2010 umbraco project template, that configures the commands used to copy files to the umbraco folder on build, like described in the above link.
http://our.umbraco.org/projects/developer-tools/visual-studio-2010-project-template
Is it mandatory to use TFS as your version control?
We have used Mercurial and Visual svn server as version controls in our projects.
In this i feel Mercurial as more comfortable for Umbraco projects.

Resources