In order to use the binary logging format for MSBuild introduced in MSBuild 15.3, I have to run MSBuild and pass in the /bl command-line argument:
msbuild.exe MySolution.sln /bl
How can I have Visual Studio pass this argument every time I build from within Visual Studio? Or, is there some other way to view the output from within Visual Studio?
Install the Project System Tools (referenced by #MSalters).
Also install the MSBuild Binary and Structured Log Viewer.
The Project System Tools adds a new Build Logging window. When you right-click on entries in the window and choose Open Log..., the log will be opened using the viewer.
You'll need a small extension, Project System Tools
Related
I am pulling in open source project but it is configured to build using MS VS 2015. I am trying to override this command line option on msbuild. But is still tries to use MSVS 2015. Following is my command invocation:
msbuild path/to/solution/file/file.sln /p:ToolsVersion=15.0 /p:PlatormToolset=v141 /p:WindowsTargetPlatformVersion=10.0.19041.0 /p:Configuration=Release
I get following error:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.target
s(67,5): error MSB8020: The build tools for v140 (Platform Toolset = 'v140') cannot be found. To build using the v140 b
uild tools, please install v140 build tools. Alternatively, you may upgrade to the current Visual Studio tools by sele
cting the Project menu or right-click the solution, and then selecting "Retarget solution".
Where is cmake located when downloading it from visual studio 2022 as I wanted to add it in environmental variables
Launch the Native Tools Command Prompt (accessible via the Start Menu). From here you can run:
> where cmake
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe
to determine the location. I expect that for VS2022 the path will be very similar.
However, the version of CMake distributed with Visual Studio has patches from Microsoft. You should either install upstream CMake for use outside of the Native Tools Command Prompt, or just use the Native Tools Command Prompt.
I have installed the vs build tools 2017 on a build server.
When I try to build with /t:Publish /p:PublishDir="pub/"
I get
_DeploymentUnpublishable:
Skipping unpublishable project.
Is there a way to fix this or do i need to install the full VS with office developer tools?
Is there a way to fix this or do i need to install the full VS with office developer tools?
I got the same error with your MSBuild arguments on command line:
You need to configure the MSBuild command line on your build server with those two additional arguments: /p:DeployOnBuild=true and /p:PublishProfile=your_publish_profile.pubxml instead of /t:Publish /p:PublishDir="pub/.
So the MSBuild command line should be:
msbuild.exe "YourProjectName.csproj" /p:DeployOnBuild=true /p:PublishProfile=PublishProfileName.pubxml
Of course, you need create the publish profile .pubxml, You don't need to specified path to publish_profile.pubxml as long as it's under the PublishProfiles directory with your project file.
Update for Ant`s comment:
Since your project type is a "Excel 2013 and 2016 VSTO Add-in", not "Excel Web Add-in", we should use ClickOnce publish method to deploy project. I have created a sample demo with VS 2017 and build it with TFS 2017. You can check if it helps:
Create a Excel 2013 and 2016 VSTO Add-in project with VS 2017.
Publish this project from VS manually, then ProjectName_TemporaryKey.pfx file will be generated. Check this project include .pfx file into TFS.
Edit build definition with MSBuild task. and add /t:Publish /p:PublishDir="pub/" to MSBuild argument:
Save and build this project.
According to the build log, this project publish successfully:
Note: Add the .pfx file to your build server and my build server installed VS 2017, but AFAIK, you do not need to install the entire VS, you should install the workload Office/SharePoint development:
How do you get msbuild.exe without installing those crazy Visual Studio programs?
I need it for an npm install to finish working. I'm on Windows 7 and can't get on older version of Visual Studio 2013 Express online.
The latest (as of Jan 2019) stand-alone MSBuild installers can be found here: https://www.visualstudio.com/downloads/
Scroll down to "Tools for Visual Studio 2019" and choose "Build Tools for Visual Studio 2019" (despite the name, it's for users who don't want the full IDE)
See this question for additional information.
It used to be installed with the .NET framework. MsBuild v12.0 (2013) is now bundled as a stand-alone utility and has it's own installer.
http://www.microsoft.com/en-us/download/confirmation.aspx?id=40760
To reference the location of MsBuild.exe from within an MsBuild script, use the default $(MsBuildToolsPath) property.
You can also get the MSBuild executable as a Nuget package https://www.nuget.org/packages/Microsoft.Build.Runtime/.
Download MSBuild with the link from #Nicodemeus answer was OK, yet the installation was broken until I've added these keys into a register:
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\MSBuild\ToolsVersions\12.0]
"VCTargetsPath11"="$([MSBuild]::ValueOrDefault('$(VCTargetsPath11)','$(MSBuildExtensionsPath32)\\Microsoft.Cpp\\v4.0\\V110\\'))"
"VCTargetsPath"="$([MSBuild]::ValueOrDefault('$(VCTargetsPath)','$(MSBuildExtensionsPath32)\\Microsoft.Cpp\\v4.0\\V110\\'))"
I have been trying to get the MonoTools for Visual Studio from their web site (mono-tools.com). But with no luck. Where to get MonoTools for Visual Studio 2010/2012 plug-in?
Aditya.
You can easily modify the MonoTools installer to work with VS2012. .vsix files are ZIP files. In the root of the zip, you'll see a file named extension.vsixmanifest, which lists the versions of Visual Studio that are supported by the extension.
Basically,
Download the MonoTools package
Rename it to have a .zip extension
Right-click and select "open" - you don't want to extract the file, just open the archive using the built-in Windows mechanism
Copy extension.vsixmanifest anywhere - say, to your desktop.
Open it up in a text editor (I love Notepad++, EMACS is also pretty awesome under OSX.)
Change the SupportedProducts key to the following:
<SupportedProducts>
<VisualStudio Version="10.0">
<Edition>VSTS</Edition>
<Edition>VSTD</Edition>
<Edition>Pro</Edition>
</VisualStudio>
<VisualStudio Version="11.0">
<Edition>VSTS</Edition>
<Edition>VSTD</Edition>
<Edition>Pro</Edition>
</VisualStudio>
</SupportedProducts>
Copy the modified file back into the archive.
Rename it from .zip to .vsix
Run it. The Visual Studio Version Selector should appear and let you pick VS2012.
If the Mono menu item doesn't appear after restarting VS, you may need to run
devenv /setup
from a VS command prompt (or, from c:\program files (x86)\microsoft visual studio 11\common7\ide).
This works for just about any VS2010 extension.
That was a former product from Novell, and it is no longer offered or developed.
Xamarin doesn't offer it either.
can get it from here: http://mono-tools.com/
free if you do their survey
but i don't see a vs2012 version
It costs at minimum $999.00 - https://store.xamarin.com/ and is included as part of Mono for Android. Here's a screenshot of what it looks like after it's installed.
There is also a training course on this from PluralSight -- http://www.pluralsight-training.net/microsoft/Courses/TableOfContents/android-intro