Open a Html file inside Visual Studio - visual-studio-2013

I have a post build event to generate some Html file, is there a way I can open it inside my Visual Studio for viewing as last step of my post build event command?
I tried to use call "my.htm" and it will open it in external default browser. I also tried to use devenv command in post build event, I just got some exception.

I just tested and it worked, so you should try this one here
In post-build define full path to your devenv. Just devenv didn't work
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" /Edit "C:\Temp\aaa2.htm"

Related

How to compile visual suidop 2019 c# solution from command line w/o opening the IDE on windows?

I want to just build, and output the logs.
Following the doc,
The following command-line switches don't display the IDE.
start "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\devenv.exe" "C:\code\EPMD\Kodex\Solutions\Kodex.All.sln" /Rebuild
This does open the IDE.
Using
start "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" "C:\code\EPMD\Kodex\Solutions\Kodex.All.sln" /t:Rebuild /p:Configuration=Release
also opens the IDE and builds the solution.
Doing
start "" /WAIT "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe" /build Release Kodex.All.sln
doesn't compile anything (that I know of), and returns immediately, silently.
Obviously I am missing some space or options or other trivial detail.
Don't even know how to debug this.
Help please
You can use the examples provided in the below Microsoft Docs link:
https://learn.microsoft.com/en-us/visualstudio/msbuild/how-to-build-specific-targets-in-solutions-by-using-msbuild-exe?view=vs-2019
Check the See Also section documentation as well. Hope this one helps!

DevEnv to build BizTalk Visual Studio 2013 solution from command line

I'm running the following:
D:\GitRecompile>"c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe" MyFolder\MyApp.sln /build "Debug"
It gives no error, no results, nothing. Almost like I just hit enter from the command line.
I'm trying to do a batch rebuild of several BizTalk Projects from the command line to make sure all code was checked-in corretly.
I also tried:
D:\GitRecompile>c:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild MyFolder\MyApp.sln /p:Configuration=Debug
It ran, but got a lot of errors, such as xxx.xsd.cs could not be found. BizTalk creates the .cs from the .xsd at build time; so it seems like the build should have created those files.

Load a solution on launching Visual studio 2012

I have added Visual studio to my startup folder in windows, now I want that when it launches it should load a particular solution by default. So that I don't have to check from the recent projects and select them.
So when my windows starts it launches visual studio and loads this solution and I am ready to code.
You can add a shortcut to your .sln solution file to the startup folder instead of a shortcut to VS. It will load VS with this solution.
If you already have devenv.exe added in startup, the next step is to add the argument with the path to the solution.
Right click the shortcut to devenv.exe under your startup folder.
Click properties.
Update the target field from
"C:\Program Files (x86)\Microsoft Visual Studio
11.0\Common7\IDE\devenv.exe"
to something like this
"C:\Program Files (x86)\Microsoft Visual Studio
11.0\Common7\IDE\devenv.exe" "C:\Your path\HelloWorld.sln"
You can see additional information about Devenv Command Line Switches here.

How to open files in one instance using Visual Studio?

I edit files directly from FTP and like to use Visual Studio, however VS seems to open each file in a new instance of VS instead of a new tab. I believe this is because it's a file without a solution/project.
How can I force VS to open multiple separate files inside one multitabed window?
You should perhaps look into this command line option : http://msdn.microsoft.com/en-US/library/aa991989(v=vs.100).aspx
I had the same problem This worked for me :
In Filezilla go to Edit > Settings > File editing
on the "Use custom editor" radio button, enter the following:
NB: the space between quatation mark and forword slash is important
" /edit
"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe" /edit
or
"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe" /edit

devenv command line does not show error for defective projects

We use Jenkins to build our solutions automatically. We call devenv (Visual Studio 2010) by a command line: devenv PathToProject\Project.sln /build Release
When the solution contains a defective project (*.vdproj, *.csproj), opening the solution in the Visual Studio IDE will result in an error message. But when building the solution with the above command line, no error message is shown at all, and consequently Jenkins reports success.
if you want to reproduce the problem, just open the vdproj file in an editor, and remove a } somewhere in the file.
How can that problem be solved?
On Visual Studio 2012, /Out writes the build messages to a text file.
devenv.exe YourVisualStudioSolution.sln /build "Debug|Win32" /Out "YourLogFile.txt"
According to MSDN, this switch should work on Visual Studio 2010 as well.

Resources