I have developed a website using Visual studio 2010. Now one of my friend needs that website/project to copy in his system for further development. But whenever i copy from default VS project folder, it is not running in other system( Installed same version of Visual studio). I have done same with VS 2008 and it was working fine.
Follow the below steps :
image 1:
Copy the entire project folder (must Copy the entire project )
Open Visual Studio in Admin Mode
Open the solution file (you can see in the image 1 -project file)
Re-Build the Solution
How to copy from root folder of project :
Just right click the project and find options.
Note : Visual Studio 10 - Framework = 4.5 ,previous versions will not have the same framework so tools and references should be taken care of.They will not load if framework is different.
Probably the full path to the solution folder should be the same on both computers.
It is always recommended to use tools like Github.
These help to maintain a version of the files and all the organizations use some kind of version-ing system
https://www.unleashed-technologies.com/blog/2014/08/01/what-github-and-how-can-it-benefit-your-development-team
So following this practice will help you later when you will start developing professionally
and the tool is free :)
Related
I have read similar questions on SO and other forums but can't what I want. I have obfuscated my binaries using 3rd party tools, and want to use these binaries in the setup.
Visual Studio Installer lets us choose the projects we want to deploy, and creates the installer using the outputs of those projects.
WiX creates a setup using the files I want but does not have an option to install .NET framework, if it doesn't already exists.
Is there a way I can use my own assemblies in Visual Studio Installer ? Or a similar alternative ?
EDIT:
I have already packed all dependencies in the binary. I don't want the installer to find the dependencies for linking them. I just want it to install .net (if not already installed) and place the binaries in a directory.
Not exactly the answer you'd hope for, but you mentioned WIX and dependency to .net framework. For that reason people write bootstrappers (i.e. a binary compiled to native win32) using something like Autoit which makes sure of the framework. All you may have to do is read registry key of corresponding framework and if required it pull down the file and install. Then execute the msi !
You can use the good old Visual Studio Setup Project (Installer Project) template.
To do so, you need to download the Microsoft Visual Studio Installer Projects depending to your VS version from one of the following links:
Microsoft Visual Studio Installer Projects 2013
Microsoft Visual Studio Installer Projects 2015
Microsoft Visual Studio Installer Projects 2017 and 2019
Microsoft Visual Studio Installer Projects 2022
The project could be used to deploy anything, including your project or instead of adding Project Output you can simply right click on your setup project node in solution explorer and under Add menu, add File or Assembly.
Then all dependencies will be added automatically. You can also add other files and artifacts that you need to be installed on target machine.
How do I open I a Visual Studio Code folder in Visual Studio 2015?
If I open it as a "Web Site", it tries to treat the node_modules directory as part of the project's normal JavaScript files and hits an error when the path exceed the maximum path length.
But I can't open it as any other project type unless I first create a project of that type and then move all the VS Code files into that folder.
Should I be trying to open it as a web site?
Or should I create a new project and then copy the files + folders into it?
Is there any advantage to having it as a project?
If I do create a project, it makes it difficult to work together with someone who is just using VS Code?
And if I use a project, which project type should I select?
Finally folder view has arrived in VS 2017 :)
You can find more details in here.
Currently there is no way to open a folder directly with Visual Studio.
Why? Because Visual Studio and Visual Studio Code only shared their name, not the idea behind it. To extend Jenny O'Reilly answer:
Visual Studio Code is a folder oriented editor
This means VSC has the same Point-of-View to your Project as the File Explorer.
Visual Studio (not Code) is a solution oriented integrated development environment (short IDE)
Instead every Project in Visual Studio needs a *.sln Solution-File as Root Component. From this point Visual Studio looks at your Project. An example would, if you copy File in your Project Folder, they wouldn't be recognized from Visual Studio. You have to add them first to your sln File, to see them. It also allows the developer to combine multiple projects (*.csproj,..) into one single Solution to build.
This means the idea behind these two editors is completely different.
Visual Studio (not code) Project-types for Web
There are Node.js Tools for Visual Studio
This will provide Node.js built-in project templates
Visual Studio 2015 comes with TypeScript templates
Workaround 1
A workaround would be a Blank Solution in which you set up your Visual Studio Code Project.
Workaround 2
Another trick would be the answer to this question. You can open your Project Folder as a Website Project.
File -> Open Website -> File System and choose the folder
Update
As you mentioned, there will be errors because Visual Studio tries to build the solutions. For the next few readers of this response, the work around for this (as John Pankowicz writes in the comment) is:
Right-click Web Site in Solution Explorer -> Property Pages -> Build -> Uncheck "Build Web Site as part of solution"
Update 2
(Thanks to JC1001 for this update)
The next version of Visual Studio (Visual Studio "15") will support opening a folder. This is mentioned in the Visual Studio Blog.
Also like in Visual Studio Code, there will be a prompt command for opening Folders. Right now you can use this in the preview version:
devenv /command “file.openfolder FOLDER_PATH”
In the future you will be able to use:
devenv FOLDER_PATH
Opinion
Personally I wouldn't recommend Visual Studio (not code) for HTML/Website projects without server-side-development, because I don't see any features. Even the intellisense suggests to me sometimes bad HTML Code (it's not the IDE's fault).
After all web projects are still text files. You can easily control group projects like this with Version Control. Visual Studio Code even provides an integrated Git support.
Visual Studio Code does not create "project files" that you can open in Visual Studio 2015. Basically, when you open up a Node website in Visual Studio, you need to re-create the folder structure in VS2015 and create a "project file".
I haven't seen any better ways of doing this, but will be happy when we can open a folder just as easilly as we can with VSCode
I'm sure it's not the best way but..
Open an existing .sln with notepad, change the names, save as [name of your project].sln.
Open with Visual Studio.
Many of my colleagues use Visual Studio 2010 and 2008, I use 2010, 2012 and 2008.
Has anyone found a good way to share assemblies and source code without having the reader having to convert the solution to whatever flavour of Visual Studio they are using?
(I realise that frameworks need to be installed etc.)
You can create multiple solutions for each per "Visual studio version". but make sure you have compatible target framework version in your projects.
If you are only distributing a single project file you can just leave out the solution file (.sln) and only include the project (.csproj) files. Visual studio will create it's own .sln file the first time the user saves the project after opening it.
If you have multiple assemblies you need included one thing you can do is have multiple .sln files (one for 2008 and one for 2010 and newer. 2010, 2012, and 2013 can all use the same .sln file) and have them point at the same .csproj files. Just create the solution in 2008 with all of its projects, then create a new empty solution in 2010 and add all of the existing projects to the 2010 solution.
EDIT: I just found out that some types of projects are not cross version compatible. If you run in to this just create a version spcific .csproj file too and have it point at the same source files (you will need to keep the projects in sync by hand if you change project settings or add/remove any new source files)
Generally, program your solution to the lowest possible .NET framework version... Sounds like 2.0 would be right up your alley. Do this because the older versions of Visual Studio do not support the newer frameworks.
If your code can all be written using one of the Express versions, then you and your colleagues should all get VS2013 Express. All of the Express versions are free, so there's little reason not to use the latest.
I've created a game for an assignment in Visual Studio 2012 and the university I'm at uses 2010 and it won't open! It mentions something about NET Framework 4.5. How can I convert my project so it will open in 2010?
It takes three step:
Step 1
Open solution file (.sln) in a text editor and change
Microsoft Visual Studio Solution File, Format Version 12.00
to
Microsoft Visual Studio Solution File, Format Version 11.00
Step 2
Open application configuration file (App.config) in a text editor and change
sku=".NETFramework,Version=v4.5"
to
sku=".NETFramework,Version=v4.0"
Step 3
Open project file (for C# language .csproj) in a text editor and change
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
to
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
Now enjoy your project in VS 2010 !
You may only need to open the project in Visual Studio 2012, and go to the project's properties page.
On the Application tab, locate the Target Framework setting, and change it to .Net Framework 4.
After that, you should be able to open it in Visual Studio 2010.
Also see Converting VS2012 Solution to VS2010, but so far I haven't had to do any conversions on VS2012-created projects to open them ins VS2010 - but YMMV.
[EDIT]
I just tested this again (to be sure) by creating a .Net 4.5 project in VS2012, and verified that I couldn't open it in VS2010. Then I opened it in VS2012 again and changed the framework version to .Net 4.0. After that I could open it in VS2010.
Note that I didn't have to make any other changes. However, this is on a computer with VS2010 and VS2012 installed, so it's possible that installing VS2012 might do something with VS2010 to make it work...
I have done this at work
Open .sln file with notepad
Change the two lines below
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
To
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
and hey presto the solution now opens in VS2010
You can create a new project in Visual Studio 2010 and then right click in the solution explorer > Add > Existing item. To pull through all of files in your 2012 project.
Either create a new solution in VS2010 and add all existing files from your VS2012 or compare the .sln file to a .sln file freshly created with VS2010. At the top you'll see some version information that should be changed. Also compare the .csproj files and change any version information accordingly and the target framework.
Missing library or framework could also cause this problem. For example, if you want to open a MVC4 or Silver Light project but you don't have these libraries installed at your PC.
Open .sln file and Change Format Version to 12.0 to 11.0
I have Visual Studio Express 2012, and I'm looking to create an installation project for it, using WiX. I can't use the plugin because it's Express, so I'm using the candle and light approach.
I know how to make the wxs file I need, but my problem is that I'm not sure what files to include in the setup app (ex. the actual application file) and how to get Visual Studio to give me these files.
Any help will be appreciated.
Thanks.
-tradeJmark
You need to build your project in the Release configuration, which will create .exe and perhaps .dll files in bin\Release.
Do you have another machine? I happen to know that WiX works nicely with the free Visual Studio Integrated Shell.