The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.
rainersigwald on vsix-depend-on-nuget
VSIX dependency on NuGet.BuildT… Disambiguate branch name (compare)
livarcocc on vs16.0
Bump version to disambiguate wi… Merge pull request #4119 from r… (compare)
livarcocc on livarcocc-patch-1
livarcocc on vs16.0
Adding a vs16.0 trigger Updating to a more general trig… Merge pull request #4118 from M… (compare)
[System.Environment]::GetFolderPath([System.Environment+SpecialFolder]::UserProfile)
would display my UserProfile. You might try that syntax for your issue. plus-in-net-class-names has a little bit more detail.
$([System.Environment]::GetFolderPath('System.Environment+SpecialFolder.UserProfile'))
(note the simplified enum member name with single quotes around it)
<ItemGroup>
<ClCompile Include="@(_SliceCompile->'%(OutputDir)\%(Filename).%(SourceExt)')"
Exclude="@(ClCompile->'%(FullPath)');@(ClCompile->'%(Identity)')" />
</ItemGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="SliceCompile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
<SliceCompile>
<AdditionalOptions>--add-header foo.h</AdditionalOptions>
</SliceCompile>
</ItemDefinitionGroup>
<ItemGroup>
<SliceCompile Include="Foo.ice">
<AdditionalOptions>%(AdditionalOptions) --other</AdditionalOptions>
</SliceCompile>
</ItemGroup>
<Target Name="SliceCompile">
<ItemGroup>
<ClCompile Include="@(SliceCompile->'%(Filename).cpp')">
</ClCompile>
</ItemGroup>
<Warning Text="@(ClCompile->'%(ClCompile.Identity) %(ClCompile.AdditionalOptions)'"/>
</Target>
</Project>
Here the ClCompile generated item has all the metadata from SliceCompile, any pointers as to why this happens
not sure where to put this
having an odd issue with msbuild vscode and visual studio all failing and not able to find critical pieces of .netcore 3.1 / .net 5
i have reinstalled 4x and also tried manually installing from the binary package all of which are failing , it started with not finding the sdk at all , the binary package manual install semms to have fixed that issue but now i am recieving errors about not being able to find the netcoreapp targeting pack , this is happening in all products and the cli as well
hi there
anyone has an idea how i could exclude a referenced analyzer package in a normal "dotnet build" command, but include it in the roslyn compiler stuff whick is used to generate the warnings and hints in vscode (probably called by omnisharp)
is there any environment variable i can check which is set during a normal build and not set on the others?
MSBuildWorkSpace
seems to be expressive enough to allow to do it trivially, so I'm out of ideas
Has anybody encountered this error before?
Project "C:\build\plugins-example\build\ALL_BUILD.vcxproj" on node 1 (default targets).
C:\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.props(31,5): error MSB4186: Invalid static method inv
ocation syntax: "[Microsoft.Build.Utilities.ToolLocationHelper]::FindRootFolderWhereAllFilesExist($(_VCTarg
etsPathFolders), $(_RelativeToolsetFiles))". Method 'Microsoft.Build.Utilities.ToolLocationHelper.FindRootF
olderWhereAllFilesExist' not found. Static method invocation should be of the form: $([FullTypeName]::Metho
d()), e.g. $([System.IO.Path]::Combine(`a`, `b`)). [C:\build\plugins-example\build\ALL_BUILD.vcxproj]
Done Building Project "C:\build\plugins-example\build\ALL_BUILD.vcxproj" (default targets) -- FAILED.
I am generating these projects with CMake using vcpkg toolchain:
cmake -G "Visual Studio 16 2019" -A x64 ../ -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE
I have been struggling for a while to find any illuminating ideas as to what it means on the web :) hoping it is something simpler than I think
<PackageReference Include="Castle.Windsor">
<Version>5.1.1</Version>
</PackageReference>
Hello. We have a .sln
that contains like 50
.vcxproj
. These mainly build C libraries or tools. Today I would like to add a project which purpose is to generate a GIT_COMMIT.h
header file. I don't want this to be a custom build step per project. I believe this could be a project other projects depend on. It seems I have 2 choices:
With a shared items project, how would you achieve that one of the shared items (the GIT_COMMIT.h
header mentioned above) should be generated at build time?
@LJ_Rios_twitter add the -bl switch , as -bl[:Filename=<DesiredPathToBuildLogs>/<binlofilename.binlog>]
. The filename/path is optional. If used, the filename/path should specify a filename that uses a .binlog
suffix/extension
Download the MSBuild Structured Log Viewer from MSBuildStructuredLog and install it.
Look at these two sites for information on using the log file and viewer NSBuildLog and especially Debugging MSBuild
In the csproj
, there is support for AssemblyAttribute
item, i.e.
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Test.$(MSBuildProjectName)</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
Which that apparently has a dotnet/sdk#3439 migratoin path.
Anyway, my question is not really about InternalsVisibleTo
but rather AssemblyAttribute
.
Where is there documentation for this, please. Specifically dealing with _Parameter1
attributes.
More specifically how do we relay properties on the instance itself?
i.e. let's say there was a public string Version { get; set; }
we wanted to set via csproj
. Is it possible?
Thanks...
<Target/>
?