I have MyProject.Publish.wpp.targets file in the root of that project folder.
When I edit this file & publish the project, it doesn't take the new changes.
I have to reopen the Visual Studio and publish for the new changes to apply.
How to fix this.
Using Visual Studio 2019.
Drag the files / folders from Windows Explorer into the Solution Explorer. It will add them all. Note this doesn't work if Visual Studio is in Administrator Mode, because Windows Explorer is a User Mode process.
Related
I was using .NET Core API project with 2.2 Framework in VS 2017. Now we have migrated all the .NET Core API Projects to 3.0 Framework.I have both VS 2017 and 2019 installed in my machine. When we click on ".sln" file it gets openend in VS 2017. But i want the .sln file to be openend in VS 2019.
Please let me know the changes required to achieve this.
Thanks
For one, you can delete the solution file and create a new one dotnet new sln.
Assuming you have .NET Core 3.0 sdk installed and active (in case of globa.json being present), it should create you an *.sln file for VS 2019.
Alternatively edit your sln and change the first few lines to
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29512.175
MinimumVisualStudioVersion = 10.0.40219.1
thats the sln header VS 2019.4 (16.4) creates on new solutions
Right-click on the .sln file
From the popup menu click on "Open with" and in the submenu click on "Choose another app"
In the splash window select "Microsoft Visual Studio Version Selector", don't forget to tick the "Always use this app to open .sln files" checkbox, and click "OK".
If prompted to save changes to the "devenv.sln" file, save changes.
In this way, a double click on a .sln should open it with the version of Visual Studio that was used to create it.
Open Visual Studio 2019 and select File-->Open than browse to the solution file that should be ported to VS2019 to open it.
After the solution file was successfully opened in VS2019, chose to Save All.
From now on, your solution file will be opened with VS2019 once you doubleclick solution file in file explorer.
P.S.
Editing solution file manually to update VS version is not recommended because it does not respect possible structural changes of the solution file that may appear between VS versions.
Or,
create a shortcut to the .sln file
right-click the shortcut, choose Properties, General
Opens with, click Change and select Visual Studio 2019
(note - this only changes the shortcut, not the .sln itself, but it's a quick safe fix)
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.
I recently installed the Windows Phone 7 SDK that came bundled with Visual Studio 2010 Express for Windows Phone. I downloaded a sample app and tried to open the solution file. When I checked the solution view window, the app project was not loaded. Every time I tried to reload the project, it flash as available for a moment and then go back to being unavailable. I tried all the usual tricks like removing source control from the .csproj and deleting the .user and .suo files. Any ideas?
Ok I figured it out. When I open the solution file, it opens in Visual Studio 2010 Shell. What I needed to do was to go to Visual Studio 2010 for Windows Phone, open existing project, and then browse to the solution file and open it. Sorry for the confusion everyone!
Whenever I open a file (ex. aspx, ascx) or a solution using VS, it creates the following 3 folders next to a file or a solution.
Visual Studio 2010
Visual Studio 2010Projects
visual studio 2010Templates
Recently, there has been a problem with Windows User Account in our network; the profile issue has been fixed by Network Admin.
I'm wondering how to fix that VS issue. Thanks in advanced.
Open the Tools/Options/Projects and Solutions/General dialog, and make sure the settings are correct for Projects Location, User Projects Template Location, and User Items Template Location.
I am having an unusual problem. I have always been able to drag files and folder from my desktop or explorer to the solution explorer in visual studio and add the files to my project. No when I attempt to drag files I simply get the "stop" symbol.
I am using Visual Studio 2008 running on Vista Home Premium 64 bit.
Any ideas?
Windows will not let you drag from one window to another if only one of those windows is running as Administrator.
Are you running Visual Studio as Administrator?
In short : Run Visual Studio as Non Administrator.
You can't do this when your project is running. Is it?
I also cannot drop files from the explorer onto Visual Studio when it is running in admin mode.
But please try opening 'Add / Existing Item ... ' from the Solution Explorer / Manager context menu in Visual Studio and drag and drop files and folders from that window.
Works on my machine with Visual Studio 2012 ...
I had the same issue and noticed I was pulling files from a folder that was compressed. I unzipped all the files and was able to drag and drop into the solutions explorer fine. Make sure your files are not in view mode in a compressed folder.